-
Notifications
You must be signed in to change notification settings - Fork 420
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
conda build --output doesn't expand GIT_xxx environment variables anymore #754
Comments
Ping @jakirkham @meawoppl |
Thanks for doing this. The flag is |
So, the package should have a path like so |
@meawoppl, so I don't know that there is a way to specify the path, but all the paths look something like the one above. |
@pitrou what version of conda-build did this work in? |
On our CI systems this worked with 1.18.x, it seems. Perhaps there are some other factors to the variability? (perhaps you need jinja2 installed?) |
1.18.2 indeed, apparently. |
By the way, I think jinja2 should be hard dependency of conda-build. It's too easy to forget installing it and get weird variations. |
1.18.2 totally fails with GIT_* vars.
1.17-1.18.1 and 1.19 just use whatever the GIT_* vars were for the last build in. So if you remove the conda-build/ directory, the GIT_* vars will just fail to be present. e.g.,
@pitrou jinja2 is now a runtime dep: https://github.com/conda/conda-build/blob/master/conda_build.recipe/meta.yaml#L22 |
No, I'm sorry, I was mistaken. The behavior from 1.17-1.18.1 was to use the GIT_* variables from the last built package. The GIT_* variables were just broken in 1.18.2. Now GIT_* variables do not exist in 1.19.0 for the --output flag |
Yeah, that happened. I can't remember where, but I'll find the link. Here is the closest thing to it. ( #613 ) |
@ericdill, I think the failure you are seeing is because |
@jakirkham I do have jinja2 installed. |
Ah, sorry, my mistake. |
I think the problem has something to do with some stronger constraints on how jinja templates work or at least that is my new guess. It may also be related to how many passes of the recipe have occurred before this is outputted. @stuarteberg, any thoughts on the problem seen here? |
@jakirkham @pitrou Sorry to derail this thread. I was only trying to point out that @jakirkham If you just pinged @stuarteberg to try to debug why this is failing on 1.18.2 for my sake, I am not particularly concerned with that issue, I can use a different version than 1.18.2. I did suggest a fix to get access to the GIT_* vars for the |
Well, we seem to have worked around the issue by downgrading to 1.18.1 on our CI servers. |
I think I know the reason and I think he does too. :) However, that isn't really why I wanted his thoughts. I think he might have a better idea of where this needs to fit in the now 2 pass jinja framework so that was what I was hoping he might be able to point out. |
I strongly suspect this "fix" is not what you want. Can you verify by hand that the output of
That is, if you build a package, and then you run Consider these two recipes: # requests-old/meta.yaml
package:
name: requests-old
version: "1.0.0"
source:
git_url: https://github.com/kennethreitz/requests
git_tag: v1.0.0 package:
name: requests-new
version: "2.9.1"
source:
git_url: https://github.com/kennethreitz/requests
git_tag: v2.9.1
build:
string: {{environ['GIT_DESCRIBE_TAG']}} Look at what happens when I run these commands: $ conda build --version
conda-build 1.18.1
$ conda build requests-old
...snip...
$ conda build --output requests-new
/miniconda/conda-bld/osx-64/requests-new-2.9.1-v1.0.0.tar.bz2 Uh-oh. Look at that build string... At least the current version of conda doesn't fool you into thinking that |
I see. Well, each of our CI builders has a separate conda install, that must explain why it worked. |
(this probably would all be moot if conda-build allowed passing a user and token for uploading ;-)) |
Agreed! 👍 |
Our CI (circle) is currently pegged to 1.18.0. |
@stuarteberg One of the main offenders of the extra info that now comes out with the Is it important that the output from the git commands be reported to the console? |
To me it's not important. |
One workaround for now is simply to call
|
Thanks for looking at this @stuarteberg. It looks like both of his changes have been merged into |
Now that |
Which release are these changes going to be a part of? |
@stuarteberg's fixes are in earlier releases - perhaps 1.20.0. However, those release had other issues, and many people avoided them. The 1.20.2beta release is at https://anaconda.org/conda-team/conda-build/files. Install with:
I'm hoping to wrap up a couple of other bugs and do a final release over the next 1-2 days, which will be 1.20.2 final. |
Hi there, thank you for your contribution! This issue has been automatically locked because it has not had recent activity after being closed. Please open a new issue if needed. Thanks! |
This is a regression in 1.19.0. When running
conda build --no-output
, the GIT_DESCRIBE_TAG and GIT_DESCRIBE_NUMBER variables are not expanded anymore in the meta.yaml, therefore the generated filename is wrong.The text was updated successfully, but these errors were encountered: