conda-forge / conda-smithy

The tool for managing conda-forge feedstocks.
https://conda-forge.org/
BSD 3-Clause "New" or "Revised" License
147 stars 177 forks source link

variant algebra bugs #1850

Open beckermr opened 6 months ago

beckermr commented 6 months ago

Rerendering nionui-tool with python 3.12 produced an error:

  ================================================================================
  ================================================================================
  Running migrations for MigrationYaml-python312: 156

  2024-02-24 12:16:49,379 INFO     conda_forge_tick.auto_tick || MIGRATIONYAML-python312 IS MIGRATING nionui-tool:main
  2024-02-24 12:16:49,379 INFO     github3 || Building a url from ('https://api.github.com/', 'rate_limit')
  2024-02-24 12:16:49,420 INFO     github3 || JSON was returned
  2024-02-24 12:16:49,420 INFO     github3 || Building a url from ('https://api.github.com/', 'repos', 'conda-forge', 'nionui-tool-feedstock')
  2024-02-24 12:16:49,420 INFO     github3 || Missed the cache building the url
  2024-02-24 12:16:49,530 INFO     github3 || JSON was returned
  2024-02-24 12:16:49,531 INFO     github3 || Building a url from ('https://api.github.com/', 'repos', 'regro-cf-autotick-bot', 'nionui-tool-feedstock')
  2024-02-24 12:16:49,531 INFO     github3 || Missed the cache building the url
  2024-02-24 12:16:49,648 INFO     github3 || JSON was returned
  error: pathspec 'rebuild-python312-0-1_h967b30' did not match any file(s) known to git
  2024-02-24 12:16:50,559 INFO     conda_forge_tick.migrators.cross_compile || new conda-forge.yml for nionui-tool:={'build_platform': {'osx_arm64': 'osx_64'}, 'test_on_native_only': True, 'conda_forge_output_validation': True, 'azure': {'store_build_artifacts': True}, 'github': {'branch_name': 'main', 'tooling_branch_name': 'main'}, 'conda_build': {'pkg_format': '2'}}
  2024-02-24 12:16:50,578 INFO     conda_forge_tick.auto_tick || Rerendering the feedstock
  INFO:conda_smithy.configure_feedstock:__pycache__ rendering is skipped
  INFO:conda_smithy.configure_feedstock:README rendering is skipped
  INFO:conda_smithy.configure_feedstock:python312.yaml from feedstock is ignored and upstream version is used
  WARNING: Setting build platform. This is only useful when pretending to be on another platform, such as for rendering necessary dependencies on a non-native platform. I trust that you know what you're doing.
  WARNING: Setting build arch. This is only useful when pretending to be on another arch, such as for rendering necessary dependencies on a non-native arch. I trust that you know what you're doing.
  WARNING: No numpy version specified in conda_build_config.yaml.  Falling back to default numpy value of 1.22
  INFO:conda_smithy.configure_feedstock:Applying migrations: /home/runner/.cache/conda-smithy/share/conda-forge/migrations/python312.yaml
  Traceback (most recent call last):
    File "/home/runner/miniconda3/envs/cf-scripts/bin/conda-smithy", line 10, in <module>
      sys.exit(main())
    File "/home/runner/miniconda3/envs/cf-scripts/lib/python3.10/site-packages/conda_smithy/cli.py", line 724, in main
      args.subcommand_func(args)
    File "/home/runner/miniconda3/envs/cf-scripts/lib/python3.10/site-packages/conda_smithy/cli.py", line 584, in __call__
      self._call(args, tmpdir)
    File "/home/runner/miniconda3/envs/cf-scripts/lib/python3.10/site-packages/conda_smithy/cli.py", line 589, in _call
      configure_feedstock.main(
    File "/home/runner/miniconda3/envs/cf-scripts/lib/python3.10/site-packages/conda_smithy/configure_feedstock.py", line 2552, in main
      render_azure(env, config, forge_dir, return_metadata=True)
    File "/home/runner/miniconda3/envs/cf-scripts/lib/python3.10/site-packages/conda_smithy/configure_feedstock.py", line 1520, in render_azure
      return _render_ci_provider(
    File "/home/runner/miniconda3/envs/cf-scripts/lib/python3.10/site-packages/conda_smithy/configure_feedstock.py", line 688, in _render_ci_provider
      migrated_combined_variant_spec = migrate_combined_spec(
    File "/home/runner/miniconda3/envs/cf-scripts/lib/python3.10/site-packages/conda_smithy/configure_feedstock.py", line 621, in migrate_combined_spec
      combined_spec = variant_add(combined_spec, migration)
    File "/home/runner/miniconda3/envs/cf-scripts/lib/python3.10/site-packages/conda_smithy/variant_algebra.py", line 290, in variant_add
      return VARIANT_OP[operation](v1, v2)
    File "/home/runner/miniconda3/envs/cf-scripts/lib/python3.10/site-packages/conda_smithy/variant_algebra.py", line 177, in op_variant_key_add
      new_keys = variant_key_set_union(
    File "/home/runner/miniconda3/envs/cf-scripts/lib/python3.10/site-packages/conda_smithy/variant_algebra.py", line 115, in variant_key_set_union
      return sorted(out_v, key=partial(_version_order, ordering=ordering))
    File "/home/runner/miniconda3/envs/cf-scripts/lib/python3.10/site-packages/conda_smithy/variant_algebra.py", line 66, in _version_order
      return ordering.index(v)
  ValueError: '3.10' is not in list
  Adding in variants from internal_defaults
  Adding in variants from /home/runner/.cache/conda-smithy/conda_build_config.yaml
  Adding in variants from /home/runner/work/cf-scripts/cf-scripts/cf-graph/feedstocks/nionui-tool-feedstock/recipe/conda_build_config.yaml
gmarkall commented 3 months ago

Similar error rendering numba-feedstock with NumPy 2 and the llvmlite_rc channel (at commit https://github.com/gmarkall/numba-feedstock/commit/fb24c5327608aa16f46ee48e13dd005310c5ab49):

$ conda-smithy rerender
INFO:conda_smithy.configure_feedstock:__pycache__ rendering is skipped
INFO:conda_smithy.configure_feedstock:README rendering is skipped
INFO:conda_smithy.configure_feedstock:python312.yaml from feedstock is ignored and upstream version is used
INFO:conda_smithy.configure_feedstock:numpy2.yaml from feedstock is ignored and upstream version is used
WARNING: Setting build platform. This is only useful when pretending to be on another platform, such as for rendering necessary dependencies on a non-native platform. I trust that you know what you're doing.
WARNING: Setting build arch. This is only useful when pretending to be on another arch, such as for rendering necessary dependencies on a non-native arch. I trust that you know what you're doing.
WARNING: No numpy version specified in conda_build_config.yaml.  Falling back to default numpy value of 1.22
Adding in variants from internal_defaults
Adding in variants from /home/gmarkall/.cache/conda-smithy/conda_build_config.yaml
Adding in variants from /home/gmarkall/conda-forge/numba-feedstock/recipe/conda_build_config.yaml
INFO:conda_smithy.configure_feedstock:Applying migrations: /home/gmarkall/.cache/conda-smithy/share/conda-forge/migrations/python312.yaml,/home/gmarkall/.cache/conda-smithy/share/conda-forge/migrations/numpy2.yaml
Traceback (most recent call last):
  File "/home/gmarkall/miniforge3/bin/conda-smithy", line 10, in <module>
    sys.exit(main())
  File "/home/gmarkall/miniforge3/lib/python3.10/site-packages/conda_smithy/cli.py", line 737, in main
    args.subcommand_func(args)
  File "/home/gmarkall/miniforge3/lib/python3.10/site-packages/conda_smithy/cli.py", line 584, in __call__
    self._call(args, tmpdir)
  File "/home/gmarkall/miniforge3/lib/python3.10/site-packages/conda_smithy/cli.py", line 589, in _call
    configure_feedstock.main(
  File "/home/gmarkall/miniforge3/lib/python3.10/site-packages/conda_smithy/configure_feedstock.py", line 2744, in main
    render_travis(env, config, forge_dir, return_metadata=True)
  File "/home/gmarkall/miniforge3/lib/python3.10/site-packages/conda_smithy/configure_feedstock.py", line 1539, in render_travis
    return _render_ci_provider(
  File "/home/gmarkall/miniforge3/lib/python3.10/site-packages/conda_smithy/configure_feedstock.py", line 1024, in _render_ci_provider
    migrated_combined_variant_spec = migrate_combined_spec(
  File "/home/gmarkall/miniforge3/lib/python3.10/site-packages/conda_smithy/configure_feedstock.py", line 879, in migrate_combined_spec
    combined_spec = variant_add(combined_spec, migration)
  File "/home/gmarkall/miniforge3/lib/python3.10/site-packages/conda_smithy/variant_algebra.py", line 343, in variant_add
    joint_variant[k] = variant_key_add(
  File "/home/gmarkall/miniforge3/lib/python3.10/site-packages/conda_smithy/variant_algebra.py", line 90, in variant_key_add
    if _version_order(e_l, ordering) < _version_order(e_r, ordering):
  File "/home/gmarkall/miniforge3/lib/python3.10/site-packages/conda_smithy/variant_algebra.py", line 66, in _version_order
    return ordering.index(v)
ValueError: 'conda-forge/label/llvmlite_rc,conda-forge' is not in list