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

Pipeline with stage job having stage itself in 'requires' redirects the user to 404 page #3118

Closed
sagar1312 opened this issue May 10, 2024 · 1 comment

Comments

@sagar1312
Copy link
Member

sagar1312 commented May 10, 2024

What happened:
When a stage job has stage itself in the requires, the workflow graph is generated and persisted that contains an invalid node.
When user visits the pipeline landing page, endpoints to get pipeline (/v4/pipelines/14178) and recent events (v4/pipelines/14178/events?count=5&page=1) returns http error 500. UI redirects the user to 404 page.

P.S.
Even after the screwdriver.yaml has been fixed, the endpoint to fetch events continue to return error 500 as long as the event with invalid node is part of the response.

Sample pipeline --> https://cd.screwdriver.cd/pipelines/14178 has below invalid node in the worflowgraph

      {
        "name": "triggering-stage"
      }
image

What you expected to happen:
Config parser should validate the config and capture the error. API should never persist the workflow graph with invalid node in pipelines or events table in DB.

How to reproduce it:
Sample pipeline --> https://cd.screwdriver.cd/pipelines/14178

screwdriver.yaml

shared:
    image: node:20
    steps:
        - init: echo 'init'
jobs:
    triggering-stage:
        requires: [~pr, ~commit]
    ci-deploy:
        requires: [ ~stage@integration ]
    ci-test:
        requires: [ ci-deploy ]
    ci-certify:
        requires: [ ci-test-batch-1, ci-test-batch-2 ]
    triggered-by-stage:
        requires: [ ~stage@integration ]

stages:
    integration:
        requires: [triggering-stage]
        jobs: [ci-deploy, ci-test, ci-certify]
        description: "This stage will deploy the latest application to CI environment and certifies it after the tests are passed."
@tkyi
Copy link
Member

tkyi commented Aug 5, 2024

Screenshot 2024-08-05 at 4 07 01 PM Should be addressed

@tkyi tkyi closed this as completed Aug 5, 2024
@github-project-automation github-project-automation bot moved this from Doing to Done in Active Work - Beta Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

3 participants