Add 'disabled' field to IntegrationTestScenario spec#1502
Conversation
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1502 +/- ##
===========================================
- Coverage 65.12% 42.22% -22.91%
===========================================
Files 56 53 -3
Lines 7722 7335 -387
===========================================
- Hits 5029 3097 -1932
- Misses 2085 3738 +1653
+ Partials 608 500 -108
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
416c539 to
1799378
Compare
|
/ok-to-test |
|
The go linter issue will be fixed by #1511 |
|
The code looks good to me. And need a rebase after merging #1511. Thanks! |
|
/retest |
1799378 to
305475f
Compare
|
@hongweiliu17 @kasemAlem I will wait for #1511 to be merged and then rebase this one. Thank you for looking into it! |
|
/retest |
Add a boolean 'disabled' field to the IntegrationTestScenarioSpec that allows users to skip a scenario without deleting it. When set to true, the scenario is filtered out before any context matching occurs. This provides a first-class mechanism to temporarily disable integration tests, replacing the workaround of using unrecognized context names. Closes konflux-ci#1501 Signed-off-by: Jose Angel Morena <jmorenas@redhat.com>
305475f to
ead23ae
Compare
There is currently no first-class way to disable an
IntegrationTestScenariowithout deleting the resource. Users who want to temporarily disable a test must either remove the ITS entirely or rely on workarounds such as setting a non-matching context name (e.g.disabled), which depends on the fallthroughreturn falseinIsContextValidForSnapshot:https://github.com/konflux-ci/integration-service/blob/main/gitops/snapshot.go#L1233
While this works, it is not explicit and relies on implementation details.
Adding a field like
spec.disabledwould make the intent clear and improve operability. This pattern is common in Kubernetes APIs (e.g.CronJob.spec.suspend) to temporarily stop executions without deleting or modifying the resource configuration. It would also be discoverable viakubectl explain, making the behavior clearer to users.Example
An
IntegrationTestScenariocould be temporarily disabled by settingspec.disabled: true:When
spec.disabledis set totrue, the Integration Service ignores the scenario during snapshot evaluation. Setting it back tofalse(or omitting the field) re-enables it without deleting or modifying contexts.Summary
disabledboolean field toIntegrationTestScenarioSpec(default:false)disabled: true, the scenario is skipped inIsScenarioApplicableToSnapshotsContextbefore context matchingMotivation
Currently there is no official way to disable an ITS without deleting it. Users resort to workarounds such as using unrecognized context names (e.g.
disabled), which rely on the fallthroughreturn falseinIsContextValidForSnapshot.A dedicated
disabledfield makes this behavior explicit and easier to operate.Test plan
Closes #1501