-
Notifications
You must be signed in to change notification settings - Fork 20
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
Add 'channels' options; save cache on action failure; extend docs #45
Conversation
6f891ff
to
98bc874
Compare
cc5ce1b
to
94117ea
Compare
94117ea
to
bb59c58
Compare
ca51cc0
to
1d61a51
Compare
@@ -104,11 +104,7 @@ async function installMicromambaPosix (micromambaUrl) { | |||
linux: 'wget -qO- --retry-connrefused --waitretry=10 -t 5' | |||
}[MAMBA_PLATFORM] | |||
const downloadCmd = `${downloadProg} ${micromambaUrl} | tar -xvjO bin/micromamba > ${PATHS.micromambaExe}` | |||
try { |
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 that download retry there on purpose?
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 would be nice to have a retry of the micromamba download for a couple of times because there can always be some downtime (e.g. on the micromamba server or the anaconda server).
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.
Added something back.
@@ -37,24 +37,20 @@ function getInputAsArray (name) { | |||
.filter(x => x !== '') | |||
} | |||
|
|||
async function executeBash (command, opts = { setFailed: true }) { |
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.
Changed the execute functions so that they actually halt the action, not only log the error and continue.
core.info(`${action} env ${envName}`) | ||
const quotedExtraSpecsStr = selectSelectors(extraSpecs).map(e => `"${e}"`).join(' ') | ||
const cmd = `micromamba ${action} -n ${envName} ${quotedExtraSpecsStr} --strict-channel-priority -y -f ${envFilePath}` |
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.
Fixed the code to work with no env file and only extra specs.
@@ -73,6 +69,10 @@ function sha256 (s) { | |||
return h.digest().hexSlice() | |||
} | |||
|
|||
function sha256Short (s) { |
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.
Shortened env file content hashes for better legibility.
Co-authored-by: Tom de Geus <[email protected]>
a4af6e2
to
5af807d
Compare
64cd512
to
0262775
Compare
Thanks @jonashaag for this! Would be nice to get merged soon |
ping @wolfv |
This PR also fixes silently ignored errors in |
I like it. I wonder if we're making a mistake by not using YAML lists where appropriate (extra specs and channels could be proper lists...) What do you think? |
One argument against it is that it's slightly more cumbersome to have conditional extra-specs/channels:
vs (does that even work?)
or even
I guess we could just ignore empty lists items (is The I guess it's safe to support both syntaxes as well... |
@@ -7,7 +7,8 @@ inputs: | |||
environment-file: | |||
description: >- | |||
The environment.yml or .lock file for the conda environment. | |||
If 'false', no enviroment will be created (only Micromamba will be installed). | |||
If 'false', no enviroment will be created (only Micromamba will be installed) |
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 think this might be too late, but could we also use null
?
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 seems that GHA deletes inputs with foo: null
from the actual inputs that are being passed to the action. foo: 'null'
would work but feels ugly. So I suggest to keep false
.
LGTM! |
@wolfv if you're OK with the |
Rel #42
Closes #44