Skip to content

[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

Open
wants to merge 29 commits into
base: main
Choose a base branch
from

Conversation

crobert-1
Copy link
Contributor

@crobert-1 crobert-1 commented Jun 2, 2025

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 as deployments/ansible.

Ansible functionality changes

When install_local_artifact is enabled, the splunk-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 the splunk-otel-collector to make sure that remote downloading and installation still works as expected on each platform.

Copy link

codecov bot commented Jun 2, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 44.88%. Comparing base (ce02a29) to head (a784707).
Report is 1 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@crobert-1 crobert-1 force-pushed the ansible_test_using_head branch from 1621a21 to 155c47d Compare June 3, 2025 22:18
Copy link
Contributor Author

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:

  1. Remove the setting of install_local_artifact
  2. 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
Copy link
Contributor Author

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.

Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor Author

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.

@crobert-1 crobert-1 marked this pull request as ready for review June 4, 2025 21:48
@crobert-1 crobert-1 requested review from a team as code owners June 4, 2025 21:48
Copy link
Contributor

@jvoravong jvoravong left a 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants