-
-
Notifications
You must be signed in to change notification settings - Fork 42
Install via pip instead of apt #264
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
Closed
Closed
Changes from 1 commit
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
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
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
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.
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.
You likely need to install pip and python first before being able to run
pip. Not sure where you're seeing failures but this may be the cause.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.
Ubuntu tends to come with those preinstalled, unless docker has a different, very barebones image. I see errors running the test CI in my own repo:
This path suggests to me that we don't use the Dockerfile directly but instead from some repo, likely to cache it? So would need @jidicula to deploy those first (once tested to work), maybe under a new base name to avoid conflicts. Though having to manually deploy them makes me wonder how to handle so many versions, perhaps do the ones currently present on
pipplus prefixes, i.e.21.1.6 => 21.1.6, 21.1, 21.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.
It's because it isn't built yet, as the PR isn't merged. And for ghcr.io, you have to authenticate yourself before when downloading from the registry. In GItHub Actions, it is done automatically with the GITHUB_TOKEN
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.
@echoix Doesn't that create sort of chicken-and-egg scenario? We can't run CI on new images before we merge the PR, but shouldn't merge the PR without checking the new scenarios? Or is it just an artifact of me running in a fork whose token does not match the image cache? In any way I'll try testing the new image locally to ensure it works before marking as ready for review.
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.
For tests in CI like that, you could do it in two steps in the same job of a workflow file. First, build the image only tagging it with the commit hash or something generic, but don't push it!! Make sure the "load" option of docker/build-push-action is true for this.
Then, run the tests, using the commit hash or the tag used above.
Since the image was loaded to the local image store, it will be available.
Then, rerun the metadata action, with the full labels/tags wanted, and build the image again. Since nothing changed since the last build, the build cache will be used and the build will finish right away. On this build, you can specify to allow pushing to a registry.
That last step shouldn't be done in PRs. You don't want PRs for the general public to publish unreleased images under your image 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.
I'll just make this my takeaway, the other stuff is a bit over my head 😄 . I'll do local testing then ask for someone to take over the merging once ready.
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.
You would want something similar to this example:
https://docs.docker.com/build/ci/github-actions/test-before-push/
But using two calls of https://github.com/docker/metadata-action. It will do the sanitation of tags, and help make sure the info is added. It's way simpler to use it rather than not use it.
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.
@echoix I have tested the new dockerfile locally, everything works as expected. Would you care taking over this PR to do the image publishing part? I unfortunately don't have time to learn this, especially since as first-time contributor to this repo, I can't even run the CI without maintainer approving them every time.
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.
Also, from what I understand, we need to rename all mentions of
ghcr.io/jidicula/clang-format:"$CLANG_FORMAT_VERSION"toghcr.io/jidicula/clang-format-pip:"$CLANG_FORMAT_VERSION", but then to pass CI we also need to manually build and deploy all those images, which sounds like something only @jidicula themselves can do.