-
Notifications
You must be signed in to change notification settings - Fork 13
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
feat(openchallenges): add CI workflow for updating the DB dump files on a daily cadence #2489
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is cool stuff. I made a few comments to avoid stepping on the toes of other products being developed in Sage Monorepo.
An improvement would be to add steps to the workflow that check if a DB update PR already exists. If it does, the PR could be updated (preferred) or closed before opening a new one (more noise on the notification side).
Another "improvement" I have in mind would be to create an Nx project that enables developers to perform this task locally. The project would be a containerized python script that would provide the following commands:
nx build-image openchallenges-db-csv-update (name pending)
nx serve openchallenges-db-csv-update
This container could then be used by the GitHub workflow.
I'm currently exploring this approach for seeding the iAtlas database (Mongo). Let's touch base on this next week. Meanwhile, let's merge this PR once you have reviewed and addressed comments from reviewers. This is great work!!
Oh yes, looking back at a similar ticket (from ages ago 🤣 ), you made a note about creating a project for this resource. I will look into it after this PR - thanks!! |
This makes sense. Currently, a PR is created with a unique title based on the current date. With your suggestion then, I should add a step where it checks for an existing branch like |
2/12 updateWorkflow has been updated so that commits are added to the existing PR if there is already a Use case:
|
Similarly to another comments, can you prefix the feature branch name with |
Can the title of the PR be updated with the latest date in case the PR content is updated? |
Fixes #2485
Fixes #2418
Changelog
gspread
Python library) to.gitignore
Note
I need to figure out how to add and use schematic as a step, but the workflow as-is achieves the goal of updating the CSV files (see screenshots below).
Preview
Important
See screenshots below for most recent changes.
TODO for repo admin
The workflow uses two secrets:
secrets.GC_JSON
- used to create credentials file for the Google client APIssecrets.GITHUB_TOKEN
- used to push changes and create PRFrom what I can tell with the other workflows,
GITHUB_TOKEN
is already set so no further action is required here.For
GC_JSON
, the credentials will be shared over LastPass (see Shared-OpenChallenges > Google Service Account JSON Key). The key will need to be added as-is (in JSON format) as a secret to this repo.