opensearch-project / opensearch-build-libraries

Apache License 2.0
6 stars 25 forks source link

Handle head git ref not found error in gradle-check #485

Closed rishabh6788 closed 1 month ago

rishabh6788 commented 2 months ago

Description

When a user does multiple force push on a PR the head git ref sha is changed and the previous sha no longer exists on the head branch. This causes gradle-check job to fail with error similar to fatal: reference is not a tree: f6691d4af253fb5507a969edf04479b132717c7d. Ideally in this case the job should just abort if git ref is not found. This PR adds logic to handle such cases.

Issues Resolved

#2292

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. For more information on following Developer Certificate of Origin and signing off your commits, please check here.

rishabh6788 commented 2 months ago

@peterzhuamazon @prudhvigodithi Let me know if this works.

codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 84.32%. Comparing base (f0eeaff) to head (0e7c61d).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #485 +/- ## ========================================= Coverage 84.32% 84.32% Complexity 80 80 ========================================= Files 108 108 Lines 523 523 Branches 61 61 ========================================= Hits 441 441 Misses 26 26 Partials 56 56 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.