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 picks up old recipe? (Python 3.13 migration of iris) #3032

Open
jakirkham opened this issue Oct 24, 2024 · 8 comments
Open

Bot picks up old recipe? (Python 3.13 migration of iris) #3032

jakirkham opened this issue Oct 24, 2024 · 8 comments

Comments

@jakirkham
Copy link
Contributor

The bot is attempting to migrate iris for Python 3.13, but runs into an issue in this job:

Traceback (most recent call last):
  File "/opt/conda/envs/cf-scripts/lib/python3.11/site-packages/conda_build/metadata.py", line 2003, in _get_contents
    rendered = template.render(environment=env)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/envs/cf-scripts/lib/python3.11/site-packages/jinja2/environment.py", line 1304, in render
    self.environment.handle_exception()
  File "/opt/conda/envs/cf-scripts/lib/python3.11/site-packages/jinja2/environment.py", line 939, in handle_exception
    raise rewrite_traceback_stack(source=source)
  File "/tmp/tmp2ussbjez/iris-feedstock/recipe/meta.yaml", line 13, in top-level template code
    script: {{ PYTHON }} -m pip install . --no-deps -vv
  ^^^^^^^^^^^^^^^^^^^^^^^^^
jinja2.exceptions.UndefinedError: 'PYTHON' is undefined

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/conda/envs/cf-scripts/bin/conda-smithy", line 10, in 
    sys.exit(main())
             ^^^^^^
  File "/opt/conda/envs/cf-scripts/lib/python3.11/site-packages/conda_smithy/cli.py", line 758, in main
    args.subcommand_func(args)
  File "/opt/conda/envs/cf-scripts/lib/python3.11/site-packages/conda_smithy/cli.py", line 601, in __call__
    self._call(args, args.temporary_directory)
  File "/opt/conda/envs/cf-scripts/lib/python3.11/site-packages/conda_smithy/cli.py", line 604, in _call
    configure_feedstock.main(
  File "/opt/conda/envs/cf-scripts/lib/python3.11/site-packages/conda_smithy/configure_feedstock.py", line 2799, in main
    render_azure(env, config, forge_dir, return_metadata=True)
  File "/opt/conda/envs/cf-scripts/lib/python3.11/site-packages/conda_smithy/configure_feedstock.py", line 1868, in render_azure
    return _render_ci_provider(
           ^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/envs/cf-scripts/lib/python3.11/site-packages/conda_smithy/configure_feedstock.py", line 1090, in _render_ci_provider
    metas = _conda_build_api_render_for_smithy(
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/envs/cf-scripts/lib/python3.11/site-packages/conda_smithy/configure_feedstock.py", line 890, in _conda_build_api_render_for_smithy
    metadata_tuples = render_recipe(
                      ^^^^^^^^^^^^^^
  File "/opt/conda/envs/cf-scripts/lib/python3.11/site-packages/conda_build/render.py", line 1005, in render_recipe
    return distribute_variants(
           ^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/envs/cf-scripts/lib/python3.11/site-packages/conda_build/render.py", line 894, in distribute_variants
    mv.parse_until_resolved(
  File "/opt/conda/envs/cf-scripts/lib/python3.11/site-packages/conda_build/metadata.py", line 1357, in parse_until_resolved
    self.parse_again(
  File "/opt/conda/envs/cf-scripts/lib/python3.11/site-packages/conda_build/metadata.py", line 1262, in parse_again
    self._get_contents(
  File "/opt/conda/envs/cf-scripts/lib/python3.11/site-packages/conda_build/metadata.py", line 2013, in _get_contents
    raise CondaBuildUserError(
conda_build.exceptions.CondaBuildUserError: Failed to render jinja template in /tmp/tmp2ussbjez/iris-feedstock/recipe/meta.yaml:
'PYTHON' is undefined

Though looking at the recipe for iris, it does not have this line or any reference to PYTHON. Not only that the recipe hasn't changed since mid-August. However the Python 3.13 migrator started at the end of August

Does the bot still have an old state for this recipe somewhere? If so, can we purge it so it can retry?

@jakirkham
Copy link
Contributor Author

cc @beckermr

@beckermr
Copy link
Contributor

We're waiting for the bot to retry errors which happens last.

@jakirkham
Copy link
Contributor Author

Well the issue here is actually it is unclear what recipe the bot is reading. The error it raises does not line up with that recipe at all. Could you please help me understand where it came up with this error?

@beckermr
Copy link
Contributor

The node attributes for iris are correct: https://github.com/regro/cf-graph-countyfair/blob/master/node_attrs/6/7/a/9/e/iris.json

AFAIK we're waiting for the bot to retry failures which happens last.

@jakirkham
Copy link
Contributor Author

Agree that entry looks ok. Would note this entry was updated before the Python 3.13 migration began

Am just confused how it is finding script with {{ PYTHON }} in the recipe

AFAICT the recipe never had that during the runtime of the Python 3.13 migration

@beckermr
Copy link
Contributor

Ah I see. Thanks for helping me debug here!

We reverted a PR with git changes a day ago and this job is right before that. Maybe that was the issue?

It appears somehow to bot got an in between version of the recipe. I wonder if we are not syncing the main branch before making the PR branch? The bot's fork is very much behind: https://github.com/regro-cf-autotick-bot/iris-feedstock

cc @ytausch

@jakirkham
Copy link
Contributor Author

No worries. It is a perplexing one

Does the bot update its forks' default branches? Got the sense, it leaves those alone. Though please let me know if I'm missing something

@beckermr
Copy link
Contributor

Yeah same.

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

No branches or pull requests

2 participants