Skip to content
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

Provide setup overrides #285

Merged
merged 2 commits into from
Dec 12, 2016

Conversation

jakirkham
Copy link
Member

@jakirkham jakirkham commented Aug 31, 2016

Fixes #284

Provides a way to bootstrap conda-forge-build-setup. Also provides the ability for feedstocks to override their configurations manually at a local level if needed. This should hopefully give everyone a little bit of what they want while addressing a notable issue.

Testing of this can be seen in PR ( conda-forge/conda-forge-build-setup-feedstock#30 ).

TODO:

@jakirkham jakirkham changed the title Provide setup overrides WIP: Provide setup overrides Aug 31, 2016
@jakirkham jakirkham force-pushed the boostrap_conda_forge_build_setup branch 5 times, most recently from ea54c6c to 9cdfe98 Compare August 31, 2016 19:49
@jakirkham jakirkham changed the title WIP: Provide setup overrides Provide setup overrides Sep 1, 2016
@jakirkham
Copy link
Member Author

This appears to be working, but would like to hear your thoughts on it, @pelson.

@jakirkham jakirkham force-pushed the boostrap_conda_forge_build_setup branch from 9cdfe98 to 15cf837 Compare September 1, 2016 05:59
@pelson
Copy link
Member

pelson commented Sep 1, 2016

I think I see the usecase (dealing with the recursive issue of building conda-forge-build-setup with conda-forge-build-setup). I'm more in favour of making this a configuration item in conda-forge.yaml and modifying the rendered CI script upon rerender, rather than having a global if statement that all feedstocks see by default. In principle though, I'm certainly up for letting a feedstock override how the setup is done.

@jakirkham jakirkham force-pushed the boostrap_conda_forge_build_setup branch from 15cf837 to 93fd34f Compare September 1, 2016 12:55
@jakirkham
Copy link
Member Author

It might get a bit hairy if we try to add the override script to the config. Might I suggest we just inject the script contents into the CI scripts as we did with yum_requirements.txt? I'd still prefer the current proposal, but the latter is minimally invasive and improves readability.

@jakirkham
Copy link
Member Author

Copying you on this, @jjhelmus. Basically this is the only safe way I know of to re-render conda-forge-build-setup ATM.

@jakirkham jakirkham force-pushed the boostrap_conda_forge_build_setup branch from 6ccc948 to 70857cb Compare October 6, 2016 03:27
@jakirkham
Copy link
Member Author

So I had another look at trying to inject the contents of these files into the CI YAML files. TBH I'm not sure it is such a good idea. There are lots of things that might not behave right or as expected.

For instance, one can provide arguments to the intended shell on POSIX systems in the shebang. Other examples include things like pushd and popd not working on AppVeyor with cmd, but working in batch scripts. I can't really envision all of the cases where things could go wrong, but these are a few.

These are the options I see for us. Accept this basically as is with whatever minor tweaks are needed. Reject it and come up with another way to re-render things like conda-forge-build-setup/provide feedstocks control. IMHO this still seems like a reasonable solution.

@jakirkham jakirkham changed the title Provide setup overrides WIP: Provide setup overrides Oct 11, 2016
@jakirkham jakirkham force-pushed the boostrap_conda_forge_build_setup branch from 70857cb to 0d9127f Compare October 15, 2016 19:55
@jakirkham
Copy link
Member Author

@pelson can you please let me know your thoughts on this when you have a chance?

@jakirkham jakirkham force-pushed the boostrap_conda_forge_build_setup branch 2 times, most recently from eaf6513 to 810e0dd Compare November 11, 2016 02:54
@jakirkham jakirkham force-pushed the boostrap_conda_forge_build_setup branch 2 times, most recently from 195e564 to 8d793c4 Compare November 14, 2016 07:01
@jakirkham
Copy link
Member Author

Am sure you are utterly swamped, but would definitely appreciate your feedback on this when you have a chance @pelson .

As we need to get some of the re-rendering changes at conda-forge-build-setup to at least unpin conda-build if nothing else, this will be pretty valuable. While I agree the ifs are ugly and undesirable, injecting the contents of these scripts into CI configuration files won't work either. Maybe we can check for file existence during the re-render and run the included scripts if found. Please let me know your thoughts.

@pelson
Copy link
Member

pelson commented Nov 17, 2016

Thanks @jakirkham. I'll take a look at this in the context of https://github.com/conda-forge/conda-forge-build-setup-feedstock today (its already Friday here 😉 ).

@jakirkham jakirkham force-pushed the boostrap_conda_forge_build_setup branch 4 times, most recently from 14d327a to 9ce6d79 Compare November 29, 2016 00:48
@jakirkham
Copy link
Member Author

So I have rewritten this entirely. It is a large departure from its original form as it attempts to detect the scripts from conda-forge-build-setup during re-rendering time instead of build time.

The result is this is a no-op for an ordinary feedstock. This should hopefully address the noise concerns raised. Also it should keep this as a feature of conda-smithy than something that appears in the CI scripts ordinarily.

As we cannot inject these scripts into the CI scripts due to the aforementioned problems, we still don't do that for conda-forge-build-setup. However, we do change the paths to point to the local copies of these scripts in the recipe directory. The result is a clean looking re-rendering for conda-forge-build-setup with mere path changes.

Would be curious to know your thoughts on these changes @pelson . 😄

@jakirkham jakirkham force-pushed the boostrap_conda_forge_build_setup branch 3 times, most recently from 0c3b643 to a2c1578 Compare November 29, 2016 02:56
This is handy when the upload script works fine, but the setup step
needs to be overridden. In these cases, we want to be sure
`conda-forge-build-setup` is still provided so the upload script can be
used from it if needed.
@jakirkham jakirkham force-pushed the boostrap_conda_forge_build_setup branch from a2c1578 to 0bc7374 Compare November 29, 2016 07:19
@jakirkham
Copy link
Member Author

Coverage dips, but I'm not worried about that.

@jakirkham
Copy link
Member Author

cc-ing @jjhelmus for awareness. Have tested this in PR ( conda-forge/conda-forge-build-setup-feedstock#30 ) and it does fine.

@jakirkham
Copy link
Member Author

Thoughts @conda-forge/core ?

@pelson
Copy link
Member

pelson commented Dec 6, 2016

This is precisely how I would have implemented this change, thanks for following through and persevering! I'd just like to confirm, this is absolutely a no-op for existing feedstocks, right? I'd like to avoid having to have to re-render all feedstocks for newlines etc.

Otherwise, 👍 from me.

@jakirkham jakirkham changed the title WIP: Provide setup overrides Provide setup overrides Dec 6, 2016
@jakirkham
Copy link
Member Author

Thanks for taking a look Phil.

Cool, glad to hear this is what you had in mind.

Correct this is a no-op on other feedstocks. There are not even whitespace changes. Worked very hard to ensure even whitespace changes did not occur. Have tried with things that use yum_requirements.txt (e.g. qt-console ) and ones that don't (e.g. blosc, yaml, etc.).

Please let me know if there is anything else.

@jakirkham
Copy link
Member Author

Anything else?

@pelson
Copy link
Member

pelson commented Dec 12, 2016

My downtime is so long at the moment that you can definitely take my judicious 👍 as approval to merge 😉 .

@pelson pelson merged commit befb059 into conda-forge:master Dec 12, 2016
@jakirkham jakirkham deleted the boostrap_conda_forge_build_setup branch December 14, 2016 23:56
@jakirkham
Copy link
Member Author

Thanks Phil.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants