-
Notifications
You must be signed in to change notification settings - Fork 4
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
github cron job to update release branch snap_installation.yaml #83
Conversation
…vaailable stable revision
|
||
def find_snapstore_revision(track: str, arch: str, risk: str) -> str: | ||
URL = f"https://api.snapcraft.io/v2/snaps/info/k8s?architecture={arch}&fields=revision" | ||
HEADER = {"Snap-Device-Series": 16} |
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.
The client must send the Snap-Device-Series and User-Agent mandatory headers. For the Snap-Device-Series header, the only supported value so far is '16'.
Heh, funny magic numbers. Do you have any other information on why this field is required?
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.
https://api.snapcraft.io/docs/info.html
The client must send the Snap-Device-Series and User-Agent mandatory headers. For the Snap-Device-Series header, the only supported value so far is '16'.
I'm guessing it's some kind of API versioning number? I have no clue
- name: Update Revision | ||
id: update-revision | ||
run: | | ||
python3 .github/workflows/update-snap-revision.py ${{ matrix.arch }} ${{ env.TRACK }} stable |
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.
Just one question. Where is this TRACK envvar set?
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.
wow, nice call. Updated and spotted another bug. Thanks @mateoflorido
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.
track env is now from here
3526901
to
cccbab7
Compare
Co-authored-by: Mateo Florido <[email protected]>
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.
LGTM!
…#96) * Create a github cron job which updates release branches with latest avaailable stable revision * Fix bash regex on branch release names * formatting * Provider errors when branch doesn't match * TRACK should be place into the GITHUB_ENV not GITHUB_OUTPUT * Update .github/workflows/promote-charms.yaml --------- Co-authored-by: Mateo Florido <[email protected]>
Summary
Create a github cron job which updates release branches with latest available stable revision
Details
release-xx
branches to update the static revision configuration