Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: switch to Java 17 for CI builds #5602

Merged
merged 10 commits into from
Dec 10, 2024
Merged

ci: switch to Java 17 for CI builds #5602

merged 10 commits into from
Dec 10, 2024

Conversation

MMaiero
Copy link
Contributor

@MMaiero MMaiero commented Dec 3, 2024

This PR switches to Java17 for CI builds

This PR additionally performs the following:

  1. Adds the Surefire rerun policy to our CI build.
  2. Disable failing tests on Java17. See list below for details.
  3. Removes the DP packages from the buildAll target
  4. Updates our main README to only refer to Java 17

Details

This PR started off as a simple update to the manve-surefire-plugin rerun policy. We later found out that we need to switch to Java 17 for it to work properly and decided to do so since we needed it anyway (see: #5478)

Then we found out that some tests fails in the Java17 profile which prompted us to disable them and address the issue at a later date (see: https://eurotech.atlassian.net/browse/ECESF-8549)

Finally, we removed all .dp from the buildAll target since we cannot generate .dp packages with Java17 and the distrib build would fail since it was looking for them (see https://eurotech.atlassian.net/browse/ECESF-3770)

Disabled tests

  1. DeploymentAgentTest
  2. LinuxNetworkUtilTest
  3. NMDbusConnectorTest fixed in 4481dd4
  4. PackagesRestServiceTest

@MMaiero MMaiero requested a review from mattdibi December 3, 2024 15:33
mattdibi

This comment was marked as outdated.

@mattdibi

This comment was marked as outdated.

@MMaiero

This comment was marked as outdated.

@mattdibi

This comment was marked as outdated.

@mattdibi
Copy link
Contributor

mattdibi commented Dec 6, 2024

@MMaiero I tested it locally on a Java17 installation. It does work simply by adding -Dsurefire.rerunFailingTestsCount in the test run command.

How do we want to proceed now?

  1. Personally I would prefer enabling the rerun in the CLI command rather than modifying the POM. During development I want my tests to fail fast and not be re-ran since they might simply be broken because we're developing them. Having the rerun in the CLI command is much more flexible. What do you think?
  2. Should we switch to Java17 for CI builds? It'll become a necessary shortly with chore: Updated equinox #5478 right?

@MMaiero
Copy link
Contributor Author

MMaiero commented Dec 6, 2024

Yes to both. Le't's use the command line instead of the configuration in pom files.
Let's start the switch to java 17 as baseline

@mattdibi mattdibi changed the title ci: Added Surefire rerun policy ci: Added Surefire rerun policy and switch to Java17 for CI builds Dec 6, 2024
@mattdibi
Copy link
Contributor

mattdibi commented Dec 6, 2024

Good news is that it's working:

image

Bad news is that there are broken tests since we are not running them regularly and we'll need to fix them...

@mattdibi
Copy link
Contributor

mattdibi commented Dec 9, 2024

For documentation purposes: we decided to disable the failing tests for now and fix them at a later date.

@mattdibi mattdibi changed the title ci: Added Surefire rerun policy and switch to Java17 for CI builds ci: switch to Java 17 for CI builds Dec 10, 2024
mattdibi
mattdibi previously approved these changes Dec 10, 2024
@marcellorinaldo
Copy link
Contributor

Do not merge yet, have to check something...

Copy link
Contributor

@marcellorinaldo marcellorinaldo left a comment

Choose a reason for hiding this comment

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

Looks good to me

@mattdibi
Copy link
Contributor

@salvatore-coppola if you don't see any issues I would proceed with merging this

@mattdibi mattdibi merged commit 592b937 into develop Dec 10, 2024
4 checks passed
@mattdibi mattdibi deleted the MMaiero-patch-1 branch December 10, 2024 16:01
MMaiero added a commit that referenced this pull request Dec 20, 2024
* ci: Added Surefire rerun policy

* ci: switch to Java17 for CI builds

* test: disabled DeploymentAgentTest

* test: disabled LinuxNetworkUtilTest

* test: disabled PackagesRestServiceTest

* test: re-enable ConfigurationRestServiceTest

* test: fix NMDbusConnectorTest

* build: remove `core-dp` and `can-dp` from `buildAll` target

* docs: update README to refere to Java 17 only

* ci: refactor Jenkinsfile for improved error reporting and more granular timeouts

---------

Co-authored-by: Mattia Dal Ben <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants