-
Notifications
You must be signed in to change notification settings - Fork 392
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
Test each integration with the oldest supported version #1541
Test each integration with the oldest supported version #1541
Conversation
f708e3c
to
1b79f82
Compare
1b79f82
to
10afe79
Compare
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
Trends 🧪 |
ce1d34c
to
beaf3e1
Compare
beaf3e1
to
aa483ef
Compare
Pinging @elastic/integrations (Team:Integrations) |
Pinging @elastic/security-external-integrations (Team:Security-External Integrations) |
0229fcd
to
76570a2
Compare
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 really like the idea that we test with the oldest version supported.
Later on, I wonder if we could also do a test run with the newest version supported. This might be unstable and maybe only run ones every day / week to show where we are standing.
description: This Elastic integration collects Blue Coat Director logs | ||
categories: ["network", "security"] | ||
release: experimental | ||
license: basic | ||
type: integration | ||
conditions: | ||
kibana.version: "^7.14.0" | ||
kibana.version: "^7.14.1" |
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.
Is this change by itention? Same for the other packaegs?
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.
Yes, this is intentional, these packages fail to install in 7.14.0, probably due to elastic/beats#27299.
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.
Got it. Sounds like we should start working on elastic_agent.version: ...
as this one is not Kibana related.
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.
Yes, I think we are going to need conditions for elastic agent soon, but this will imply more changes.
Yep, agree, I was thinking on adding a jenkins parameter so we can launch all the tests with an specific version, this would allow for example to run the tests against a build candidate. This could be run with master/7.x on a daily basis. |
.ci/Jenkinsfile
Outdated
} | ||
|
||
def findStackVersion(String versionCondition) { | ||
def version = versionCondition.substring(1) |
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.
Is this line supposed to remove the initial v
from the version string? I would add a note about it's behaviour.
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.
Agree, this is a bit obscure. Victor is moving this function to the shared library and we are being more explicit about this there (explicitly checking that first character is ^
, documenting that we only support this operator here and testing this expectation). You can find it here: elastic/apm-pipeline-library#1248
.ci/Jenkinsfile
Outdated
// Old minors may not be available in artifacts-api, if it is older | ||
// than the others in the same major, return the version as is. |
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.
It is not clear to me what is happening here and why returning the version as is is the correct choice.
Does artifacts-api
delete all minors apart from latest? (so for example it keeps 7.x
and not 7.x-1
)
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.
Yes, older versions are not available in this API, you can see it here: https://artifacts-api.elastic.co/v1/versions. For example 7.13.0 is not there now.
In these cases I am assuming that these older versions existed, and their docker images are available.
Co-authored-by: Victor Martinez <victormartinezrubio@gmail.com>
Co-authored-by: Victor Martinez <victormartinezrubio@gmail.com>
…to integrations-stack-version
if (manifest != null && manifest["conditions"] != null) { | ||
def kibanaVersionCondition = manifest["conditions"]["kibana.version"] | ||
if (kibanaVersionCondition != null) { | ||
def version = findOldestSupportedVersion(versionCondition: kibanaVersionCondition) |
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 cannot find findOldestSupportedVersion
, where is it defined?
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.
See https://github.com/elastic/apm-pipeline-library/blob/master/vars/findOldestSupportedVersion.groovy that was originally copied from 6f60c8d
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.
We use a shared library for jenkinsfiles, this function has been moved there: elastic/apm-pipeline-library#1248
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.
👍
|
This is needed for packages that fail to install in 7.14.0 (see this comment #1541 (comment)). |
Test each package with the oldest supported version of the stack. This will help making the builds a bit more deterministic, while ensuring that no changes are introduced that break the condition of supported version. If the version doesn't exist yet, it will try to use the closer snapshot, for example if 7.14.1 doesn't exist, it will try to use 7.14.1-SNAPSHOT or 7.x-SNAPSHOT, this will allow to develop integrations with unreleased features. Some packages using 7.14.0 have been modified to require at least 7.14.1 as they were affected by elastic/beats#27299.
What does this PR do?
Test each package with the oldest supported version of the stack. This will help making the builds a bit more deterministic, while ensuring that no changes are introduced that break the condition of supported version.
If the version doesn't exist yet, it will try to use the closer snapshot, for example if 7.14.1 doesn't exist, it will try to use 7.14.1-SNAPSHOT or 7.x-SNAPSHOT, this will allow to develop integrations with unreleased features.
Some packages using 7.14.0 have been modified to require at least 7.14.1 as they were affected by elastic/beats#27299.
Checklist
changelog.yml
file.manifest.yml
file to point to the latest Elastic stack release (e.g.^7.13.0
).Author's Checklist
How to test this PR locally
Related issues
Screenshots