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

Stages - teardown job is triggered even if all other jobs are not finished #3176

Open
kumada626 opened this issue Aug 23, 2024 · 2 comments
Open
Assignees
Milestone

Comments

@kumada626
Copy link
Contributor

What happened:
Stage teardown job is triggered soon after one of a last job in the stage is finished even if there is a running job in that stage.
In the following pipeline, stage@sandbox:teardown job is triggered after sandbox-e2e-test finishes while sandbox-test is still running.
スクリーンショット 2024-08-23 14 06 28

What you expected to happen:
Teardown job should be triggered after all other jobs in the stage are finished.

How to reproduce it:

  1. provide a pipeline that has following screwdriver.yaml.
shared:
  image: node:20
  steps:
    - test: echo 'test'
 
stages:
  sandbox:
    requires: [ ~commit ]
    description: Deploy sandbox and test
    jobs: [ sandbox-deploy, sandbox-e2e-test, sandbox-test ]
    teardown:
      steps:
        - init: echo 'sandbox teardown'
 
jobs:
  sandbox-deploy:
    description: empty
  sandbox-e2e-test:
    requires: [ sandbox-deploy ]
  sandbox-test:
    requires: [ sandbox-deploy ]
    steps:
      - sleep: sleep 60
  1. start this pipeline.
  2. stage@sandbox:teardown job is triggered before sandbox-test job is finished.
@kumada626
Copy link
Contributor Author

@VonnyJap I check this behavior on current OSS-SD(API v7.0.188) and still occurs this bug. Like below screenshot, stage@sandbox:teardown job is triggered after stage@sandbox:sandbox-e2e-test is finished even if stage@sandbox:sandbox-test still running.
スクリーンショット 2024-09-06 15 38 23
If stage@sandbox:sandbox-e2e-test is failed, stage@sandbox:teardown correctly triggered after stage@sandbox:sandbox-test is finished. So I think this issue is caused when a job triggering teardown job is success.

@VonnyJap
Copy link
Member

VonnyJap commented Oct 2, 2024

@tkyi - Could you help investigate why the teardown is being triggered even though not all upstream jobs have completed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Verify
Development

No branches or pull requests

3 participants