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

Replace "fail on warning" with Jenkins quality gate #1030

Merged

Conversation

HeikoKlare
Copy link
Contributor

@HeikoKlare HeikoKlare commented Feb 5, 2024

The GitHub Actions and Jenkins build specifications currently contain the option -Dmaven.compiler.failOnWarning=true. Since warnings were defined to be ignored in the parent POM, this did not have any effect. The configuration to ignore warnings has been removed from the parent POM, so that the builds now fail as the code actually contains warnings.

This change removes the "fail on warning" option. As a replacement, it enables Jenkins quality gate.

See eclipse-platform/eclipse.platform.releng.aggregator#1774

Copy link
Contributor

github-actions bot commented Feb 5, 2024

Test Results

   299 files  +   299     299 suites  +299   5m 50s ⏱️ + 5m 50s
 4 100 tests + 4 100   4 092 ✅ + 4 092   8 💤 + 8  0 ❌ ±0 
12 212 runs  +12 212  12 137 ✅ +12 137  75 💤 +75  0 ❌ ±0 

Results for commit 41c66df. ± Comparison against base commit 0f5d45a.

♻️ This comment has been updated with latest results.

@HeikoKlare HeikoKlare marked this pull request as ready for review February 5, 2024 14:51
Copy link
Member

@HannesWell HannesWell left a comment

Choose a reason for hiding this comment

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

Disabling failOnWarning makes sense to me, but we should then activate the quality gate, similar like it is done for example in PDE:

https://github.com/eclipse-pde/eclipse.pde/blob/d5c48d832150b036c20d61fcfcbe539ed96e85d3/Jenkinsfile#L42C6-L42C219

Although the exact settings are controversially discussed: eclipse-platform/eclipse.platform#1046

@HeikoKlare
Copy link
Contributor Author

we should then activate the quality gate, similar like it is done for example in PDE:

I agree. Maybe we can have that as a direct follow-up PR? In case we need some experiments or discussion on the quality gate configuration, it will not block the failOnWarning disablement from being merged. Currently this makes all builds fail due to eclipse-platform/eclipse.platform.releng.aggregator#1774, and since warnings have simply been ignored before, this option never had any effect.

@HannesWell
Copy link
Member

I agree. Maybe we can have that as a direct follow-up PR? In case we need some experiments or discussion on the quality gate configuration, it will not block the failOnWarning disablement from being merged. Currently this makes all builds fail due to eclipse-platform/eclipse.platform.releng.aggregator#1774,

I'm also fine to do that as a follow up, if you prefer to discuss the exact settings first. But I would also be fine to apply only the weaker settings now, that only require no new warnings for the Compiler (which also includes API errors) and discuss later to make it more strict. Your call :)

and since warnings have simply been ignored before, this option never had any effect.

Only for those warnings being ignored, not the once that were not ignored.

@HannesWell HannesWell dismissed their stale review February 5, 2024 18:44

Alternatives on Heiko's discretion.

The GitHub Actions and Jenkins build specifications currently contain
the option `-Dmaven.compiler.failOnWarning=true`. Since warnings were
defined to be ignored in the parent POM, this did not have any effect.
The configuration to ignore warnings has been removed from the parent
POM, so that the builds now fail as the code actually contains warnings.

This change removes the "fail on warning" option. As a replacement, it
enables Jenkins quality gate.
@HeikoKlare HeikoKlare force-pushed the disable-failOnWarning branch from b594376 to 41c66df Compare February 5, 2024 19:00
@HeikoKlare
Copy link
Contributor Author

Only for those warnings being ignored, not the once that were not ignored.

True. Then removing the configuration option without enabling the quality gate would actually weaken the checks. I have added a quality gate configuration, which, from my understanding, should be rather weak. So we can see if that works fine and then apply a stricter one later on.

@HeikoKlare HeikoKlare changed the title Disable "fail on warning" in GitHub Actions and Jenkins builds Replace "fail on warning" with Jenkins quality gate Feb 5, 2024
Copy link
Member

@HannesWell HannesWell 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. Thank you!

The current quality-gate failure is obviously expected and will vanish for all following PRs.
So lets submit this and work on fixing the warnings. 🚀

@HannesWell HannesWell merged commit c8d8944 into eclipse-platform:master Feb 5, 2024
10 of 13 checks passed
@HeikoKlare HeikoKlare deleted the disable-failOnWarning branch February 6, 2024 08:19
tmssngr pushed a commit to syntevo/eclipse.platform.swt that referenced this pull request Mar 21, 2024
…exe" extension

Before commit 97ca656 `SHGetFileInfo` was used initially to get the
icon. This caused problems for some icons (eclipse-platform#715). The fix in commit
97ca656 removed the `SHGetFileInfo` invocation which caused a new
problem that for some file extensions, e.g. `.exe`, no icon was returned
any more.

This fix re-introduces the `SHGetFileInfo`, but only uses it if
`ExtractIconEx` did not return an icon.

See:
eclipse-platform#1030: eclipse-platform#1130
eclipse-platform#715: eclipse-platform#715
tmssngr pushed a commit to syntevo/eclipse.platform.swt that referenced this pull request Mar 21, 2024
…exe" extension

Before commit 97ca656 `SHGetFileInfo` was used initially to get the
icon. This caused problems for some icons (eclipse-platform#715). The fix in commit
97ca656 removed the `SHGetFileInfo` invocation which caused a new
problem that for some file extensions, e.g. `.exe`, no icon was returned
any more.

This fix re-introduces the `SHGetFileInfo`, but only uses it if
`ExtractIconEx` did not return an icon.

See:
eclipse-platform#1030: eclipse-platform#1130
eclipse-platform#715: eclipse-platform#715
tmssngr pushed a commit to syntevo/eclipse.platform.swt that referenced this pull request Mar 21, 2024
…exe" extension

Before commit 97ca656 `SHGetFileInfo` was used initially to get the
icon. This caused problems for some icons (eclipse-platform#715). The fix in commit
97ca656 removed the `SHGetFileInfo` invocation which caused a new
problem that for some file extensions, e.g. `.exe`, no icon was returned
any more.

This fix re-introduces the `SHGetFileInfo`, but only uses it if
`ExtractIconEx` did not return an icon.

See:
eclipse-platform#1030: eclipse-platform#1130
eclipse-platform#715: eclipse-platform#715
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.

2 participants