Repository navigation
[ci] Fix repo stats workflow script path - #122
Open
roberttidball wants to merge 2 commits into
Open
roberttidball wants to merge 2 commits into
roberttidball wants to merge 2 commits into
Conversation
The workflow called scripts/update_repo_stats.py, but the script lives in .github/scripts/, so every scheduled run failed with "No such file or directory".
|
已收到
|
scripts/requirements.txt does not exist, so the job always took the fallback branch and installed unpinned requests and matplotlib, which allows setup scripts to run. Install pinned versions from wheels only.
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Description
.github/workflows/repo-stats.ymlrunspython scripts/update_repo_stats.py, but the script is at.github/scripts/update_repo_stats.py. This changes the path in the workflow.It also pins the job's two dependencies and installs them from wheels only.
scripts/requirements.txtdoes not exist, so the job always fell through topip install requests matplotlibwith no versions, which SonarCloud flags (S8541, S8544) because it can run setup scripts and lets versions drift.requests==2.34.2andmatplotlib==3.10.7both have Python 3.10 wheels and no open advisories.Motivation and Context
The scheduled "Repository Statistics Update" job has failed on every run since it was added in 0b55e47, at the "Update repository statistics" step:
Two things worth checking on your side, which a PR cannot change:
secrets.SECRET_TOKENto the script. If that secret is not set, the stats API calls will be unauthenticated. The traffic endpoints need a token with push access.fatal: No url found for submodule path 'pyfunds/funds' in .gitmodules. It does not fail the job, butpyfunds/fundsis recorded as a submodule without a matching.gitmodulesentry.How Has This Been Tested?
pytest Qbot/tests/test_all_pipeline.pyunder upper directory of/..github/scripts/update_repo_stats.pyexists onmainand accepts the--token,--repoand--stats-dirarguments the workflow passes. The job can be run withworkflow_dispatchafter merge to confirm.Types of changes