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

depends_on randomly ignored #200

Closed
alexef opened this issue May 20, 2021 · 7 comments
Closed

depends_on randomly ignored #200

alexef opened this issue May 20, 2021 · 7 comments

Comments

@alexef
Copy link
Contributor

alexef commented May 20, 2021

I have a repo with 3 pipelines:

- .drone/build.yml
- .drone/test.yml
- .drone/deploy.yml

the deploy.yml contains:

depends_on:
- build
- test

this works as expected most of the times, in the sense that:

  • deploy waits for both build and test pipelines to finish successfully before starting

some times, randomly, when build fails in a stage in the middle, and test succeeds, deploy is triggered and executes. Why would that happen?

Attaching a couple of screenshots:
Screenshot 2021-05-20 at 17 11 48
Screenshot 2021-05-20 at 17 11 40

@laszlocph
Copy link
Member

This is a bug if it happens. There are a bunch of tests related to the depends_on and triggers (https://github.com/laszlocph/woodpecker/pull/32/files#diff-6d89f3729b326d59c411ba1c2c00c4750b3b60f840d2778307e49012f8c9439f) Will try to see if your case is covered in there, and if I can repro the issue.

This sounds serious, so I will spend a couple of hours with it tomorrow.

laszlocph added a commit that referenced this issue May 21, 2021
@laszlocph
Copy link
Member

laszlocph commented May 21, 2021

Made two tests: one trivial and one multithreaded for your case.
They both pass.

Can you verify if it matches your case: 3849d1e

I will try to come up with more extreme theories/testcases

UPDATE: actually I think I see some nondeterministic behavior in the multithreaded test.

@alexef
Copy link
Contributor Author

alexef commented May 25, 2021

Today we had another occurrence of this issue:
Screenshot 2021-05-25 at 13 38 56

If it helps, this time the failing step was part of a group that ran in parallel, this is why you seen green steps afterwards.

@laszlocph
Copy link
Member

A potential fix was merged and released in https://github.com/laszlocph/woodpecker/releases/tag/v0.14.0-rc.1

Basically if a pipeline depended on more than one pipeline, only the first pipeline outcome was regarded. This could explain your case, but best would be if you come back with a some stats after using it for a week or two.

@alexef
Copy link
Contributor Author

alexef commented May 25, 2021

will deploy it now and report back

@alexef
Copy link
Contributor Author

alexef commented Jun 2, 2021

running 14.rc for 8 days now, we didn't see new occurrences, I believe we can close this

@laszlocph
Copy link
Member

Thank god.

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

No branches or pull requests

2 participants