-
Notifications
You must be signed in to change notification settings - Fork 713
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
Update release flow for BCK prerelease and final release #12453
Update release flow for BCK prerelease and final release #12453
Conversation
Update BCK static files with latest.
Build Artifacts
|
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.
Things look right! I guess we'll see 💀
name: ${{ needs.whl.outputs.whl-file-name }} | ||
path: dist | ||
- name: Zip whl file | ||
run: zip -j dist/kolibri.zip dist/${{ needs.whl.outputs.whl-file-name }} |
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.
Assuming that the filename looks like it does in the PR comment (kolibri-0.17.0b3.dev0+git.3.gb6d89f4b-py2.py3-none-any.whl
), this looks like it'd install just fine, yep. Link to relevant lines in the CD dockerfile
path: 'dist/kolibri.zip' | ||
destination: '${{ secrets.BCK_PRERELEASE_BUILD_ARTIFACT_GCS_BUCKET }}' |
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.
Was initially concerned by this, but if the docs are telling the truth, should be uploaded flat. And so this may be alright.
unzip -j dist/${{ needs.whl.outputs.whl-file-name }} 'kolibri/core/content/static/*' -d static | ||
rm static/*.file_size | ||
# Ungzip all .gz files in the static folder | ||
for f in static/*.gz; do gunzip -f $f; done |
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.
yeesh you fancy with your bash functions
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 all looks fine to me, though you're doing more than the old buildkite step was doing; makes sense, given you're pulling from a WHL rather than the source code — do you not have access to the source code, or is it just safer to use the artifact we know successfully built?
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.
By this point in the step, the built source has been gzipped and truncated to keep the overall whl file smaller, so we have to do this to reinflate it back to uncompressed sources.
And yes, definitely safer to use the files we know have built successfully into the whl file.
uses: 'google-github-actions/upload-cloud-storage@v2' | ||
with: | ||
path: 'static' | ||
destination: '${{ secrets.STUDIO_BCK_CONTENT_STATIC_BUCKET }}' |
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 the bajillion examples of the not-immediately-intuitive behaviour on upload described in the docs has be squinting suspiciously at this. But if my understanding is right, all the extracted folders should start at the root of the bucket. Which is what I believe Kolibri-modified-to-point-at-a-bucket-for-content is expecting
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.
Yes - the docs are highly confusing, but this is also why I unzipped all the static files into the root of the current directory, so that I could just say "upload this folder". I am fully ready for my having misunderstood the docs again, again, again.
Summary
References
Fixes #12240
Reviewer guidance
The only part of this I was really able to test was the unzipping and ungzipping of the assets into a folder, everything else I have had to do by thinking I got it right.
Particular things to pay attention to:
needs
job in anif
conditional for the whole job? (I don't know, and Github Actions wouldn't tell me)Testing checklist
PR process
Reviewer checklist
yarn
andpip
)