-
Notifications
You must be signed in to change notification settings - Fork 3.4k
chore: flip filtering label to mark examples with tests #15002 #15014
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?
chore: flip filtering label to mark examples with tests #15002 #15014
Conversation
639e09f to
87317dd
Compare
This commit removes the label `workflows.argoproj.io/test` used to mark examples as testable because now we want as contributors to be more explicit marking examples that DO NOT have tests, this should help maintainers to ask for those tests as part of code review. This commit adds `workflows.argoproj.io/no-test-broken` for genuinely broken examples which can be fixed or that do not have test yet. `workflows.argoproj.io/no-test-environment` for examples which need to run in a different environment, e.g. need access to artifactory but this commit does not mark those. Related argoproj#15002 Signed-off-by: Gianluca Arbezzano <[email protected]>
295a2ba to
9af4b12
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.
Pull Request Overview
This PR implements a strategy change for example test coverage by flipping from an opt-in to an opt-out approach. Instead of marking examples with workflows.argoproj.io/test: "true" to include them in testing, examples now run by default unless explicitly excluded with workflows.argoproj.io/no-test-broken or workflows.argoproj.io/no-test-environment labels. This change encourages better test coverage for documentation examples.
- Inverted test filtering logic in
test/e2e/examples_test.goto skip only labeled examples - Extended the allowed image list in
test/e2e/fixtures/given.goto support more example scenarios - Updated approximately 100+ example YAML files to use the new labeling scheme and standardize container images
Reviewed Changes
Copilot reviewed 170 out of 175 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
test/e2e/examples_test.go |
Changed test logic from opt-in to opt-out filtering using new label names |
test/e2e/fixtures/given.go |
Extended allowed images list for examples to include more common base images |
test/e2e/testdata/cluster-workflow-template-ref.yaml |
Added no-test-broken label |
examples/**/*.yaml (100+ files) |
Removed old test labels, added new exclusion labels, and standardized images to versions in allowlist |
docs/fields.md |
Updated example references to reflect the new labeling scheme |
.github/workflows/ci-build.yaml |
Added comment explaining example tests are non-retryable without controller restart |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
.github/workflows/ci-build.yaml
Outdated
| profile: minimal | ||
| use-api: false | ||
| retries: 0 | ||
| # Example tests are not retryable withou a controller restart |
Copilot
AI
Nov 18, 2025
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.
Spelling error in comment: "withou" should be "without".
| image: busybox | ||
| command: [bash] |
Copilot
AI
Nov 18, 2025
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 image "debian:9.4" has been changed to "busybox", but the command remains [bash]. The busybox image typically uses sh instead of bash, which may cause this script to fail. Consider changing the command to [sh] or using an image that includes bash.
| image: busybox | ||
| command: [bash] | ||
| source: | |
Copilot
AI
Nov 18, 2025
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 image has been changed from "debian:9.4" to "busybox" with a trailing space. This trailing space in "busybox " may cause the container to fail to pull the image. Additionally, the command [bash] is incompatible with busybox, which typically uses sh. Consider removing the trailing space and changing the command to [sh].
examples/influxdb-ci.yaml
Outdated
| path: /var/lib/influxdb/data | ||
| container: | ||
| image: debian:9.4 | ||
| image: busybox |
Copilot
AI
Nov 18, 2025
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 image has been changed from "debian:9.4" to "busybox" with a trailing space. This trailing space in "busybox " may cause the container to fail to pull the image. Please remove the trailing space.
| image: busybox | ||
| command: [bash] |
Copilot
AI
Nov 18, 2025
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 image has been changed from "debian:9.4" to "busybox" with a trailing space. This trailing space in "busybox " may cause the container to fail to pull the image. Additionally, the command [bash] is incompatible with busybox, which typically uses sh. Consider removing the trailing space and changing the command to [sh].
examples/volumes-emptydir.yaml
Outdated
| - name: volumes-emptydir-example | ||
| container: | ||
| image: debian:latest | ||
| image: aline:3.6 |
Copilot
AI
Nov 18, 2025
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.
Typo in image name: "aline:3.6" should be "alpine:3.6".
.github/workflows/ci-build.yaml
Outdated
| profile: minimal | ||
| use-api: false | ||
| retries: 0 | ||
| # Example tests are not retryable withou a controller restart |
Copilot
AI
Nov 18, 2025
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.
Spelling error in comment: "exeuction" should be "execution".
236ed66 to
46cbf4f
Compare
…5002 Since we have changed how we identify if an example runs correctly as test this commit applies to the new protocol in the test runner. Signed-off-by: Gianluca Arbezzano <[email protected]>
2eeab30 to
6b35e1c
Compare
Joibel
left a comment
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 think we need some more flags, and to really consider if any are broken. I've only reviewed down to http-success-condition, and will return to it later.
examples/timeouts-workflow.yaml
Outdated
| metadata: | ||
| generateName: timeouts-workflow- | ||
| labels: | ||
| workflows.argoproj.io/no-test-environment: "true" |
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.
Another duration
examples/timeouts-step.yaml
Outdated
| kind: Workflow | ||
| metadata: | ||
| labels: | ||
| workflows.argoproj.io/no-test-broken: "true" |
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 presume this one "fails" but runs. It feels like maybe we need a separate label for no-test-expectedfailure or something?
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.
yes makes sense to me. Should I proceed with that?
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.
Yes please
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 is mismatching on standard labels and misleading. Could you raise an issue to fix it please?
| labels: | ||
| # Note that this label is required for the informer to detect this ConfigMap. | ||
| workflows.argoproj.io/configmap-type: Parameter | ||
| workflows.argoproj.io/no-test-environment: "true" |
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.
It would be cleaner if we only attempted files which contained kind: Workflow.
| apiVersion: argoproj.io/v1alpha1 | ||
| kind: WorkflowEventBinding | ||
| metadata: | ||
| labels: |
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.
Another untestable kind
| metadata: | ||
| generateName: fibonacci- | ||
| labels: | ||
| workflows.argoproj.io/no-test-broken: "true" |
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.
Broken, or just takes too long?
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 is the error I see at the moment:
└ ✔ [2] StepGroup 0s 20:45:19 [14/1953]
└ ○ fibonacci-helper Skipped 0s when '2 != 1 && 2 != 2' evaluated false
└ ✔ fib-sub-1 Steps 0s
└ ✔ [3] StepGroup 0s
└ ✖ add Pod 3s main: Error (exit code 1)
└ ✖ [4] StepGroup 5s child 'fibonacci-cfsxr-3090884672' failed
└ ✔ fib-sub-2 Steps 0s
examples_test.go:75: condition never and cannot be met because the workflow is done
Logs from the failing pod:
time=2025-11-25T19:45:15.042Z level=INFO msg="capturing logs" argo=true
time=2025-11-25T19:45:15.042Z level=INFO msg="waiting for signals" argo=true signalPath=/var/run/argo/ctr/main/signal
File "/argo/staging/script", line 1
print(2 + {{steps.fib-sub-2.outputs.parameters.fib}})
^
SyntaxError: invalid syntax
time=2025-11-25T19:45:15.088Z level=DEBUG msg="ignore signal" argo=true signal="child exited"
time=2025-11-25T19:45:16.043Z level=INFO msg="file signal handler exiting due to context cancellation" argo=true
time=2025-11-25T19:45:16.043Z level=INFO msg="sub-process exited" argo=true error="exit status 1"
Error: exit status 1
examples/forever.yaml
Outdated
| kind: Workflow | ||
| metadata: | ||
| labels: | ||
| workflows.argoproj.io/no-test-broken: "true" |
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.
Not really broken, but untestable
examples/hdfs-artifact.yaml
Outdated
| kind: Workflow | ||
| metadata: | ||
| labels: | ||
| workflows.argoproj.io/no-test-broken: "true" |
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.
environment surely, as no HDFS?
examples/hello-world.yaml
Outdated
| metadata: | ||
| generateName: hello-world- | ||
| labels: | ||
| workflows.argoproj.io/no-test-broken: "true" |
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.
Really need this one to be working, so tested, what's wrong with it?
examples/http-success-condition.yaml
Outdated
| metadata: | ||
| generateName: http-template-condition- | ||
| labels: | ||
| workflows.argoproj.io/no-test-broken: "true" |
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.
Another can we fix it one?
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.
fixed the url used to retrieve status code did not work anymore
This commits adds two new labels to communicate why an example can't run as part of the validation test suite: 1. `duration` when an example is expected to run for more than the expected test timeout. 2. `expected-failure` when an example is expected to fail. Signed-off-by: Gianluca Arbezzano <[email protected]>
50f93bd to
74e63ed
Compare
Joibel
left a comment
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.
Can we make sure that only tests that are really properly broken are marked as broken, because we should fix those. If they're otherwise untestable they should get a different flag.
| metadata: | ||
| generateName: workflow-template-dag-diamond- | ||
| labels: | ||
| workflows.argoproj.io/no-test-broken: "true" |
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'm not sure how you'd intend to implement this, but could we just do two passes of all the yaml?
First pass installs anything it finds that's not a workflow (e.g. the WFT and ClusterWFTs, ConfigMap) and then second pass is the test. This means its easy to extend, and doesn't need anything hard coded. Failure to install the other types would be a worthwhile check as well, and any that we can't install could be labelled with no-test also
examples/dag-continue-on-fail.yaml
Outdated
| kind: Workflow | ||
| metadata: | ||
| labels: | ||
| workflows.argoproj.io/no-test-broken: "true" |
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.
Ok, the second half is designed to fail, so this one should be an expected failure
examples/init-container.yaml
Outdated
| kind: Workflow | ||
| metadata: | ||
| labels: | ||
| workflows.argoproj.io/no-test-broken: "true" |
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 one should work, why is it broken?
examples/input-artifact-http.yaml
Outdated
| kind: Workflow | ||
| metadata: | ||
| labels: | ||
| workflows.argoproj.io/no-test-environment: "true" |
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 should be updated to something that works
| kind: Workflow | ||
| metadata: | ||
| labels: | ||
| workflows.argoproj.io/no-test-broken: "true" |
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 is one that needs interaction, so not broken, needs a different label
examples/sidecar-dind.yaml
Outdated
| metadata: | ||
| generateName: sidecar-dind- | ||
| labels: | ||
| workflows.argoproj.io/no-test-broken: "true" |
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.
Environment surely
examples/secrets.yaml
Outdated
| metadata: | ||
| generateName: secrets- | ||
| labels: | ||
| workflows.argoproj.io/no-test-broken: "true" |
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.
environment?
examples/retry-on-error.yaml
Outdated
| metadata: | ||
| generateName: retry-on-error- | ||
| labels: | ||
| workflows.argoproj.io/no-test-environment: "true" |
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.
untestable I suspect due to randomness
| metadata: | ||
| generateName: parallelism-template-limit- | ||
| labels: | ||
| workflows.argoproj.io/no-test-broken: "true" |
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.
Duration?
| generateName: output-parameter- | ||
| labels: | ||
| workflows.argoproj.io/no-test-broken: "true" | ||
| spec: |
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.
Really needs to work
74e63ed to
4deedf7
Compare
Many examples could pass tests but they were marked as no-test for various reasons. I analyzed all the tests and I marked the one that did not pass as `no-test-broken` or `-no-test-environment` according to why they were not passing. The most common issues for failing example were the image used as part of the workflow since we have a list of allowed images that can run as tests I expanded the list accordingly and I moved some images that were doing easy tasks for already allowed images. For example we had some debian images that were running `sleep` or `cat`, such commands can run from a busybox and it was already allowed so I moved the workflow to use it. As follow up I will update images to their up to date version. Signed-off-by: Gianluca Arbezzano <[email protected]>
4deedf7 to
2daf284
Compare
Reference: #15002
Motivation
We want to increase the test coverage for our examples since they are important
to guide users and for documentations we want them to run correctly.
Modifications
Thi PR flips how we mark example with validation tests. Previously we were
marking only the examples with a test, it makes this process easy to kind of
chill out and avoid writing a validation test. We decided to run example tests
by default for all examples that do not explicitly exclude. This should help us
to writing those tests.
Verification
As part of exeuction of the tests I wrote the path of the examples that ran as
test in a file prev and after the change to validate that the same number of
examples got executed
Documentation
I could not find documentation mentioning the old label used so I didn't add
it. If you can point me to where I should add it I am happy to write something
about it.