conda-forge / conda-forge-feedstock-ops

A package of containerized feedstock maintenance operations
BSD 3-Clause "New" or "Revised" License
0 stars 1 forks source link

Many migration feedstocks failing to be rerendered with `KeyError: 'patch'` #23

Open h-vetinari opened 2 hours ago

h-vetinari commented 2 hours ago

All PRs in the latest protobuf migration fail with:

Traceback (most recent call last):
  File "/home/runner/work/cf-scripts/cf-scripts/cf-scripts/conda_forge_tick/auto_tick.py", line 721, in _run_migrator_on_feedstock_branch
    migrator_uid, pr_json = run_with_tmpdir(
                            ^^^^^^^^^^^^^^^^
  File "/home/runner/work/cf-scripts/cf-scripts/cf-scripts/conda_forge_tick/auto_tick.py", line 445, in run_with_tmpdir
    return run(
           ^^^^
  File "/home/runner/work/cf-scripts/cf-scripts/cf-scripts/conda_forge_tick/auto_tick.py", line 547, in run
    rerender_info = _run_rerender(
                    ^^^^^^^^^^^^^^
  File "/home/runner/work/cf-scripts/cf-scripts/cf-scripts/conda_forge_tick/auto_tick.py", line 252, in _run_rerender
    rerender_msg = rerender_feedstock(str(context.local_clone_dir), timeout=900)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/cf-scripts/cf-scripts/cf-scripts/conda_forge_tick/rerender_feedstock.py", line 24, in rerender_feedstock
    return _rerender(feedstock_dir, timeout=timeout, use_container=use_container)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/micromamba/envs/cf-scripts/lib/python3.11/site-packages/conda_forge_feedstock_ops/rerender.py", line 48, in rerender
    return rerender_containerized(
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/micromamba/envs/cf-scripts/lib/python3.11/site-packages/conda_forge_feedstock_ops/rerender.py", line 116, in rerender_containerized
    if data["commit_message"] is not None and data["patch"] is not None:
                                              ~~~~^^^^^^^^^
KeyError: 'patch'

Not sure what data we're treating there, but presumably this could be something like:

if data["commit_message"] is not None and data.get("patch", None) is not None:
beckermr commented 2 hours ago

This is a bug in how I am provisioning the bot environments. A docker container is not in sync with the conda-lock.yml. I have just rebuilt things so the error should go away. I'll need to figure out a better way to provision the bot code and have a few ideas.