argoproj / argoproj/argo-workflows
test: do not use podSpecPatch to simulate sidecar injection -- tech debt
- Dominant language
- Go
- Stars
- 17k
- Forks
- 3.7k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 138
Description
During the fix in #7407, podSpecPatch is now patched before emissary executor modifies command. Therefore, it's no longer a way to simulate injected sidecars for emissary executor.
We need to find a different way to test sidecar injection for emissary.
_Originally posted by @alexec in https://github.com/argoproj/argo-workflows/issues/7407#issuecomment-995022259_
An idea is to add a special handling for an annotation like workflows.argoproj.io/test-only-pod-spec-patch that is applied at the very end and only for testing purposes.
Contributor guide
Research direction
Start by locating the emissary executor tests and the code that applies podSpecPatch before the executor modifies the command. Trace how sidecar injection is currently simulated, then define a test-only path that is applied afterward and verify the affected executor tests still exercise injected sidecars.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes
- Domain
- backend, testing
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100