Skip to content

Graceful cancel fix - #137

Merged
Shashankss1205 merged 4 commits into
CodeGraphContext:mainfrom
sreeja-code-dev:graceful-cancel-fix
Oct 2, 2025
Merged

Shashankss1205 merged 4 commits into
CodeGraphContext:mainfrom
sreeja-code-dev:graceful-cancel-fix

Conversation

@sreeja-code-dev

Copy link
Copy Markdown
Contributor

Fixes #13 — Ensures that if a repo is deleted during indexing, the job is gracefully cancelled instead of failing abruptly.

1)Checks error message for deletion indicators ("no such file", "deleted", "not found")

2)Updates job status to CANCELLED if deletion is detected

3)Preserves error logs for transparency and debugging

Labels: Hacktoberfest25 bug good first issue

@vercel

vercel Bot commented Sep 30, 2025

Copy link
Copy Markdown

@sreeja-code-dev is attempting to deploy a commit to the shashankss1205's projects Team on Vercel.

A member of the Team first needs to authorize it.

@sreeja-code-dev

Copy link
Copy Markdown
Contributor Author

there is a little conflict in the code I am working on . I will raise the pull request again after resolving .

@sreeja-code-dev

Copy link
Copy Markdown
Contributor Author

Last commit attempted with the updated python file is final change.
Best,
Sreeja

@Shashankss1205

Copy link
Copy Markdown
Collaborator

Hey, can you add an image illustrating this change? I am quite unsure if it solves the actual issue discussed.

@sreeja-code-dev

Copy link
Copy Markdown
Contributor Author

Alright I will be adding an image illustration.

@sreeja-code-dev

Copy link
Copy Markdown
Contributor Author

IMG-20251001-WA0009

@sreeja-code-dev

Copy link
Copy Markdown
Contributor Author

The logic to address this deletion bug is now implemented in the 'build_graph_from_path_async'function's exception handler.

Here's the dedicated check:

if "no such file found" in error_message or "deleted" in error_message or "not found" in error_message:
    status=JobStatus.CANCELLED
else:
    status=JobStatus.FAILED

This ensures that if the source files are removed during the graph building process, the job manager correctly marks the job as "CANCELLED", providing accurate status tracking rather than a generic 'FAILED' status.

@Shashankss1205

Copy link
Copy Markdown
Collaborator

Hey, I am not talking of the visual explanation. We already are in production, can you test it out on a code editor and see if the results as expected? You can check out the demo video to see how to install the tool.

@sreeja-code-dev

Copy link
Copy Markdown
Contributor Author

Alright on it.

@sreeja-code-dev

Copy link
Copy Markdown
Contributor Author

IMG-20251001-WA0010
IMG-20251001-WA0011

@sreeja-code-dev

Copy link
Copy Markdown
Contributor Author

Worked with dummy data and the async def function worked properly with the changes made to the exception handling part.

@sreeja-code-dev

Copy link
Copy Markdown
Contributor Author

IMG-20251002-WA0005

@sreeja-code-dev

Copy link
Copy Markdown
Contributor Author

IMG-20251002-WA0006

@sreeja-code-dev

Copy link
Copy Markdown
Contributor Author

IMG-20251002-WA0006
IMG-20251002-WA0005

@Shashankss1205
Shashankss1205 merged commit 67b2847 into CodeGraphContext:main Oct 2, 2025
0 of 2 checks passed
@gitguardian

gitguardian Bot commented Oct 2, 2025

Copy link
Copy Markdown

⚠️ GitGuardian has uncovered 2 secrets following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

Since your pull request originates from a forked repository, GitGuardian is not able to associate the secrets uncovered with secret incidents on your GitGuardian dashboard.
Skipping this check run and merging your pull request will create secret incidents on your GitGuardian dashboard.

🔎 Detected hardcoded secrets in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
20788152 Triggered Neo4j Credentials 2fcb1f8 tests/conftest.py View secret
21343765 Triggered Generic Password 2fcb1f8 tests/sample_project/edge_cases/hardcoded_secrets.py View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secrets safely. Learn here the best practices.
  3. Revoke and rotate these secrets.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

psihius pushed a commit to psihius/CodeGraphContext that referenced this pull request Mar 24, 2026
macunha1 pushed a commit to macunha1/CodeGraphContext that referenced this pull request Jun 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: Deleting a repo, while being added needs a dedicated algo

2 participants