Skip to content

Conversation

@mbien
Copy link
Member

@mbien mbien commented Oct 19, 2022

continues finishes the great migration (#4431).

  • second attempt to migrate the groovy jobs (first: migrate groovy ci matrix from travis to gh actions. #4105). I have the suspicion that the tests can't run on anything > JDK 8. The test setup on travis is just testing the same thing three times in a matrix. This comment made a similar observation. -> going to leave the groovy tests on 8 for now.
  • migrated harness, ergonomics, nb modules and merged them into a single job
  • can't get the LSP tests to run so far (update: Test bugfixes: preparation for GH action migration #4975)
  • going to migrate the rest too since apache will end travis support end of this year

new labels to control jobs with:

  • Groovy runs the groovy job
  • GraalVM runs the GraalVM job - should this trigger on other labels too?
  • LSP runs the LSP (server) job, client is currently tested via the IDE job
  • VSCode Extension runs the VSCode job
  • tests enables a step which builds all tests, this will only run on PRs, not on the master branch
  • list of all ci labels including the new ones

Harness job runs with the Platform label - haven't found a better place to put it.

Each commit usually migrates a single job to make review easier.

The last commit adds some general improvements:

  • mac runners have ant installed, brew/cache isn't needed anymore.
  • added cache for platform-src build
  • bump JDK version of migrated jobs to 11 where possible
  • extract java distribution variable
  • increase pipeline artifact retention time from 1 to 2 days
  • added per-job timeouts (at least 2x of average runtime; 1h minimum)
  • always run the paperwork job
  • set continue-on-error for java.mx.project false in PRs
  • wrapped platform/core.startup, java/java.editor and java.lsp.server in retry script
  • ci:dev-build will now produce a dev-build zip artifact
  • setup all JDKs at the start of the job for consistent timestamp

NB can now also build on JDK 19:

  • build matrix is now 11, 17 and 19
  • gradle daemon will run on JDK 11

@mbien mbien added CI continuous integration changes ci:all-tests [ci] enable all tests labels Oct 19, 2022
@neilcsmith-net
Copy link
Member

Well, this puts a timescale of end of year on all this - https://cwiki.apache.org/confluence/pages/viewpage.action?spaceKey=INFRA&title=Travis+Migrations

@mbien
Copy link
Member Author

mbien commented Oct 25, 2022

yes I saw the mail too. Good that we started so early - the hardest part is done :)

@mbien mbien removed the ci:all-tests [ci] enable all tests label Oct 29, 2022
@mbien mbien force-pushed the ci-migrate-jobs-2 branch 6 times, most recently from 2d97d86 to e322852 Compare October 30, 2022 21:33
@mbien mbien force-pushed the ci-migrate-jobs-2 branch 17 times, most recently from 630d030 to 451a7ca Compare November 2, 2022 04:41
@mbien mbien added Platform [ci] enable platform tests (platform/*) ci:dev-build [ci] produce a dev-build zip artifact (7 days expiration, see link on workflow summary page) and removed ci:all-tests [ci] enable all tests labels Nov 17, 2022
@mbien mbien force-pushed the ci-migrate-jobs-2 branch 2 times, most recently from e573caa to 697a43f Compare November 17, 2022 19:29
@mbien
Copy link
Member Author

mbien commented Nov 17, 2022

@matthiasblaesing I noticed that you are sometimes providing dev builds for your PRs to make it easier to review. I added a label activated dev build step which can do the same (ci:dev-build). Would this be useful for you?

a test run is here (scroll down):
https://github.com/apache/netbeans/actions/runs/3491385341

retention time is set to 7 days. Its a zip in a zip but this is currently a github limitation.

@mbien
Copy link
Member Author

mbien commented Nov 17, 2022

@neilcsmith-net @ebarboni (or anybody else)
Can we skip the gen-sigtests step sometimes? Should I add it to a label or something similar? Check-sigtests is important but I believe the gen step is just useful for regression testing.
https://github.com/apache/netbeans/actions/runs/3491385341/jobs/5844321726

edit: sorry made a typo and pinged Eirik by accident. Hello Eirik :)

#4817 (comment)

@neilcsmith-net I added the build-from-platform-source-zip job as step to platform batch1 job
https://github.com/apache/netbeans/actions/runs/3491385341/jobs/5844322212#step:48:1

I am going to try to enable caching with the next update so that the build won't download dependencies again.

@mbien mbien added ci:all-tests [ci] enable all tests and removed Platform [ci] enable platform tests (platform/*) labels Nov 23, 2022
@mbien mbien force-pushed the ci-migrate-jobs-2 branch 2 times, most recently from 6b75995 to 677eb86 Compare November 23, 2022 20:43
 - mac runners have ant installed, brew/cache isn't needed anymore.
 - added cache for platform-src build
 - bump JDK version of migrated jobs to 11 where possible
 - extract java distribution variable
 - increase pipeline artifact retention time from 1 to 2 days
 - added per-job timeouts (at least 2x of average runtime; 1h minimum)
 - always run the paperwork job
 - set continue-on-error for java.mx.project false in PRs
 - wrapped platform/core.startup, java/java.editor, java.lsp.server
   in retry script
 - ci:dev-build will now produce a dev-build zip artifact
 - setup all JDKs at the start of the job for consistent timestamp
@mbien mbien force-pushed the ci-migrate-jobs-2 branch from 677eb86 to 040a042 Compare November 23, 2022 22:47
@mbien
Copy link
Member Author

mbien commented Nov 23, 2022

LSP job sometimes errors with:

[junit] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0 sec
[junit] 
[junit] Testcase: org.netbeans.modules.java.lsp.server.protocol.ServerTest:testDidOpenPreservesLines:	Caused an ERROR
[junit] Timeout occurred. Please note the time in the report does not reflect the time until the timeout.
[junit] junit.framework.AssertionFailedError: Timeout occurred. Please note the time in the report does not reflect the time until the timeout.
[junit] 	at java.util.Vector.forEach(Vector.java:1277)
[junit] 	at java.util.Vector.forEach(Vector.java:1277)
[junit] 
[junit] 
[junit] Test org.netbeans.modules.java.lsp.server.protocol.ServerTest FAILED (timeout)

but the retry script can brute force through it - so its all good.

Thanks to @sdedic for fixing the nb-javac task issue in #4975 (#4921 for context). I also changed all jobs which use multiple JDKs to set them up right at the beginning of the job for getting consistent timestamps of JDK tools.

@mbien
Copy link
Member Author

mbien commented Dec 3, 2022

@neilcsmith-net @lkishalmi @ebarboni @sdedic would now be a good time to merge this? Is most of the release work done? I also see master is green again.. so this might be good timing.

Reminder that travis will be gone in less than a month. We should have CI working before that so that we can fix things if needed.

@ebarboni
Copy link
Contributor

ebarboni commented Dec 5, 2022

I would say go for it.

Copy link
Member

@neilcsmith-net neilcsmith-net left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree with @ebarboni - let's go! Also, while we're not doing branch protection on checks, a reminder on list that from now on CI should be expected to be green before merging wouldn't be amiss.

Thanks for all your work on this!

@mbien mbien merged commit 6e86f17 into apache:master Dec 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:all-tests [ci] enable all tests ci:dev-build [ci] produce a dev-build zip artifact (7 days expiration, see link on workflow summary page) CI continuous integration changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants