Skip to content

need better reporting for files mentioned in Dockerfile but missing on disk #967

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

Open
jiridanek opened this issue Mar 19, 2025 · 1 comment

Comments

@jiridanek
Copy link
Member

jiridanek commented Mar 19, 2025

maybe I'm creating a duplicate, because we already had one instance of this happening, and maybe somebody created ticket then

when sandbox.py or generator for tekton pipelines find that there is missing file, they crash with exception

turns out developers then have trouble figuring out it's their mistake and not the tools

@jiridanek
Copy link
Member Author

Here's an example of the hard to understand error

https://github.com/opendatahub-io/notebooks/actions/runs/13951200220/job/39051215307?pr=943#step:19:61

+ /home/runner/work/notebooks/notebooks/scripts/sandbox.py --dockerfile jupyter/datascience/ubi9-python-3.11/Dockerfile.cpu -- podman build --cache-from ghcr.io/opendatahub-io/notebooks/workbench-images/build-cache --tag ghcr.io/opendatahub-io/notebooks/workbench-images:jupyter-datascience-ubi9-python-3.11-943_merge_78943fcdb427d052be1f1edd281db45e867cb4c9 --file jupyter/datascience/ubi9-python-3.11/Dockerfile.cpu '{};'
2025/03/19 16:18:50 found paths: ["jupyter/datascience/ubi9-python-3.11/Pipfile.lock","jupyter/datascience/ubi9-python-3.11/mongodb-org-6.0.repo-x86_64","jupyter/datascience/ubi9-python-3.11/mssql-2022.repo-x86_64","jupyter/datascience/ubi9-python-3.11/runtime-images","jupyter/datascience/ubi9-python-3.11/setup-elyra.sh","jupyter/datascience/ubi9-python-3.11/utils","jupyter/minimal/ubi9-python-3.11/start-notebook.sh","jupyter/utils"]
__file__='/home/runner/work/notebooks/notebooks/scripts/sandbox.py' started with args=Namespace(dockerfile=PosixPath('jupyter/datascience/ubi9-python-3.11/Dockerfile.cpu'), remaining=['--', 'podman', 'build', '--cache-from', 'ghcr.io/opendatahub-io/notebooks/workbench-images/build-cache', '--tag', 'ghcr.io/opendatahub-io/notebooks/workbench-images:jupyter-datascience-ubi9-python-3.11-943_merge_78943fcdb[42](https://github.com/opendatahub-io/notebooks/actions/runs/13951200220/job/39051215307?pr=943#step:19:43)7d052be1f1edd281db45e867cb4c9', '--file', 'jupyter/datascience/ubi9-python-3.11/Dockerfile.cpu', '{};'])
prereqs=[PosixPath('jupyter/datascience/ubi9-python-3.11/Pipfile.lock'), PosixPath('jupyter/datascience/ubi9-python-3.11/mongodb-org-6.0.repo-x86_64'), PosixPath('jupyter/datascience/ubi9-python-3.11/mssql-2022.repo-x86_64'), PosixPath('jupyter/datascience/ubi9-python-3.11/runtime-images'), PosixPath('jupyter/datascience/ubi9-python-3.11/setup-elyra.sh'), PosixPath('jupyter/datascience/ubi9-python-3.11/utils'), PosixPath('jupyter/minimal/ubi9-python-3.11/start-notebook.sh'), PosixPath('jupyter/utils')]
Traceback (most recent call last):
  File "/home/runner/work/notebooks/notebooks/scripts/sandbox.py", line 82, in <module>
    sys.exit(main())
             ~~~~^^
  File "/home/runner/work/notebooks/notebooks/scripts/sandbox.py", line 44, in main
    setup_sandbox(prereqs, pathlib.Path(tmpdir))
    ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/notebooks/notebooks/scripts/sandbox.py", line 78, in setup_sandbox
    shutil.copy(dep, tmpdir / dep.parent)
    ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/linuxbrew/.linuxbrew/Cellar/[email protected]/3.13.2/lib/python3.13/shutil.py", line 428, in copy
    copyfile(src, dst, follow_symlinks=follow_symlinks)
    ~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/linuxbrew/.linuxbrew/Cellar/[email protected]/3.13.2/lib/python3.13/shutil.py", line 260, in copyfile
    with open(src, 'rb') as fsrc:
         ~~~~^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'jupyter/datascience/ubi9-python-3.11/runtime-images'
make: *** [Makefile:128: jupyter-datascience-ubi9-python-3.11] Error 1
Error: Process completed with exit code 2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 📋 Backlog
Development

No branches or pull requests

1 participant