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

Always Clean Workspace after build #567

Merged
merged 1 commit into from
Sep 21, 2018

Conversation

AdamBrousseau
Copy link
Contributor

  • Wrap all steps in try/finally.
  • Move CleanWs to finally block.
  • This ensures CleanWs always runs even if
    the build has failed a step.
  • This also reverts Update cleanWS logic #320 which stopped the
    clean from running if the build failed.
  • Proper archiving should ensure we don't need
    to leave workspaces around for test failure
    investigation.

Signed-off-by: Adam Brousseau adam.brousseau88@gmail.com

@AdamBrousseau
Copy link
Contributor Author

Marking as WIP to give time for discussion.
@llxia @sophia-guo @ShelleyLambert

@karianna karianna added this to TODO in aqa-tests via automation Sep 19, 2018
@karianna karianna moved this from TODO to QA / Review in aqa-tests Sep 19, 2018
@sophia-guo
Copy link
Contributor

sophia-guo commented Sep 19, 2018

In general if test fails the build status is unstable. The fail status happens only when there is issue about jenkins step( or other wrapped command, or test exits unexpected). In those situation it would be easy to debug the issue if workspace is kept.

@AdamBrousseau
Copy link
Contributor Author

AdamBrousseau commented Sep 19, 2018

I agree with your first 2 sentences. I'm not sure I see the value the workspace will provide in the cases where a test has failed hard. The situations I can think of when a hard failure will occur:

  • Timeout
  • Build aborted
  • Machine config issue
  • Network issue

Unless I'm missing a use case, I don't see the value in keeping or archiving the workspace in any of these. Maybe there's a case where a failed test will actually cause the test harness to fall over?

The issue I'm trying to solve is machines running out of space because test workspaces getting left behind.

- Wrap all steps in try/finally.
- Move CleanWs to finally block.
- Wrap clean in an IF that skips clean if KEEP_WORKSPACE
  is set to true
- This ensures CleanWs always runs even if
  the build has failed a step.
- This also reverts adoptium#320 which stopped the
  clean from running if the build failed.
- Proper archiving should ensure we don't need
  to leave workspaces around for test failure
  investigation.

Signed-off-by: Adam Brousseau <adam.brousseau88@gmail.com>
@llxia
Copy link
Contributor

llxia commented Sep 20, 2018

I would suggest to have a flag added in finally block, so that we can turn on and off to fit different needs.

@AdamBrousseau
Copy link
Contributor Author

Updated with KEEP_WORKSPACE

@AdamBrousseau AdamBrousseau changed the title WIP: Always Clean Workspace after build Always Clean Workspace after build Sep 20, 2018
@karianna karianna merged commit 95a4066 into adoptium:master Sep 21, 2018
aqa-tests automation moved this from QA / Review to Done Sep 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
aqa-tests
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

4 participants