lpcraft fails to pass output files between jobs

Bug #1986244 reported by Dan Ryan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lpci
Invalid
High
Jürgen Gmach

Bug Description

I have recently been attempting to get lpcraft to perform a build and pass its build output to a new job using the `input` section. However, I am unable to successfully run this command. Instead, the `build` stage runs, and then I see the following error:

```
$ lpcraft run --clean --output out
....<snipped>...
Requested input from 'build', but more than one job with that name was previously executed and produced output artifacts.
Full execution log: '/home/techalchemy/.cache/lpcraft/log/lpcraft-20220812-130742.450361.log'
```

In addition to the above error, this also leaves the lxd container around, despite running lpcraft with `--clean`:

$ lxc list --project lpcraft
+---------------------------------------------+---------+------+------+-----------+-----------+
| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS |
+---------------------------------------------+---------+------+------+-----------+-----------+
| lpcraft-huggingface-hub-7152020-focal-amd64 | STOPPED | | | CONTAINER | 0 |
+---------------------------------------------+---------+------+------+-----------+-----------+

If I delete the container, the problem simply occurs again and the container does not get deleted.

Here is the `.launchpad.yaml` I am using:

jobs:
  build:
    series: focal
    architectures: amd64
    environment:
      TOX_TESTENV_PASSENV: http_proxy https_proxy PIP_EXTRA_INDEX_URL
      no_proxy: localhost
    output:
      paths:
      - dist/*.whl
      - dist/*.tar.gz
    packages:
    - python3-dev
    - python3-pip
    - python3-venv
    - git
    - ffmpeg
    run: |-
      python3 -m pip install --user --upgrade --upgrade-strategy=eager pip setuptools build
      python3 -m build .
  test:
    series: focal
    architectures: amd64
    environment:
      TOX_TESTENV_PASSENV: http_proxy https_proxy PIP_EXTRA_INDEX_URL
      no_proxy: localhost
    input:
      job-name: build
      target-directory: build_artifacts
    packages:
    - python3-dev
    - python3-pip
    - python3-venv
    - git
    - git-lfs # Tests
    run: |-
      export PIP_EXTRA_INDEX_URL="https://pypi.org/simple" && python3 -m pip install pytest build_artifacts/files/dist/*.tar.gz
      # First test seems to be inconsistent + second is deprecated"
      python3 -m pytest -sv ./tests/
pipeline:
- build
- test

Revision history for this message
Jürgen Gmach (jugmac00) wrote :

Cannot reproduce the issue on my setup.

I do experience another issue as soon as I use the `clean` flag, see https://bugs.launchpad.net/lpcraft/+bug/1986374

Dan mentioned he is rebasing Colin's release command branch onto main.

Revision history for this message
Jürgen Gmach (jugmac00) wrote :

The reason for the failure was a leftover in the `/out` folder which still used the old way of storing things, ie release specific, which resulted in two artifacts instead of the allowed one -> exception.

```
>>> source_jobs

[PosixPath('out/build/0'), PosixPath('out/build/focal')]
```

Changed in lpcraft:
status: New → Invalid
importance: Undecided → High
assignee: nobody → Jürgen Gmach (jugmac00)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.