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

Bot scripts in recipe #93

Open
CJ-Wright opened this issue Mar 17, 2018 · 8 comments
Open

Bot scripts in recipe #93

CJ-Wright opened this issue Mar 17, 2018 · 8 comments
Labels
GSOC Google Summer of Code

Comments

@CJ-Wright
Copy link
Member

In discussion with @scopatz

It might be nice to have a system where feedstocks can have a script which overrides the normal bot behavior for PRing. This would allow things with janky setups to be able to use the bot's bumping capabilities without having the bot need to deal with every corner case itself. We could also expand this to handle getting upstream versions if there are some recipes who's upstream is a bit off the beaten path

@CJ-Wright
Copy link
Member Author

Maybe we source a custom migrator?

This will require:

  1. the bot to know about the file to source before running the migrator
  2. the capacity to override the migrator temporally

Eg bot finds migrators.xsh in the recipe dir, bot sources migrators.xsh, bot uses currently available migrator for whatever migration it is doing, bot finishes and reverts to stock migrators. We could also run a custom migration which goes and pokes every feedstock to run it's custom migration (we could store this info in the graph so we don't need to poke every feedstock directly).

@scopatz would it be possible to xonsh source as a context manager? (to address 2)

@scopatz
Copy link
Contributor

scopatz commented Jun 8, 2018

xonsh source as a context manager?

What do you mean exactly? Can you give an example usage?

@CJ-Wright
Copy link
Member Author

recipe provides its own Version migrator because they have some special issues during version migration. I'd like that to override the local namespace so we use that migratior when working with that recipe, but not any other.

...
for feedstock in feedstocks:
    with source 'bot.xsh':  # if this doesn't exist do nothing
        run(Version())  # This uses version from 'bot.xsh' if it exists else run on defaults

@scopatz
Copy link
Contributor

scopatz commented Jun 8, 2018

We have discussed this out of bounds bit

@ZzEeKkAa
Copy link
Contributor

ZzEeKkAa commented Oct 4, 2024

@beckermr is anything like this in plans?

@beckermr
Copy link
Contributor

beckermr commented Oct 4, 2024

Likely not. We don't want to run untrusted code in the bot infrastructure.

@ZzEeKkAa
Copy link
Contributor

ZzEeKkAa commented Oct 4, 2024

Thank you. I was thinking about this issue: #2821 (comment) . May be there is a way to add script that will get build number from version...

One possible hack I was thinking is to create dummy setup.py, to get build numbers from versions, and later inject it into meta.yaml by using {% set data = load_setup_py_data() %}.

Another thing we were discussing with @oleksandr-pavlyk today is to create proxy github repo that calls for new versions and then if available does dummy release with versions that is then picked up by the bot.

Original problem is that we have two repack repos like this:
https://github.com/conda-forge/intel_repack-feedstock
https://github.com/conda-forge/intel-compiler-repack-feedstock

@beckermr
Copy link
Contributor

beckermr commented Oct 4, 2024

I don't recall this discussion exactly, but I'll say (maybe again) that the build number marks which build of a given version for a recipe. The build number should be independent of the version. Anything else is not supported by the bot directly. If you can make the recipe do it via some mechanism, then fine. However, I would recommend reconsidering your approach.

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

No branches or pull requests

4 participants