Skip to content

Cannot assign multiple resources to the same Package using update_or_create_package #681

Description

@JonoYang

In my pipeline, I am trying to associate multiple resources to the same package using update_or_create_package (https://github.com/nexB/purldb/blob/49-on-demand-mining/matchcode-toolkit/src/matchcode_toolkit/pipelines/matching.py#L227). However, this only results in one Resource being associated to a package, despite update_or_create_package being called on all of the Resources that should be associated.

The issue occurs in update_or_create_package at https://github.com/nexB/scancode.io/blob/main/scanpipe/pipes/__init__.py#L123 where if the package already exists, we just update the package data and don't associate a codebase resource to that package, even if a codebase resource has been passed into the function.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions