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

Resume build to include UNSTABLE and ABORTED jobs #88

Merged
merged 1 commit into from
Jan 28, 2016
Merged

Resume build to include UNSTABLE and ABORTED jobs #88

merged 1 commit into from
Jan 28, 2016

Conversation

dcendents
Copy link
Contributor

Hi,

I have adapted the resume build feature (#73) to include any job which did not result in SUCCESS. Previously it would only rebuild FAILED jobs and link to the previous build for UNSTABLE or ABORTED jobs.

@sshelomentsev: I'd appreciate if you can review the modifications I have made

Thanks

@jenkinsadmin
Copy link
Member

Thank you for this pull request! Please check this document for how the Jenkins project handles pull requests.

@sshelomentsev
Copy link

@dcendents
Yes, this is fine.

shacharbz added a commit that referenced this pull request Jan 28, 2016
Resume build to include UNSTABLE and ABORTED jobs
@shacharbz shacharbz merged commit 77cf915 into jenkinsci:master Jan 28, 2016
@dcendents
Copy link
Contributor Author

Thanks

@emoshaya
Copy link

emoshaya commented Feb 3, 2016

Hi The overall build below is red because child job Update Services - Cucumber Tests is red. I expected resuming this build will resume from the unstable or red child jobs. However, resuming this build restarts the build from the first Multijob phase API Gateway - Maven Build...

screenshot

@dcendents
Copy link
Contributor Author

It does restart from the beginning, after all this is a new build of the multijob project, but it should not re-run successful items of the build.

e.g.:

Multijob build 1 --> FAILED
Project A build 1 --> SUCCESS
Project B build 1 --> SUCCESS
Project C build 1 --> UNSTABLE
Project D build 1 --> FAILED

If you resume this build you should expect to see

Multijob build 2 --> new build
Project A build 1 --> links to successful run 1
Project B build 1 --> links to successful run 1
Project C build 2 --> new run
Project D build 2 --> new run

Hopes this males sense

@emoshaya
Copy link

emoshaya commented Feb 3, 2016

@dcendents my point is if you see the screenshot, it's restarting all the green builds when I click on resume. so when I hit resume, it builds API Gateway - Maven job again even though it was already green. I expected it to resume at Update Services - Cucumber Tests

@dcendents
Copy link
Contributor Author

@emoshaya-cognito I tried to explain that the resume functionality will not jump over the green builds. But it should not trigger a new build of the green project but simply link to that green build, thus effectively skipping it.

I don't know how else to explain it.

Multijob build started
start item 1 -> 5 minutes SUCCESS
start item 2 -> 5 minutes SUCCESS
start item 3 -> 5 minutes UNSTABLE
start item 4 -> 5 minutes SUCCESS
start item 5 -> 5 minutes FAILED
total build time = 25 minutes (all builds sequential)

Resume that build:
link to item 1 SUCCESS build -> 0 minutes
link to item 2 SUCCESS build -> 0 minutes
start item 3 -> 5 minutes
link to item 4 SUCCESS build -> 0 minutes
start item 5 -> 5 minutes

This time the build will only take 10 minutes, re-running 3 and 5 only, but you will still see 1, 2 and 4 as if they were actually run, but they didn't.

If you want a different behavior, feel free to implement it and submit a pull request, but please don't break the current behavior for the rest of us as this is how we actually want it.

@emoshaya
Copy link

emoshaya commented Feb 3, 2016

I'm trying to tell you it's not skipping the green builds it's starting them up again....

@dcendents
Copy link
Contributor Author

then I don't know, version 1.20 was working fine for me, except it would not restart UNSTABLE builds, hence my PR.

Note that this PR has been merged but it is not released yet, so you will need to build it yourself and install it manually in jenkins.

@emoshaya
Copy link

emoshaya commented Feb 3, 2016

will there be a way to not resume from unstable builds only from failed or aborted builds? I only ask because we have a known unstable build that we don't really want to resume from again i.e. known test failures.

@dcendents
Copy link
Contributor Author

no there isn't, the goal to resume a build is to make it stable, so it will re-run unstable jobs as well

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

Successfully merging this pull request may close these issues.

None yet

5 participants