strider-github icon indicating copy to clipboard operation
strider-github copied to clipboard

Tests of master gets triggered while a pr check is running

Open phiros opened this issue 10 years ago • 7 comments

When running a PR job it can happen that in parallel someone merges changes to master. This triggers a job start on the master branch while the PR job is still running. bug2

In addition to this (unexpected) behavior the output of the PR job becomes unavailable (just a black field is displayed where previously the test output was displayed; like a job which is scheduled but did not run yet) as strider assumes the latest (the master job) is the only active job. bug

Observed with the latest version of strider + the docker-runner, the strider-github and the strider-custom plugins. I think I observed this bug because the tests I run can take a long time to finish (compiling a large C code base).

phiros avatar Jul 01 '15 19:07 phiros

Is this related to Strider-CD/strider#745?

knownasilya avatar Jul 01 '15 20:07 knownasilya

Just checked the logs, doesn't seem to be related to Strider-CD/strider#745 (I greped for 'TypeError', 'died' and 'error'; couldn't find any of these terms in the log). I think this Bug is only related to the code in the github plugin (either this or something in strider itself). Also: I've noticed this behavior several times and only in the described constellation (e.g. a PR job is running and somebody merges something to the master branch).

phiros avatar Jul 01 '15 20:07 phiros

Also noteworthy: I just observed that as soon as the merge/master job is done other jobs are getting processed (regardless of being a PR job or a merge/master job). The whole having two jobs running situation only stops when the original PR job (the job which ran before the merge/master job) job stops. After the original PR job stopped I was able to access its output (like for any other finished job)

phiros avatar Jul 01 '15 20:07 phiros

And another one: I now noticed a situation in which three PR jobs run concurrently which is kind of bad for what I am doing since each job uses large amounts of CPU time and hard disk space... All of the jobs are PR jobs now: bildschirmfoto vom 2015-07-01 23 59 39

phiros avatar Jul 01 '15 22:07 phiros

Interesting, so the PR is handled differently then the commit. Sounds like something here: https://github.com/Strider-CD/strider-github/blob/master/lib/webhooks.js#L82

knownasilya avatar Jul 01 '15 22:07 knownasilya

Hmm, maybe. However, what irritates me is that in the end they both just send out the "job.prepare" event and in the simple runner there is just one queue associated with each project (if I am not mistaken).... Maybe there is a problem with the handling of the job.prepare event?

phiros avatar Jul 02 '15 15:07 phiros

Very possible. Could you have a look, I'm currently roadtripping.

knownasilya avatar Jul 02 '15 15:07 knownasilya