-
Notifications
You must be signed in to change notification settings - Fork 166
[chore][ansible] Update linux tests to use locally built artifact #6284
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
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6284 +/- ##
==========================================
- Coverage 44.89% 44.88% -0.02%
==========================================
Files 390 390
Lines 26994 26994
==========================================
- Hits 12119 12115 -4
- Misses 14008 14012 +4
Partials 867 867 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
also removed msi install
1621a21
to
155c47d
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.
Note: Everything under default_install_remote_version
was a direct copy from default
. The only changes are as follows:
- Remove the setting of
install_local_artifact
- Set
splunk_otel_collector_version
splunk_access_token: fake-token | ||
splunk_realm: fake-realm | ||
install_splunk_otel_auto_instrumentation: true | ||
splunk_otel_auto_instrumentation_version: 0.126.0 | ||
splunk_otel_auto_instrumentation_version: latest |
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.
Keeping up to date with the latest
is what I believe is the best option available, as this artifact is not published by the splunk-otel-collector
repo.
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 seems fine since splunk_otel_auto_instrumentation_version updates infrequently. At worst, a new splunk_otel_auto_instrumentation_version release could occasionally cause a flaky Asnbile idempotency test failure, but that should be rare and low impact.
.github/workflows/ansible.yml
Outdated
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.
The added build steps in this workflow are copied from the linux_package_test workflow.
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 removed the version check as the local artifact version would need to be parsed from filenames and then set as ansible variables to compare. This seems more complicated than it's worth, but I can the required logic and check if anyone feels strongly.
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.
A couple small comments, overall LGTM and approving. I’ve used Ansible before but not with this project, so it maybe let this sit for other reviews as well.
Description:
Changes have been broken down into individually described pieces below.
GitHub Workflow
Add build steps for building the linux packages locally. The built artifacts are then downloaded by the ansible linux test job under the runner's
/tmp
directory. As a result of needing to build packages and upload/download them, I changed the workflow's default path to be the repo's head, and the ansible test steps have the working directory asdeployments/ansible
.Ansible functionality changes
When
install_local_artifact
is enabled, thesplunk-otel-collector
image is installed from/tmp
on the controller machine. Functionality should remain unchanged when this variable is false.Ansible test changes
Updated all existing molecule tests to use
install_local_artifact
which means that the package built from source is being used in testing, rather than a remote released version. Added a new test that uses a set version of thesplunk-otel-collector
to make sure that remote downloading and installation still works as expected on each platform.