Skip to content

Fix declare in sourced files#3032

Merged
plengauer merged 62 commits intomainfrom
plengauer-patch-2
Mar 19, 2026
Merged

Fix declare in sourced files#3032
plengauer merged 62 commits intomainfrom
plengauer-patch-2

Conversation

@plengauer
Copy link
Owner

Added integration job for Super Linter in GitHub Actions workflow.

Added integration job for Super Linter in GitHub Actions workflow.
@plengauer plengauer self-assigned this Feb 28, 2026
Add function to declare variables as global if conditions are met.
Removed the _otel_declare_maybe_global function from agent.sh.
@plengauer plengauer changed the title Add Super Linter integration test Fix declare in sourced files Mar 1, 2026
@plengauer plengauer marked this pull request as ready for review March 6, 2026 15:09
@plengauer plengauer requested a review from moflwi as a code owner March 6, 2026 15:09
Copilot AI review requested due to automatic review settings March 6, 2026 15:09
@plengauer plengauer enabled auto-merge (squash) March 6, 2026 15:09
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the shell auto-instrumentation to better handle declare behavior in sourced contexts, improve GNU Parallel injection (including env assignments and functions), and adds a GitHub Actions integration job for Super Linter.

Changes:

  • Add declare aliasing + adjust special-command filtering and export reinstrumentation logic in the agent.
  • Update GNU Parallel argument injection to support FOO=BAR cmd style and bash functions.
  • Add Super Linter GitHub Actions integration and a Super Linter–specific instrumentation script.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
tests/auto/test_auto_injection_parallel.sh Adds a new GNU Parallel test case for function execution and span assertions.
src/usr/share/opentelemetry_shell/agent.sh Adjusts export reinstrumentation, adds declare aliasing, and updates special filtering.
src/usr/share/opentelemetry_shell/agent.instrumentation.parallel.sh Enhances GNU Parallel injection to translate env assignments and detect executables/functions.
src/usr/share/opentelemetry_shell/agent.instrumentation.github.actions.superlinter.sh Adds an instrumentation shim that patches Super Linter shell scripts in-place when running in GHA.
src/usr/share/opentelemetry_shell/agent.instrumentation.github.actions.codeql.sh Narrows CodeQL injection to github/codeql-action runs.
.github/workflows/test_github.yml Adds a new integration job to run Super Linter under instrumentation.

moflwi
moflwi previously approved these changes Mar 9, 2026
@plengauer plengauer merged commit fdcb25e into main Mar 19, 2026
570 of 571 checks passed
@plengauer plengauer deleted the plengauer-patch-2 branch March 19, 2026 18:00
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.

3 participants