Avoid an infinite loop when git commands fail to execute when Changesets try to retrieve commits that added files - #584
Conversation
…ets try to retrieve commits that added files
🦋 Changeset detectedLatest commit: 8ac0acd The changes in this PR will be included in the next version bump. This PR includes changesets to release 6 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
I will address the failing tests later - I don't think this should block the potential PR approval though (unless you think otherwise). |
emmatown
left a comment
There was a problem hiding this comment.
Could you add the command that was run to the error that is thrown?
We've explicitly intended to support running Changesets without git and the tests failing seem like they would break that? |
Sure thing.
That's interesting - because the original report was stating that the infinite loop has been caused by the lack of git in the container but that would mean that our tests would not be able to complete before this change here. So there has to be some additional thing about the setup of the reporter. Gonna try to investigate this later. |
I ran into this infinite loop with no error printed in a GitHub Workflow when I ran Steps to reproduce locally: First, do a shallow clone Then, remove github credentials
Then run |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #584 +/- ##
==========================================
- Coverage 85.51% 85.49% -0.03%
==========================================
Files 70 70
Lines 2548 2550 +2
Branches 686 688 +2
==========================================
+ Hits 2179 2180 +1
- Misses 338 339 +1
Partials 31 31 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
I believe #1045 may be the solution to the core problem |
bluwy
left a comment
There was a problem hiding this comment.
I went ahead and revert some non-0 handling since it's impossible for them to return non-0. @Andarist can you check the code again?
Honestly, not really happy with the git functions, some doesn't error and returns a boolean, some throws an error, some does a console.log. Argument format is also a bit sporadic. But I don't really want to change those for now.
|
I agree this package isn't particularly consistent - it woul be nice to clean it up some time later. |
This addresses the direct problem in #571 . We need to investigate the issue more to address the core of the problem though.
fix #571