-
Notifications
You must be signed in to change notification settings - Fork 963
fix(scc): skip analysis gracefully when repo path missing #3572
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
base: main
Are you sure you want to change the base?
Conversation
Fixes chaoss#3459 Signed-off-by: ANJAN672 <rockyanjan672@gmail.com>
Signed-off-by: ANJAN672 <rockyanjan672@gmail.com>
|
@ANJAN672 path used in this file https://github.com/chaoss/augur/blob/main/augur/tasks/git/scc_value_tasks/core.py |
|
Sure @iGufrankhan |
|
Thanks for the contribution @ANJAN672. That's a good suggestion @iGufrankhan . Can you make this a draft PR @ANJAN672 while you debug the issue? Maybe we can continue the discussion in the linked issue. |
|
@iGufrankhan , @shlokgilda Path used in SCC (
Path created in Facade (
Root Cause: Race Condition The problem is timing between tasks. When the Facade task runs:
Meanwhile, the SCC task sees the database record and tries to run, but the clone isn't finished yet. So Proposed Solution My current fix handles the symptom (skip gracefully if path missing). To address the root cause, I can also add a check for Let me know if you'd like me to implement that additional check! |
This comment was marked as spam.
This comment was marked as spam.
|
this sounds like it may be some kind of task sequencing issue. it sounds like the clone task and the SCC analysis task are set up in a group, or some other kind of celery structure that runs in parallel. which, as you point out, seems to cause a race condition depending on the speed of the clone. I know facade has some extra status values to indicate the progress of the clone. |
Fixes #3459
Description
When the repository path does not exist (e.g., repo not cloned yet), the scc tool outputs a plain-text error instead of JSON, causing
json.loads()to fail.This fix adds a path existence check before running scc. If the path doesn't exist, the task logs a warning and returns gracefully instead of failing.
Notes for Reviewers
Signed commits