-
Notifications
You must be signed in to change notification settings - Fork 298
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 failsafe version detection, to prevent CLI crash #1828
Comments
To consider in conjunction with #1779 |
What about 'stable'? |
What did you exactly try? I'll need to replicate to understand what is going on. Only now I understand why you proposed this https://github.com/poldracklab/fmriprep/pull/1829/files#diff-b93ab0122f4b2ac6738b896651cac6ccR49-R50 This apparently simple issue might be masking a deeper problem with versioneer and our version tracking infrastructure. |
I believe that I git cloned this repository, Then when I did |
Okay, then I guess you should've passed the VERSION --build-arg: Can you try the following? docker build --rm -t fmriprep \
--build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
--build-arg VCS_REF=`git rev-parse --short HEAD` \
--build-arg VERSION=$( python get_version.py ) . We probably want to have a Makefile with a build target that includes the build args. |
I think the point was just that it's a minor pain and we can probably set it up not to trip people up who don't want to learn about build args just to run a test. |
Ah yeah. My internet is too crappy right now to try it, but I'm sure that works. I agree with @effigies here. Maybe if build-args are missing, it should either throw an error at build time, or (better) throw a warning, but default to a value that is valid (if meaningless) later on. |
I think we tried to update the docs for this in #1797, so it'd be great to review if there's more that should be added there, too. And just explicitly: I'm a strong +1 on throwing a more descriptive error ! |
Ah, nice. How ironic that I had that very issue for the docusprint. Docs look good to me. Unfortunately, there's a very good chance I probably wouldn't have read the docs anyways, and there's too many people like me in this world. |
When building an
fmriprep
image directly from github, the version is not set correctly, as defaults to''
.As a consequence the CLI crashes, because it can't parse the version:
I suggest a failsafe
unknown
version is set if the version is an empty string.The text was updated successfully, but these errors were encountered: