Skip to content
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

Validator to provide error message when a job in a stage is triggered by jobs outside of the stage #3102

Closed
VonnyJap opened this issue Apr 28, 2024 · 2 comments
Assignees
Labels
pipeline-stages subtask issue that is categorized as subtask of another issue
Milestone

Comments

@VonnyJap
Copy link
Member

What happened:

A stage can be initiated by a job outside a stage, allowing a setup job within the stage to be externally triggered. However, a job included in a stage can only be triggered by other jobs within that same stage. Currently, if a user configures a job within the stage to be triggered externally, the validator does not flag an error.

What you expected to happen:

The validator should generate an error when users configure a job within a stage to be triggered by jobs outside of that stage.

How to reproduce it:

When configuring a stage with a job triggered by other jobs outside of the stage, no error is raised for the user until a pipeline execution is initiated.

@tkyi
Copy link
Member

tkyi commented May 21, 2024

verified in this build: https://beta.cd.screwdriver.cd/pipelines/17908/builds/167161/steps/config-parse-error

18:00:34 $ echo 'Error: backend job has invalid requires: ~acceptance-tests,~promotion-230899,~promotion-1010409. Triggers must be jobs from testing stage.
18:00:34 frontend job has invalid requires: ~acceptance-tests,~promotion-230899,~promotion-1010409. Triggers must be jobs from testing stage.
18:00:34 http-testapp job has invalid requires: ~acceptance-tests,~promotion-230899,~promotion-1010409. Triggers must be jobs from testing stage.
18:00:34 mtls-app job has invalid requires: ~acceptance-tests,~promotion-230899,~promotion-1010409. Triggers must be jobs from testing stage.
18:00:34 role-cert-backend job has invalid requires: ~acceptance-tests,~promotion-230899,~promotion-1010409. Triggers must be jobs from testing stage.
18:00:34 simple-grpc job has invalid requires: ~acceptance-tests,~promotion-230899,~promotion-1010409. Triggers must be jobs from testing stage.
18:00:34 skip-jwt-backend job has invalid requires: ~acceptance-tests,~promotion-230899,~promotion-1010409. Triggers must be jobs from testing stage.
18:00:34 test-app-backend job has invalid requires: ~acceptance-tests,~promotion-230899,~promotion-1010409. Triggers must be jobs from testing stage.
18:00:34 test-app-frontend job has invalid requires: ~acceptance-tests,~promotion-230899,~promotion-1010409. Triggers must be jobs from testing stage.
18:00:34 test-app-trustrole job has invalid requires: ~acceptance-tests,~promotion-230899,~promotion-1010409. Triggers must be jobs from testing stage.
18:00:34 trigger-acceptancetest-monorepo job has invalid requires: ~acceptance-tests,~promotion-230899,~promotion-1010409. Triggers must be jobs from testing stage.'; exit 1
18:00:34 Error: backend job has invalid requires: ~acceptance-tests,~promotion-230899,~promotion-1010409. Triggers must be jobs from testing stage.
18:00:34 frontend job has invalid requires: ~acceptance-tests,~promotion-230899,~promotion-1010409. Triggers must be jobs from testing stage.
18:00:34 http-testapp job has invalid requires: ~acceptance-tests,~promotion-230899,~promotion-1010409. Triggers must be jobs from testing stage.
18:00:34 mtls-app job has invalid requires: ~acceptance-tests,~promotion-230899,~promotion-1010409. Triggers must be jobs from testing stage.
18:00:34 role-cert-backend job has invalid requires: ~acceptance-tests,~promotion-230899,~promotion-1010409. Triggers must be jobs from testing stage.
18:00:34 simple-grpc job has invalid requires: ~acceptance-tests,~promotion-230899,~promotion-1010409. Triggers must be jobs from testing stage.
18:00:34 skip-jwt-backend job has invalid requires: ~acceptance-tests,~promotion-230899,~promotion-1010409. Triggers must be jobs from testing stage.
18:00:34 test-app-backend job has invalid requires: ~acceptance-tests,~promotion-230899,~promotion-1010409. Triggers must be jobs from testing stage.
18:00:34 test-app-frontend job has invalid requires: ~acceptance-tests,~promotion-230899,~promotion-1010409. Triggers must be jobs from testing stage.
18:00:34 test-app-trustrole job has invalid requires: ~acceptance-tests,~promotion-230899,~promotion-1010409. Triggers must be jobs from testing stage.
18:00:34 trigger-acceptancetest-monorepo job has invalid requires: ~acceptance-tests,~promotion-230899,~promotion-1010409. Triggers must be jobs from testing stage.

@tkyi tkyi closed this as completed May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pipeline-stages subtask issue that is categorized as subtask of another issue
Projects
Development

No branches or pull requests

2 participants