-
Notifications
You must be signed in to change notification settings - Fork 25k
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] Add debian-12 to matrix in packaging and platform jobs #116172
Conversation
0aba1c7
to
52af548
Compare
cd5a1ce
to
1ec74c6
Compare
@@ -335,7 +335,6 @@ Closure commonDebConfig(String architecture) { | |||
|
|||
// versions found on oldest supported distro, centos-6 | |||
requires('bash', '4.1', GREATER | EQUAL) | |||
requires('lsb-base', '4', GREATER | EQUAL) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Library lsb-base
is now abandoned and marked as obsolete by Lintian. This lib is not available in Debian 12.
As far as I understand it can be used for some logging function, but I couldn't find any direct calls to it from ES code.
The tests has passed on all DEB-based distributions so I assume it is safe to delete it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Presumable it's just because it brings in sysvinit-utils
. @rjernst do you recall why this might be needed?
Shell.Result result = sh.runIgnoreExitCode( | ||
String.format(Locale.ROOT, "lintian %s %s", extraArgs, getDistributionFile(distribution())) | ||
); | ||
Result lintianResult = lintianParser.parse(result.stdout()); | ||
// Unfortunately Lintian overrides syntax changes between Lintian versions in a non-backwards compatible | ||
// way, so we have to manage some exclusions outside the overrides file. | ||
if (lintianResult.isSuccess() == false) { | ||
List<Issue> importantIssues = lintianResult.issues() | ||
.stream() | ||
.filter(issue -> IGNORED_TAGS.contains(issue.tag()) == false) | ||
.toList(); | ||
if (importantIssues.isEmpty() == false) { | ||
fail( | ||
"Issues for DEB package found by Lintian:\n" | ||
+ importantIssues.stream().map(Record::toString).collect(Collectors.joining("\n")) | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of using exit code, the Lintian output is now parsed and some tags are ignored. It is needed, because in the newer version of Lintian tag mismatched-override
is a "Show-Always" tag which means it cannot be suppressed.
// way, so we have to tolerate these (or maintain separate override files per lintian version). | ||
if (helpText.contains("--suppress-tags")) { | ||
extraArgs += " --suppress-tags malformed-override,mismatched-override"; | ||
extraArgs = "--fail-on error,warning"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lintian --fail-on
requires all levels, to fail on, to be listed .
'warning' does not imply 'error'
https://manpages.debian.org/testing/lintian/lintian.1.en.html
Lintian test has been changed to parse the result instead of using exit code. This was required, because now `mismatched-override` is non-erasable tag which cannot be ignored for exit code. Lintian introduced non-backward-compatible format change for overrides file. Because of that, some overrides are now duplicated in a format for older versions. Additionally, Lintian overrides file has been cleaned up to remove the tags which are no longer failing.
Replaced the usage of `InetAddress.getLocalHost()` with `InetAddress.getLoopbackAddress()` in the `testSlowNodeCanBeCancelled` test to make it work on Debian 12 where `InetAddress.getLocalHost()` may return non-existing address due to incorrectly set value in `/etc/hosts` by GCP VM script `google_set_hostname`.
Removed redundant code that checks for specific exit codes when running Lintian. Different versions of Lintian produces different exit codes it is impossible to relay on them.
This reverts commit 4d9bf31.
5952df2
to
d3b0365
Compare
Periodic builds for this branch passed:
|
Pinging @elastic/es-delivery (Team:Delivery) |
public class LintianResultParser { | ||
|
||
private static final Logger logger = LogManager.getLogger(LintianResultParser.class); | ||
private static final Pattern RESULT_PATTERN = Pattern.compile("(?<severity>[EW]): (?<package>\\S+): (?<tag>\\S+) (?<message>.+)"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think I've ever used "named" regex capture groups but I think I will going forward 👍
💔 Backport failed
You can use sqren/backport to manually backport by running |
…116172) Lintian test has been changed to parse the result instead of using exit code. This was required, because now `mismatched-override` is non-erasable tag which cannot be ignored for exit code. Lintian introduced non-backward-compatible format change for overrides file. Because of that, some overrides are now duplicated in a format for older versions. Additionally, Lintian overrides file has been cleaned up to remove the tags which are no longer failing.
…#117315) Lintian test has been changed to parse the result instead of using exit code. This was required, because now `mismatched-override` is non-erasable tag which cannot be ignored for exit code. Lintian introduced non-backward-compatible format change for overrides file. Because of that, some overrides are now duplicated in a format for older versions. Additionally, Lintian overrides file has been cleaned up to remove the tags which are no longer failing.
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation |
Lintian test has been changed to parse the result instead of using exit code. This was required, because now `mismatched-override` is non-erasable tag which cannot be ignored for exit code. Lintian introduced non-backward-compatible format change for overrides file. Because of that, some overrides are now duplicated in a format for older versions. Additionally, Lintian overrides file has been cleaned up to remove the tags which are no longer failing. (cherry picked from commit 2ac267d) # Conflicts: # distribution/packages/src/deb/lintian/elasticsearch # qa/os/src/test/java/org/elasticsearch/packaging/util/LintianResultParser.java # qa/packaging/src/test/java/org/elasticsearch/packaging/test/DebMetadataTests.java
…116172) Lintian test has been changed to parse the result instead of using exit code. This was required, because now `mismatched-override` is non-erasable tag which cannot be ignored for exit code. Lintian introduced non-backward-compatible format change for overrides file. Because of that, some overrides are now duplicated in a format for older versions. Additionally, Lintian overrides file has been cleaned up to remove the tags which are no longer failing.
…116172) (#117336) * [ci] Add debian-12 to matrix in packaging and platform jobs (#116172) Lintian test has been changed to parse the result instead of using exit code. This was required, because now `mismatched-override` is non-erasable tag which cannot be ignored for exit code. Lintian introduced non-backward-compatible format change for overrides file. Because of that, some overrides are now duplicated in a format for older versions. Additionally, Lintian overrides file has been cleaned up to remove the tags which are no longer failing. (cherry picked from commit 2ac267d) # Conflicts: # distribution/packages/src/deb/lintian/elasticsearch # qa/os/src/test/java/org/elasticsearch/packaging/util/LintianResultParser.java # qa/packaging/src/test/java/org/elasticsearch/packaging/test/DebMetadataTests.java * Spotless fix
…116172) Lintian test has been changed to parse the result instead of using exit code. This was required, because now `mismatched-override` is non-erasable tag which cannot be ignored for exit code. Lintian introduced non-backward-compatible format change for overrides file. Because of that, some overrides are now duplicated in a format for older versions. Additionally, Lintian overrides file has been cleaned up to remove the tags which are no longer failing.
No description provided.