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 · 10 comments
Open

Bot unable to submit imagecodecs version 2024.6.1 update #2691

jakirkham opened this issue Jun 3, 2024 · 10 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)

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