codeql-action/init should explicitly delete an already present database (for self-hosted runners)
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- github-actions, typescript
Research direction
Start at the codeql-action/init entry point and trace how the --overwrite option handles the database path shown in the reported database,init invocation. Reproduce the self-hosted runner failure if possible and determine the existing-directory conditions that trigger it. Done means init handles the reported workspace without requiring an external cleanup step, with behavior verified for the described scenario.
Written by the indexing model from the issue text.
Description
We are running CodeQL as an action on self-hosted runners and have enabled the 'over-write' option to clean the CodeQL database before each run.
However, some environments fail with the following message:
Failure invoking /__w/_tool/CodeQL/2.13.3-20230524/x64/codeql/codeql with arguments database,init,--db-cluster,/__w/_temp/codeql_databases,--source-root=/__w/a1_aggregation_mtf/a1_aggregation_mtf,--language=java,--begin-tracing,--trace-process-name=Runner.Worker.exe,--codescanning-config=/__w/_temp/user-config.yaml,--overwrite.
Exit code 2 and error was:
A fatal error occurred: Ran with database overwriting enabled, but the directory does not appear to be a CodeQL database or database cluster. Please check you do indeed wish to delete it, and do so manually.
As suggested in the error message, we can manually delete the directory, allowing for a successful run.
We do not understand what is causing CodeQL to believe the directory is not a CodeQL database. We are not explicitly altering the contents or structure. As the directories involved are created by CodeQL within the workflow, the hope is to have CodeQL able to clean up it's workspace from within the workflow as well.
Ideally, we want to avoid having to implement an external cleanup step for the process.
We are curious to see what logic is being used to determine the 'CodeQL database' status of the targeted directory.
Regards,
Richard Seeton
- Dominant language
- TypeScript
- Stars
- 1.6k
- Forks
- 493
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 44
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from github/codeql-action
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
github/codeql-action#4052 · 4 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
github/codeql-action#4078 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
github/codeql-action#4008 · 9 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 52/100
github/codeql-action#3978 · 4 comments · 1 reaction ·
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
github/codeql-action#3915 · 6 comments · 3 reactions ·
All issues in github/codeql-action
Similar issues
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
dennys-bd/agent-hive#184 ·
-
Add: hunch Open
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
AbdelStark/awesome-typesafe#104 ·
-
ai-observability bug team/ai-observability
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
vicharanashala/fln#563 ·