Comments (14)
I implemented this, but GitHub Actions are currently degraded, so I can't even do the limited testing I was hoping to do. I will leave this issue open until we successfully process a micromamba release on the new configuration.
from micromamba-docker.
Using digests in FROM
lines is a docker best practice and not specific to micromamba-docker.
Getting this completely automated is a bit tricky. I believe it would involve me turning off branch-protection.
There is an easy solution with less automation:
- Remove calls to
check_version.py
in the CI and CD workflows - No longer pass the
VERSION
build-args in the CD workflow - Remove the 6-hour schedule for running the CD workflow
A person would then have to run update.sh
after a release, generate a PR, and get the result merged to main before dockerhub will get a new build.
It would be easy to add back some automation to generate the PR with the update.sh
commit when new versions of micromamba arrive on conda-forge.
from micromamba-docker.
That's a really interesting thought. Doing it manually could make a lot of sense short-term.
There's also a decent chance that in some months I'll have set up something similar for on something less critical, and may have more concrete ideas.
With your last sentence, do you mean that instead of pushing in CD we could trigger a PR à la regro/cf-autotick-bot? That would be really cool.
from micromamba-docker.
I'm not familiar with regro/cf-autotick-bot, but here is the somewhat reduced automation I am envisioning:
- Create a new GitHub Actions workflow 'Create_update_PR', which runs a workflow on a 6 hour schedule. It runs
check_version.py
and if a new version of micromamba is found on conda-forge, then it will:- create a new branch named
update_to_$VERSION
- run
update.sh
- generate a commit
- push commit
- generate a PR
- create a new branch named
- I manually merge these PRs after they pass CI.
- Merge of PR starts build and push to dockerhub.
(sorry for all the edits)
from micromamba-docker.
Yes, that's exactly what I meant. You seem to have very nicely broken down all the individual steps.
from micromamba-docker.
That's very exciting. Not that I'm very experienced, but I read through it, and it looks good to me. I'm looking forward to seeing what it does.
from micromamba-docker.
Micromamba 0.21.0 is out!
https://github.com/mamba-org/mamba/releases/tag/2022.02.07
from micromamba-docker.
@wholtz, I just realized, do we have a mechanism to ensure that only one PR at a time is made, or will a new PR be opened every 6 hours?
from micromamba-docker.
Just found this in the docs for the PR action:
If a pull request already exists and there are no further changes (i.e. no diff with the current pull request branch) then the action exits silently.
So if I'm reading that correctly I think it'll be fine. Sorry for the noise!
from micromamba-docker.
I let the cronjob kick off the initial PR generation and then manually triggered the workflow again. The second invocation didn't leave any trace.
But the initial PR did not automatically trigger the CI workflow. I had to disable branch protection to continue the process. This seems to happen most times that I update .github/workflows/test.yaml
and likely it will be fine for the next PR.
from micromamba-docker.
Looks like not triggering the CI is a known issue with various possible workarounds.
from micromamba-docker.
I'll look into implementing one of those workarounds....
from micromamba-docker.
The workarounds that would result in the automatically generated PR kicking off the CI workflow are all messy. So I'm going to stick with the simple but slightly less automated solution:
Use the default GITHUB_TOKEN and allow the action to create pull requests that have no checks enabled. Manually close pull requests and immediately reopen them. This will enable on: pull_request workflows to run and be added as checks.
The workflow will be:
- PR is automatically generated
- I will then close the PR
- I will immediately re-open the PR
- wait for CI workflow to complete
- Click 'Merge' button
The only small downside of this is that I have to sit and wait for CI to run.
from micromamba-docker.
@wholtz, makes sense given the tradeoffs. Thanks for getting that straightened out!
If you want to reduce distraction from watching the tests, perhaps you could add a Slack (or similar messaging client) webhook to the end of your CI workflow, conditioned on the PR coming from the bot. Ah, but the tests are taking less than for minutes.
from micromamba-docker.
Related Issues (20)
- Use micromamba based container for CI with GitHub Actions HOT 8
- Install pip dependencies results a permission denied (libmamba Error opening for writing) HOT 1
- Micromamba not initializing correctly HOT 7
- Adding micromamba to an existing Docker image failing to prefix error HOT 2
- python not found on Singularity HOT 1
- Invalid argument when running pre/post link script HOT 3
- Properly document how to launch a shell in an image, not just a running container HOT 3
- Support multiple alpine base images
- Problem: Cannot add a corporate SSL certificate as update-ca-certificates tool was removed from the multistage final docker image HOT 4
- Unexpected behaviour with cuda. HOT 2
- gcc not found HOT 1
- Adding micromamba to an existing docker image documentation tip HOT 8
- Cannot install new package due to micromamba user permissions. HOT 3
- mambauser cannot write to bind mounts on Linux with Docker in rootless-mode HOT 17
- Failed to add Micromamba to another image HOT 2
- Apache 2.0 License missing copyright owner information HOT 1
- Cache accessing error when creating environments in containers from a derived image with host uid. HOT 11
- Question: can we pass extra-url to the env.yaml? HOT 3
- Should CONDA_PREFIX be set by default? HOT 4
- alpine:3.19 does not work as BASE_IMAGE HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from micromamba-docker.