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] Fix script that retrieves oldest supported version #11126

Merged
merged 4 commits into from
Sep 16, 2024

Conversation

mrodm
Copy link
Contributor

@mrodm mrodm commented Sep 13, 2024

Proposed commit message

Fix script in charge of retrieving the oldest supported version of the stack to use for elastic-package stack up -v -d --version <version> command.

Without the fix there were packages that the stack version assigned was 8.x-SNAPSHOT, but the script should return the version in the manifest since it is older than the ones available in the artifacts-api response:

Example:

# Before
Manifest ^8.13.0 -> script 8.13.0 	[keycloak]
Manifest ^8.13.0 -> script 8.13.0 	[httpjson]
Manifest ^8.13.0 -> script 8.13.0 	[vectra_detect]
Manifest ^8.3.0 -> script 8.x-SNAPSHOT 	[fortinet_fortimail]
Manifest ^8.8.0 -> script 8.x-SNAPSHOT 	[juniper_junos]
Manifest ^8.7.1 -> script 8.x-SNAPSHOT 	[hid_bravura_monitor]

# after
Manifest ^8.13.0 -> script 8.13.0 	[keycloak]
Manifest ^8.13.0 -> script 8.13.0 	[httpjson]
Manifest ^8.13.0 -> script 8.13.0 	[vectra_detect]
Manifest ^8.3.0 -> script 8.3.0 	[fortinet_fortimail]
Manifest ^8.8.0 -> script 8.8.0 	[juniper_junos]
Manifest ^8.7.1 -> script 8.7.1 	[hid_bravura_monitor]
Example of artifacts-api response:
{
  "versions": [
    "7.17.19",
    "7.17.20",
    "7.17.21",
    "7.17.22",
    "7.17.23",
    "7.17.24-SNAPSHOT",
    "7.17.24",
    "7.17.25-SNAPSHOT",
    "7.17.25",
    "8.12.3",
    "8.13.0+build202403222138",
    "8.13.0+build202403281537",
    "8.13.0+build202403281758",
    "8.13.0",
    "8.13.1+build202404121909",
    "8.13.1+build202404122010",
    "8.13.1",
    "8.13.2",
    "8.13.3",
    "8.13.4",
    "8.13.5",
    "8.14.0",
    "8.14.1",
    "8.14.2",
    "8.14.3",
    "8.14.4",
    "8.15.0",
    "8.15.1-SNAPSHOT",
    "8.15.1",
    "8.15.2-SNAPSHOT",
    "8.15.2",
    "8.16.0-SNAPSHOT",
    "9.0.0-SNAPSHOT"
  ],
  "aliases": [
    "7.17-SNAPSHOT",
    "7.17",
    "8.x-SNAPSHOT",
    "8.12",
    "8.13",
    "8.14",
    "8.15-SNAPSHOT",
    "8.15",
    "8.16-SNAPSHOT",
    "9.0-SNAPSHOT"
  ],
  "manifests": {
    "last-update-time": "Fri, 13 Sep 2024 11:36:29 UTC",
    "seconds-since-last-update": 139
  }
}

Additional changes:
Update context parameter used in buildkite-agent annotate command. It must be --context.

Example build failing:
https://buildkite.com/elastic/integrations/builds/15884

@mrodm mrodm added the ci label Sep 13, 2024
@mrodm mrodm self-assigned this Sep 13, 2024
@mrodm mrodm requested a review from a team as a code owner September 13, 2024 11:00
@elasticmachine
Copy link

elasticmachine commented Sep 13, 2024

🚀 Benchmarks report

To see the full report comment with /test benchmark fullreport

Major and minor numbers from versions were compared as strings, but they
should be compared as integers.
@mrodm mrodm changed the title [CI] Update context parameter in annotation [CI] Fix script that retrieves oldest supported version Sep 13, 2024
@elasticmachine
Copy link

elasticmachine commented Sep 13, 2024

💛 Build succeeded, but was flaky

Failed CI Steps

History

cc @mrodm

Copy link

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

@mrodm mrodm merged commit e28fc51 into elastic:main Sep 16, 2024
5 checks passed
@mrodm mrodm deleted the fix-context-parameter-annotation branch September 16, 2024 10:14
mrodm added a commit to mrodm/integrations that referenced this pull request Sep 17, 2024
Fix find oldest supported version script. Major and minor numbers
from versions were compared as strings, but they should be compared
as integers.
mrodm added a commit that referenced this pull request Sep 17, 2024
…ps (#11152)

* Remove deps when installing go/mage

* [CI] Fix script that retrieves oldest supported version (#11126)

Fix find oldest supported version script. Major and minor numbers
from versions were compared as strings, but they should be compared
as integers.
harnish-elastic pushed a commit to harnish-elastic/integrations that referenced this pull request Feb 4, 2025
Fix find oldest supported version script. Major and minor numbers
from versions were compared as strings, but they should be compared
as integers.
qcorporation pushed a commit that referenced this pull request Feb 4, 2025
…ps (#11152)

* Remove deps when installing go/mage

* [CI] Fix script that retrieves oldest supported version (#11126)

Fix find oldest supported version script. Major and minor numbers
from versions were compared as strings, but they should be compared
as integers.
harnish-elastic pushed a commit to harnish-elastic/integrations that referenced this pull request Feb 5, 2025
Fix find oldest supported version script. Major and minor numbers
from versions were compared as strings, but they should be compared
as integers.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants