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

Workflow enhancement to handle Git failures #4806

Merged
merged 1 commit into from
Oct 20, 2023

Conversation

KapilPowar
Copy link
Contributor

@KapilPowar KapilPowar commented Oct 11, 2023

runtimes/backlog/issues/1184

Update test workflow to handle Git failures.

  • fixes issue of corrupted git directory resulting in test failure

Signed-off-by: Kapil Powar [email protected]

CC: @llxia

@KapilPowar
Copy link
Contributor Author

Here are test runs for the changes
Grinder #1635
Grinder #1636

@KapilPowar KapilPowar requested a review from jdekonin October 13, 2023 09:30
@KapilPowar KapilPowar marked this pull request as ready for review October 13, 2023 09:30
Copy link
Contributor

@llxia llxia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@llxia
Copy link
Contributor

llxia commented Oct 13, 2023

FYI @AdamBrousseau @pshipton

@AdamBrousseau
Copy link
Contributor

I would recommend a better commit comment. You have linked to an internal IBM issue which nobody outside of IBM will be able to see. Your commit comment should explain what you're changing and why. This repo has a contributing.md (here). I try to follow, and by default I direct people to OpenJ9's guidelines on commit comments. You will thank yourself later when you're scrolling through the history trying to track down a change.

- fixes issue of corrupted git directory resulting in test failure
@KapilPowar KapilPowar changed the title Workflow enhancement Workflow enhancement to handle Git failures Oct 18, 2023
Copy link
Contributor

@AdamBrousseau AdamBrousseau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this only handle the issue where the .git dir is missing? I was originally thinking it would cover all cases where the git update fails.

@llxia
Copy link
Contributor

llxia commented Oct 19, 2023

This PR will check the first git cmd, that is git rev-parse HEAD. If this cmd does not run successfully (regardless of the error), the program will delete the test dir and re-clone. This should cover most of the cases that we have seen so far.
However, it will not catch the case where it fails at later git cmd.

I think we should get this change in to ease the problems. Meanwhile, working on a solution to handle all git cases. To be honest, I think we should re-write the logic in this file.

btw, If the material is in a bad state (i.e., jenkins user cannot delete the material), there is not much we can do.

Copy link
Contributor

@LongyuZhang LongyuZhang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@LongyuZhang LongyuZhang merged commit eb0e87f into adoptium:master Oct 20, 2023
@KapilPowar KapilPowar deleted the GIT_workflow branch November 22, 2023 05:32
llxia pushed a commit to llxia/aqa-tests that referenced this pull request Nov 22, 2023
- fixes issue of corrupted git directory resulting in test failure

Co-authored-by: Kapil Powar <[email protected]>
llxia pushed a commit to llxia/aqa-tests that referenced this pull request Nov 22, 2023
- fixes issue of corrupted git directory resulting in test failure

Co-authored-by: Kapil Powar <[email protected]>
pshipton pushed a commit that referenced this pull request Nov 22, 2023
- fixes issue of corrupted git directory resulting in test failure

Co-authored-by: Kapil Powar <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants