Skip to content

[9.4](backport #6955) OpAMP redact slice maps#7008

Open
mergify[bot] wants to merge 5 commits into
9.4from
mergify/bp/9.4/pr-6955
Open

[9.4](backport #6955) OpAMP redact slice maps#7008
mergify[bot] wants to merge 5 commits into
9.4from
mergify/bp/9.4/pr-6955

Conversation

@mergify
Copy link
Copy Markdown
Contributor

@mergify mergify Bot commented May 11, 2026

What is the problem this PR solves?

Redact slice maps with the form:

- name: Authorization
  value: secretValue

How does this PR solve the problem?

Use the shared redact package in elastic-agent-libs

How to test this PR locally

Enroll an opamp agent with sensitive values in the headers slices.

Design Checklist

  • I have ensured my design is stateless and will work when multiple fleet-server instances are behind a load balancer.
  • I have or intend to scale test my changes, ensuring it will work reliably with 100K+ agents connected.
  • I have included fail safe mechanisms to limit the load on fleet-server: rate limiting, circuit breakers, caching, load shedding, etc.

Checklist

  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in ./changelog/fragments using the changelog tool

Related issues

* OpAMP redact slice maps

Redact slice maps with the form:
- name: Authorization
  value: secretValue

* update testing go.mod

* Update notice

* Fix test

(cherry picked from commit 4d84c65)

# Conflicts:
#	internal/pkg/api/handleOpAMP.go
#	internal/pkg/api/handleOpAMP_test.go
@mergify mergify Bot requested a review from a team as a code owner May 11, 2026 21:39
@mergify mergify Bot added the backport label May 11, 2026
@mergify mergify Bot requested a review from blakerouse May 11, 2026 21:39
@mergify mergify Bot added the conflicts There is a conflict in the backported pull request label May 11, 2026
@mergify mergify Bot requested a review from michel-laterman May 11, 2026 21:39
@mergify
Copy link
Copy Markdown
Contributor Author

mergify Bot commented May 11, 2026

Cherry-pick of 4d84c65 has failed:

On branch mergify/bp/9.4/pr-6955
Your branch is up to date with 'origin/9.4'.

You are currently cherry-picking commit 4d84c65.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	new file:   changelog/fragments/1777917457-OpAMP-redact-sensitive-values-in-header-maps.yaml

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   internal/pkg/api/handleOpAMP.go
	both modified:   internal/pkg/api/handleOpAMP_test.go

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@github-actions github-actions Bot added bug Something isn't working Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team labels May 11, 2026
@mergify
Copy link
Copy Markdown
Contributor Author

mergify Bot commented May 18, 2026

This pull request has not been merged yet. Could you please review and merge it @michel-laterman? 🙏

@github-actions

This comment has been minimized.

@michel-laterman
Copy link
Copy Markdown
Contributor

@copilot please fix the backport

Agent-Logs-Url: https://github.com/elastic/fleet-server/sessions/7358a2d2-5ca3-4f38-beb1-f465528c67f2

Co-authored-by: michel-laterman <82832767+michel-laterman@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI commented May 19, 2026

@copilot please fix the backport

Fixed in 5096822: resolved the broken backport by removing committed merge-conflict markers in internal/pkg/api/handleOpAMP.go and internal/pkg/api/handleOpAMP_test.go, preserving the intended redact-package behavior and tests. mage test:unit and parallel validation both pass.

@michel-laterman michel-laterman enabled auto-merge (squash) May 19, 2026 11:16
@github-actions

This comment has been minimized.

@github-actions
Copy link
Copy Markdown
Contributor

TL;DR

Both failed Buildkite jobs for build https://buildkite.com/elastic/fleet-server/builds/14810 exited non-zero, but the provided logs are truncated and do not contain the actual failing test/error lines. The immediate next step is to rerun and capture full raw logs for int-test and e2e-test.

Remediation

  • Re-run Buildkite steps :smartbear-testexecute: Run integration tests and E2E Test with full/raw log capture enabled (current pre-fetched logs only contain tail snippets).
  • For E2E Test, if rerun shows TestStandAloneRunningSuite/TestOpAMP failing with signal: killed, correlate with open flaky issue [Flaky Test] TestStandAloneRunningSuite/TestOpAMP signal: killed #6590.
  • For integration, identify the first --- FAIL: / panic: / DATA RACE line in the full output and fix that specific package/test (current snippet only shows final go test ... exit code 1).
Investigation details

Root Cause

The root cause is not present in available artifacts. Both provided log files end with summary failure lines only, without the initiating failure record.

Evidence

  • Build: https://buildkite.com/elastic/fleet-server/builds/14810
  • Job/step: :smartbear-testexecute: Run integration tests
    • /tmp/gh-aw/buildkite-logs/fleet-server-smartbear-testexecute-run-integration-tests.txt:133FAIL
    • /tmp/gh-aw/buildkite-logs/fleet-server-smartbear-testexecute-run-integration-tests.txt:135Error: running "go test -v -tags=integration,grpcnotrace -count=1 -race -p 1 ./..." failed with exit code 1
  • Job/step: E2E Test
    • /tmp/gh-aw/buildkite-logs/fleet-server-e2e-test.txt:97-121 show all listed subtests in TestStandAloneRunningSuite as PASS
    • /tmp/gh-aw/buildkite-logs/fleet-server-e2e-test.txt:123FAIL
    • /tmp/gh-aw/buildkite-logs/fleet-server-e2e-test.txt:125FAIL github.com/elastic/fleet-server/testing/e2e 1313.253s

This pattern indicates the actionable failing frame is missing from the supplied excerpts.

Verification

Not run in this workflow environment (analysis was limited to provided Buildkite failure artifacts and PR metadata).

Follow-up

Once full logs are available, I can map the first failing stack/assertion directly to file/line and provide a concrete code fix.

Note

🔒 Integrity filter blocked 1 item

The following item were blocked because they don't meet the GitHub integrity level.

  • #5181 search_issues: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".

To allow these resources, lower min-integrity in your GitHub frontmatter:

tools:
  github:
    min-integrity: approved  # merged | approved | unapproved | none

What is this? | From workflow: PR Buildkite Detective

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport bug Something isn't working conflicts There is a conflict in the backported pull request Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants