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 unable to submit imagecodecs version 2024.6.1 update #2691

Open
jakirkham opened this issue Jun 3, 2024 · 11 comments
Open

Bot unable to submit imagecodecs version 2024.6.1 update #2691

jakirkham opened this issue Jun 3, 2024 · 11 comments

Comments

@jakirkham
Copy link
Contributor

It looks like imagecodecs is missing a 2024.6.1 update

Looking at the bot log, it is not entirely clear what issue it is running into

3.00 attempts - bot error (<a href="https://github.com/regro/cf-scripts/actions/runs/9338374933">bot CI job</a>): main: Traceback (most recent call last):
  File "/home/runner/work/cf-scripts/cf-scripts/cf-scripts/conda_forge_tick/utils.py", line 240, in run_container_task
    ret = json_loads(res.stdout)
          ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/micromamba/envs/cf-scripts/lib/python3.11/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/micromamba/envs/cf-scripts/lib/python3.11/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/micromamba/envs/cf-scripts/lib/python3.11/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/runner/work/cf-scripts/cf-scripts/cf-scripts/conda_forge_tick/auto_tick.py", line 572, in _run_migrator_on_feedstock_branch
    migrator_uid, pr_json = run(
                            ^^^^
  File "/home/runner/work/cf-scripts/cf-scripts/cf-scripts/conda_forge_tick/auto_tick.py", line 216, in run
    migration_run_data = run_migration(
                         ^^^^^^^^^^^^^^
  File "/home/runner/work/cf-scripts/cf-scripts/cf-scripts/conda_forge_tick/migration_runner.py", line 63, in run_migration
    return run_migration_containerized(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/cf-scripts/cf-scripts/cf-scripts/conda_forge_tick/migration_runner.py", line 157, in run_migration_containerized
    data = run_container_task(
           ^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/cf-scripts/cf-scripts/cf-scripts/conda_forge_tick/utils.py", line 242, in run_container_task
    raise RuntimeError(
RuntimeError: Error running migrate-feedstock in container - JSON could not parse stdout:
cmd: ['docker',
 'run',
 '-e',
 'CF_TICK_IN_CONTAINER=true',
 '--security-opt=no-new-privileges',
 '--read-only',
 '--cap-drop=all',
 '--mount',
 'type=tmpfs,destination=/tmp,tmpfs-mode=1777,tmpfs-size=6000000000',
 '-m',
 '6000m',
 '--cpus',
 '1',
 '--ulimit',
 'nofile=1024:1024',
 '--ulimit',
 'nproc=2048:2048',
 '--rm',
 '-i',
 '--mount',
 'type=bind,source=/tmp/tmpra8phogs,destination=/cf_tick_dir',
 'ghcr.io/regro/conda-forge-tick:master',
 '/opt/conda/envs/cf-scripts/bin/python',
 '-u',
 '/opt/autotick-bot/docker/run_bot_task.py',
 'migrate-feedstock',
 '--feedstock-name',
 'imagecodecs',
 '--default-branch',
 'main',
 '--existing-feedstock-node-attrs',
 '-',
 '--kwargs',
 '{\n "hash_type": "sha256"\n}',
 '--log-level',
 'info']
output: ('checking file setup.py\n'
 'Hunk #1 FAILED at 462.\n'
 '1 out of 1 hunk FAILED\n'
 '{\n'
 ' "data": {\n'
 '  "commit_message": "updated v2024.6.1",\n'
 '  "migrate_return_value": {\n'
 '   "bot_rerun": false,\n'
 '   "migrator_name": "Version",\n'
 '   "migrator_version": 0,\n'
 '   "version": "2024.6.1"\n'
 '  },\n'
 '  "permissions": {\n'
 '   ".azure-pipelines": 64,\n'
 '   ".azure-pipelines/azure-pipelines-linux.yml": 64,\n'
 '   ".azure-pipelines/azure-pipelines-osx.yml": 64,\n'
 '   ".azure-pipelines/azure-pipelines-win.yml": 64,\n'
 '   ".ci_support": 64,\n'
 '   ".ci_support/README": 0,\n'
 '   ".ci_support/linux_64_numpy1.22python3.10.____cpython.yaml": 0,\n'
 '   ".ci_support/linux_64_numpy1.22python3.9.____73_pypy.yaml": 0,\n'
 '   ".ci_support/linux_64_numpy1.22python3.9.____cpython.yaml": 0,\n'
 '   ".ci_support/linux_64_numpy1.23python3.11.____cpython.yaml": 0,\n'
 '   ".ci_support/linux_64_numpy1.26python3.12.____cpython.yaml": 0,\n'
 '   ".ci_support/linux_aarch64_numpy1.22python3.10.____cpython.yaml": 0,\n'
 '   ".ci_support/linux_aarch64_numpy1.22python3.9.____73_pypy.yaml": 0,\n'
 '   ".ci_support/linux_aarch64_numpy1.22python3.9.____cpython.yaml": 0,\n'
 '   ".ci_support/linux_aarch64_numpy1.23python3.11.____cpython.yaml": 0,\n'
 '   ".ci_support/linux_aarch64_numpy1.26python3.12.____cpython.yaml": 0,\n'
 '   ".ci_support/linux_ppc64le_numpy1.22python3.10.____cpython.yaml": 0,\n'
 '   ".ci_support/linux_ppc64le_numpy1.22python3.9.____73_pypy.yaml": 0,\n'
 '   ".ci_support/linux_ppc64le_numpy1.22python3.9.____cpython.yaml": 0,\n'
 '   ".ci_support/linux_ppc64le_numpy1.23python3.11.____cpython.yaml": 0,\n'
 '   ".ci_support/linux_ppc64le_numpy1.26python3.12.____cpython.yaml": 0,\n'
 '   ".ci_support/migrations": 64,\n'
 '   ".ci_support/migrations/pypy38.yaml": 0,\n'
 '   ".ci_support/migrations/python312.yaml": 0,\n'
 '   ".ci_support/osx_64_numpy1.22python3.10.____cpython.yaml": 0,\n'
 '   ".ci_support/osx_64_numpy1.22python3.9.____73_pypy.yaml": 0,\n'
 '   ".ci_support/osx_64_numpy1.22python3.9.____cpython.yaml": 0,\n'
 '   ".ci_support/osx_64_numpy1.23python3.11.____cpython.yaml": 0,\n'
 '   ".ci_support/osx_64_numpy1.26python3.12.____cpython.yaml": 0,\n'
 '   ".ci_support/osx_arm64_numpy1.22python3.10.____cpython.yaml": 0,\n'
 '   ".ci_support/osx_arm64_numpy1.22python3.9.____cpython.yaml": 0,\n'
 '   ".ci_support/osx_arm64_numpy1.23python3.11.____cpython.yaml": 0,\n'
 '   ".ci_support/osx_arm64_numpy1.26python3.12.____cpython.yaml": 0,\n'
 '   ".ci_support/win_64_numpy1.22python3.10.____cpython.yaml": 0,\n'
 '   ".ci_support/win_64_numpy1.22python3.9.____73_pypy.yaml": 0,\n'
 '   ".ci_support/win_64_numpy1.22python3.9.____cpython.yaml": 0,\n'
 '   ".ci_support/win_64_numpy1.23python3.11.____cpython.yaml": 0,\n'
 '   ".ci_support/win_64_numpy1.26python3.12.____cpython.yaml": 0,\n'
 '   ".circleci": 64,\n'
 '   ".circleci/config.yml": 0,\n'
 '   ".gitattributes": 0,\n'
 '   ".github": 64,\n'
 '   ".github/CODEOWNERS": 0,\n'
 '   ".github/workflows": 64,\n'
 '   ".github/workflows/automerge.yml": 0,\n'
 '   ".github/workflows/webservices.yml": 0,\n'
 '   ".gitignore": 0,\n'
 '   ".scripts": 64,\n'
 '   ".scripts/build_steps.sh": 64,\n'
 '   ".scripts/logging_utils.sh": 0,\n'
 '   ".scripts/run_docker_build.sh": 64,\n'
 '   ".scripts/run_osx_build.sh": 64,\n'
 '   ".scripts/run_win_build.bat": 64,\n'
 '   "LICENSE.txt": 0,\n'
 '   "README.md": 0,\n'
 '   "azure-pipelines.yml": 0,\n'
 '   "build-locally.py": 64,\n'
 '   "conda-forge.yml": 0,\n'
 '   "recipe": 64,\n'
 '   "recipe/allow_jxl.patch": 0,\n'
 '   "recipe/bld.bat": 0,\n'
 '   "recipe/build.sh": 0,\n'
 '   "recipe/meta.yaml": 0\n'
 '  },\n'
 '  "pr_body": "It is very likely that the current package version for this '
 'feedstock is out of date.\\n\\nChecklist before merging this PR:\\n- [ ] '
 'Dependencies have been updated if changed: see '
 '[upstream](https://github.com/cgohlke/imagecodecs)\\n- [ ] Tests have passed '
 '\\n- [ ] Updated license if changed and `license_file` is packaged '
 "\\n\\nInformation about this PR:\\n1. Feel free to push to the bot's branch "
 'to update this PR if needed.\\n2. The bot will almost always only open one '
 'PR per version.\\n3. The bot will stop issuing PRs if more than 3 version '
 "bump PRs generated by the bot are open. If you don't want to package a "
 'particular version please close the PR.\\n4. If you want these PRs to be '
 'merged automatically, make an issue with '
 '<code>@conda-forge-admin,</code>`please add bot automerge` in the title and '
 'merge the resulting PR. This command will add our bot automerge feature to '
 'your feedstock.\\n5. If this PR was opened in error or needs to be updated '
 'please add the `bot-rerun` label to this PR. The bot will close this PR and '
 'schedule another one. If you do not have permissions to add this label, you '
 'can use the phrase <code>@<space/>conda-forge-admin, please rerun bot</code> '
 'in a PR comment to have the `conda-forge-admin` add it for '
 'you.\\n\\n\\n\\nPending Dependency Version '
 'Updates\\n--------------------\\n\\nHere is a list of all the pending '
 'dependency version updates for this repo. Please double check all '
 'dependencies before merging.\\n\\n| Name | Upstream Version | Current '
 'Version '
 '|\\n|:----:|:----------------:|:---------------:|\\n|lerc|4.0.4|[![Anaconda-Server '
 'Badge](https://img.shields.io/conda/vn/conda-forge/lerc.svg)](https://anaconda.org/conda-forge/lerc)|\\n|libjpeg-turbo|9e|[![Anaconda-Server '
 'Badge](https://img.shields.io/conda/vn/conda-forge/libjpeg-turbo.svg)](https://anaconda.org/conda-forge/libjpeg-turbo)|\\n\\n\\nDependency '
 "Analysis\\n--------------------\\n\\nWe couldn't run dependency analysis due "
 'to an internal error in the bot, depfinder, or grayskull. :/ Help is very '
 'welcome!\\n\\n<sub>This PR was created by the '
 '[regro-cf-autotick-bot](https://github.com/regro/cf-scripts). The '
 '**regro-cf-autotick-bot** is a service to automatically track the dependency '
 'graph, migrate packages, and propose package version updates for '
 'conda-forge. Feel free to drop us a line if there are any '
 '[issues](https://github.com/regro/cf-scripts/issues)! This PR was generated '
 'by  - please use this URL for debugging.</sub>",\n'
 '  "pr_title": "imagecodecs v2024.6.1"\n'
 ' },\n'
 ' "default_branch": "main",\n'
 ' "feedstock_name": "imagecodecs",\n'
 ' "input_kwargs": "{\\n \\"hash_type\\": \\"sha256\\"\\n}"\n'
 '}\n')
@jakirkham
Copy link
Contributor Author

FWIW this issue doesn't occur when using the bot request to create the version update PR ( conda-forge/imagecodecs-feedstock#107 )

@beckermr
Copy link
Contributor

beckermr commented Jun 3, 2024

The issue here is that the patch (https://github.com/conda-forge/imagecodecs-feedstock/blob/main/recipe/meta.yaml#L12) does not apply with the new source. The bot downloads the source using the functions in conda-build which attempts to apply the patches. You can see the failure in the HUNK 1 of 1 text above.

@beckermr
Copy link
Contributor

beckermr commented Jun 3, 2024

The reason the issue version request works is that the bot is not attempting to inspect the source code for missing deps in that case.

@jakirkham
Copy link
Contributor Author

Would it make sense for the bot to skip applying patches?

@beckermr
Copy link
Contributor

beckermr commented Jun 3, 2024

The bot should have swallowed this error and said the dep analysis did not work.

The patch application error is a red-herring.

@jakirkham
Copy link
Contributor Author

Sorry I missed it. What dependency is the bot having issues with?

@beckermr
Copy link
Contributor

beckermr commented Jun 3, 2024

Sorry I may have mistyped. The bot uses depfinder and grayskull to look for package deps not in the recipe.

@jakirkham
Copy link
Contributor Author

Oh I see now...

We couldn't run dependency analysis due to an internal error in the bot, depfinder, or grayskull.

Is there a way for a feedstock to turn these off?

@beckermr
Copy link
Contributor

beckermr commented Jun 4, 2024

yes - bot.inspection: False in the conda-forge.yml. This is a legit bug in the bot though so we should fix it as opposed to just turning it off.

@jakirkham
Copy link
Contributor Author

cc @hmaarrfk (for awareness)

@ericpre
Copy link

ericpre commented Jan 11, 2025

Possibly a different issue, but it seems that the bot doesn't work when a version update is requested: conda-forge/imagecodecs-feedstock#124.

Here is the beginning of the log with an error (there are more similar errors in the rest of the log):

from https://github.com/conda-forge/conda-forge-webservices/actions/runs/12722873077/job/35467408140

2025-01-11 08:57:12,056 INFO     conda_forge_webservices.github_actions_integration.__main__ || task `version_update` for conda-forge/imagecodecs-feedstock#124
Notice: task `version_update` for conda-forge/imagecodecs-feedstock#124
2025-01-11 08:57:12,057 DEBUG    git.util || Failed checking if running in CYGWIN due to: FileNotFoundError(2, 'No such file or directory')
2025-01-11 08:57:12,057 DEBUG    git.cmd || Popen(['git', 'clone', '-v', '--', 'https://github.com/conda-forge/imagecodecs-feedstock.git', '/home/runner/work/conda-forge-webservices/conda-forge-webservices/task-data/imagecodecs-feedstock'], cwd=/home/runner/work/conda-forge-webservices/conda-forge-webservices, stdin=None, shell=False, universal_newlines=True)
2025-01-11 08:57:12,180 DEBUG    git.repo.base || Cmd(['git', 'clone', '-v', '--', 'https://github.com/conda-forge/imagecodecs-feedstock.git', '/home/runner/work/conda-forge-webservices/conda-forge-webservices/task-data/imagecodecs-feedstock'])'s unused stdout: 
2025-01-11 08:57:12,182 DEBUG    git.cmd || Popen(['git', 'fetch', '-v', '--', 'origin', 'pull/1[24](https://github.com/conda-forge/conda-forge-webservices/actions/runs/12722873077/job/35467408140#step:5:25)/head:pull/124/head'], cwd=/home/runner/work/conda-forge-webservices/conda-forge-webservices/task-data/imagecodecs-feedstock, stdin=None, shell=False, universal_newlines=True)
2025-01-11 08:57:12,287 DEBUG    git.cmd || Popen(['git', 'switch', 'pull/124/head'], cwd=/home/runner/work/conda-forge-webservices/conda-forge-webservices/task-data/imagecodecs-feedstock, stdin=None, shell=False, universal_newlines=False)
20[25](https://github.com/conda-forge/conda-forge-webservices/actions/runs/12722873077/job/35467408140#step:5:26)-01-11 08:57:12,292 DEBUG    git.cmd || Popen(['git', 'cat-file', '--batch-check'], cwd=/home/runner/work/conda-forge-webservices/conda-forge-webservices/task-data/imagecodecs-feedstock, stdin=<valid stream>, shell=False, universal_newlines=False)
2025-01-11 08:57:12,294 INFO     conda_forge_webservices.github_actions_integration.__main__ || version update requested version: 'None'
docker image pull
2025-01-11 08:57:30,539 INFO     conda_forge_webservices.github_actions_integration.version_updating || using feedstock name imagecodecs for repo conda-forge/imagecodecs-feedstock
2025-01-11 08:57:30,539 INFO     conda_forge_webservices.github_actions_integration.version_updating || computing feedstock attributes
2025-01-11 08:57:30,540 DEBUG    conda_forge_tick.feedstock_parser || computed effective logging level: debug
2025-01-11 08:57:33,473 DEBUG    conda_forge_tick.feedstock_parser || # of ci support files: 30
2025-01-11 08:57:33,473 DEBUG    conda_forge_tick.feedstock_parser || parsing conda-build config: /tmp/tmpwdst9px8/imagecodecs-feedstock-main/.ci_support/linux_64_numpy2.0python3.10.____cpython.yaml
2025-01-11 08:57:33,907 DEBUG    conda.base.context || [Errno 13] Permission denied: '/opt/conda/envs/cf-feedstock-ops/conda-meta/history'
2025-01-11 08:57:33,908 DEBUG    conda.base.context || [Errno 13] Permission denied: '/opt/conda/envs/cf-feedstock-ops/conda-meta/history'
2025-01-11 08:57:33,954 DEBUG    conda_forge_tick.utils || parsing for platform linux with cbc /tmp/tmpwdst9px8/imagecodecs-feedstock-main/.ci_support/linux_64_numpy2.0python3.10.____cpython.yaml and arch 64
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.
Adding in variants from internal_defaults
Adding in variants from /tmp/tmpwdst9px8/imagecodecs-feedstock-main/.ci_support/linux_64_numpy2.0python3.10.____cpython.yaml
Adding in variants from config.variant
2025-01-11 08:57:33,996 DEBUG    conda_forge_tick.utils || key-val not string: zip_keys: [['python', 'numpy'], ['c_compiler_version', 'cxx_compiler_version']]
Traceback (most recent call last):
  File "/opt/conda/envs/cf-feedstock-ops/lib/python3.11/site-packages/conda_forge_tick/utils.py", line 933, in _parse_meta_yaml_impl
    if cfg_as_dict[key].startswith("/"):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'list' object has no attribute 'startswith'
2025-01-11 08:57:33,997 DEBUG    conda_forge_tick.utils || key-val not string: pin_run_as_build: {'python': {'min_pin': 'x.x', 'max_pin': 'x.x'}, 'r-base': {'min_pin': 'x.x', 'max_pin': 'x.x'}}
Traceback (most recent call last):
  File "/opt/conda/envs/cf-feedstock-ops/lib/python3.11/site-packages/conda_forge_tick/utils.py", line 933, in _parse_meta_yaml_impl
    if cfg_as_dict[key].startswith("/"):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'dict' object has no attribute 'startswith'
2025-01-11 08:57:33,997 DEBUG    conda_forge_tick.utils || key-val not string: extend_keys: ['pin_run_as_build', 'ignore_version', 'ignore_build_only_deps', 'extend_keys']
Traceback (most recent call last):
  File "/opt/conda/envs/cf-feedstock-ops/lib/python3.11/site-packages/conda_forge_tick/utils.py", line [93](https://github.com/conda-forge/conda-forge-webservices/actions/runs/12722873077/job/35467408140#step:5:95)3, in _parse_meta_yaml_impl
    if cfg_as_dict[key].startswith("/"):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'list' object has no attribute 'startswith'
2025-01-11 08:57:33,997 DEBUG    conda_forge_tick.utils || key-val not string: ignore_build_only_deps: ['python', 'numpy']
Traceback (most recent call last):
  File "/opt/conda/envs/cf-feedstock-ops/lib/python3.11/site-packages/conda_forge_tick/utils.py", line 933, in _parse_meta_yaml_impl
    if cfg_as_dict[key].startswith("/"):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'list' object has no attribute 'startswith'
2025-01-11 08:57:33,9[98](https://github.com/conda-forge/conda-forge-webservices/actions/runs/12722873077/job/35467408140#step:5:100) DEBUG    conda_forge_tick.utils || jinja2 environmment:

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

3 participants