Skip to content
This repository was archived by the owner on Mar 13, 2024. It is now read-only.
This repository was archived by the owner on Mar 13, 2024. It is now read-only.

Direct Github dependencies cause issues with locking #127

@callumforrester

Description

@callumforrester

When I add a dependency such as

"dodal @ git+https://github.com/DiamondLightSource/dodal.git",

to pyproject.toml, it gets locked into requirements.txt as

dodal @ git+https://github.com/DiamondLightSource/dodal.git@6b387f690f7978d2e3f0a4f180dd46b10e2623ba

i.e. the most recent commit hash. The container CI job then fails because it thinks these two are different things i.e.

#12 12.87 ERROR: Cannot install dodal 0.0.2.dev3+g6b387f6 (from git+https://github.com/DiamondLightSource/dodal.git@6b387f690f7978d2e3f0a4f180dd46b10e2623ba) and htss-rig-bluesky==0.1.dev58+g1ace857 because these package versions have conflicting dependencies.

I cannot determine exactly why, the workaround is to exclude the affected package from the lockfile altogether in .github/install_requirements/action.yml, in this case:

    - name: Create lockfile
      run: |
        mkdir -p lockfiles
        pip freeze --exclude-editable --exclude dodal > lockfiles/${{ inputs.requirements_file }}
        # delete the self referencing line and make sure it isn't blank
        sed -i '/file:/d' lockfiles/${{ inputs.requirements_file }}
      shell: bash

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions