This repository has been archived by the owner on Sep 17, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 42
fix: use beat_version as fallback if it's provided #1256
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mdelapenya
commented
Jun 14, 2021
Comment on lines
+138
to
+139
artifactName := utils.BuildArtifactName(podName, common.BeatVersion, "linux", "amd64", "tar.gz", true) | ||
imagePath, err := utils.FetchBeatsBinary(m.ctx, artifactName, podName, common.BeatVersion, utils.TimeoutFactor, true) |
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.
These two lines are candidates to be merged into one method, as they are always called all together
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
Trends 🧪💚 Flaky test reportTests succeeded. Expand to view the summary
Test stats 🧪
|
cachedout
approved these changes
Jun 14, 2021
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.
🥇 💯 Nice!
adam-stokes
approved these changes
Jun 14, 2021
mergify bot
pushed a commit
that referenced
this pull request
Jun 14, 2021
* fix: honour beat_version as fallback * chore: simplify method, as the init versions already checks the beat version * chore: simplify method even more (cherry picked from commit 55156f1) # Conflicts: # internal/utils/utils_test.go
mergify bot
pushed a commit
that referenced
this pull request
Jun 14, 2021
* fix: honour beat_version as fallback * chore: simplify method, as the init versions already checks the beat version * chore: simplify method even more (cherry picked from commit 55156f1) # Conflicts: # internal/utils/utils_test.go
mdelapenya
added a commit
that referenced
this pull request
Jun 14, 2021
…ded (#1260) * fix: use beat_version as fallback if it's provided (#1256) * fix: honour beat_version as fallback * chore: simplify method, as the init versions already checks the beat version * chore: simplify method even more (cherry picked from commit 55156f1) # Conflicts: # internal/utils/utils_test.go * fix: resolve conflicts Co-authored-by: Manuel de la Peña <[email protected]>
mdelapenya
added a commit
that referenced
this pull request
Jun 14, 2021
…ovided (#1261) * fix: use beat_version as fallback if it's provided (#1256) * fix: honour beat_version as fallback * chore: simplify method, as the init versions already checks the beat version * chore: simplify method even more (cherry picked from commit 55156f1) # Conflicts: # internal/utils/utils_test.go * fix: resolve conflicts Co-authored-by: Manuel de la Peña <[email protected]>
This was referenced Jun 14, 2021
8 tasks
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
It uses the BEAT_VERSION variable as fallback when provided. For that reason, upstream jobs must provide the Beat version, as they must know in which version they want to run the tests.
On the same hand, we are simplifying the methods to calculate the paths, removing the need to pass a fallback version, as this is already calculated at the initialisation of the configuration/environment, within the InitVersions method.
Why is it important?
Builds triggered by Beats maintenance branches are not able to calculate the right paths to fetch binaries from GCP, and this is caused because the Beats version is a moving target that cannot be calculated without inspecting Beats code (libbeat/version/version.go). I.e., last 7.13 commit is using 7.13.2 as version, which created 7.13.2-SNAPSHOT artifacts in GCP.
Checklist
make unit-test
), and they are passing locallymake notice
in the proper directory)How to test this PR locally
git checkout 7.13.x TAGS="fleet_mode_agent && install" GITHUB_CHECK_SHA1=ad5f805dd30118cba3748189ef03bb945c958628 TIMEOUT_FACTOR=3 LOG_LEVEL=TRACE BEATS_USE_CI_SNAPSHOTS=true DEVELOPER_MODE=true BEAT_VERSION=7.13.2-SNAPSHOT make -C e2e/_suites/fleet functional-test
Related issues
Follow-ups
We need to pass the BEAT_VERSION in the Beats' packaging job, reading from
make get-version' appending
-SNAPSHOT`. Will send a PR ASAP