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

assemble_packages: CodebaseResource matching query does not exist #515

Closed
tdruez opened this issue Sep 1, 2022 · 1 comment
Closed

assemble_packages: CodebaseResource matching query does not exist #515

tdruez opened this issue Sep 1, 2022 · 1 comment
Assignees
Labels
bug Something isn't working
Milestone

Comments

@tdruez
Copy link
Member

tdruez commented Sep 1, 2022

Using https://files.pythonhosted.org/packages/ce/21/41a0028f6d610987c0839250357c1a00f351790b8a448c2eb323caa719ac/celery-5.2.7.tar.gz as input with the root_filesystems pipeline:

CodebaseResource matching query does not exist.

Traceback:
  File "/app/scanpipe/pipelines/__init__.py", line 115, in execute
    step(self)
  File "/app/scanpipe/pipelines/root_filesystems.py", line 118, in scan_for_application_packages
    scancode.scan_for_application_packages(self.project)
  File "/app/scanpipe/pipes/scancode.py", line 334, in scan_for_application_packages
    assemble_packages(project=project)
  File "/app/scanpipe/pipes/scancode.py", line 377, in assemble_packages
    for item in items:
  File "/usr/local/lib/python3.9/site-packages/packagedcode/pypi.py", line 224, in assemble
    root = package_resource.parent(codebase)
  File "/app/scanpipe/models.py", line 1710, in parent
    return parent_path and self.project.codebaseresources.get(path=parent_path)
  File "/usr/local/lib/python3.9/site-packages/django/db/models/manager.py", line 85, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/django/db/models/query.py", line 650, in get
    raise self.model.DoesNotExist(

Note that this issue does not occur with the scan_codebase nor scan_package pipelines.

@tdruez tdruez added the bug Something isn't working label Sep 1, 2022
@tdruez tdruez added this to the v32.0.0 milestone Sep 1, 2022
JonoYang added a commit that referenced this issue Sep 1, 2022
    * Update test expectations

Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Sep 1, 2022
    * Update test expectations

Signed-off-by: Jono Yang <jyang@nexb.com>
tdruez pushed a commit that referenced this issue Sep 2, 2022
* Update test expectations

Signed-off-by: Jono Yang <jyang@nexb.com>
@tdruez
Copy link
Member Author

tdruez commented Sep 2, 2022

Issue fixed thanks to @JonoYang PR #517 👍

@tdruez tdruez closed this as completed Sep 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants