-
Notifications
You must be signed in to change notification settings - Fork 324
New validations workflow
The new workflow (hereafter called "validations v2") removed the bottleneck of cloning the entire repository (that, as of writing, takes ~15 minutes) on Github Actions to run a validation on a forecast added as part of a PR. The new workflow now takes ~1 minute to run completely on a PR with a single forecast file change.
The following steps explain the new workflow.
- Clone only the validations code present in the validations repository.
- Run the script
main.py
that does the following -- Download all the changed files in the PR into a temporary
forecasts
directory. - Segregate all files changed into forecast files, metadata files, and other files.
- Add appropriate labels to the PR based on the files changed. Details are available in the labels section.
- Run forecast validations on forecast files. Details on the data format is present here and on the validations, here.
- Run metadata validations on metadata files.
- If any errors occur during forecast/metadata validations, fail the PR and add a comment specifying that there were validation errors.
- If no errors, dont add any comment, and the tick mark indicates that everything looks good.
- Download all the changed files in the PR into a temporary
The following labels are added by the validation run based on some logic explained for each label. Also, note that it is possible that multiple labels could be eligible to be added to a PR.
-
data-submission
: This label is added when there's any change in thedata-processed
folder. This includes additions/deletions/updations. Note: This is added only when all the PR changes are in thedata-processed
folder. -
forecast-updated
: This label is added when an existing forecast in thedata-processed
folder is updated/deleted. -
metadata-change
: This label is added to a PR when an existing metadata file is updated or a new metadata file is added to the repository. -
other-files-updated
: This label is added to PRs that have added/updated valid forecasts and also include changes in other directories as well. For example, a PR has added a new forecast into their model folder and added another file,test.txt
, to the root of the repository. Note: This label will not be added if the PR has no valid forecast added. The intent of adding this label is to indicate when valid forecasts accidentally add files in other places. -
code
- This label is added when there are any changes made in thecode
folder of the repository. -
viz
- This label is added when there are any changes made in thevisualization
folder of the repository.
The rollout plan for this new flow is that we would be running both, the old validation (named Node.js CI
on the Checks tab). The validations v2 flow would also run in parallel with Node.js CI build but will not contribute to the PR builds failure/success. But, this new flow will add appropriate PR comments to the PR.
During this transition phase, we would be using the old PR validation flow (Node.js CI flow) solely for deciding whether a PR is merged to master
.
The tick or the cross mark on the PR would be governed by the old validations' success/failure, although there might be chances when this would not happen (if there was a programming error in the run of the v2 flow). Hence, please make sure you see that there is a tick mark on the Node.js CI build line on the PR page.
For example - In this case, check the cross mark next to the Node.js CI
line as indicated in the image below means that validations failed, regardless of the fact that the validations v2
build shows a tick mark.
- Home
- Submitting Forecasts
- Data Validation
- Truth Data
- Baseline model
- Weekly ensemble release
- Developer