canonical / testflinger

https://testflinger.readthedocs.io/en/latest/
GNU General Public License v3.0
11 stars 17 forks source link

device-connectors: Fix handling attachments with absolute path in oem-autoinstall #338

Closed Artur-at-work closed 1 month ago

Artur-at-work commented 1 month ago

Description

oem_autoinstall fails when user gives absolute path in job.yaml (i.e /home/artur/files/jenkins-token.txt), but if relative path (i.e files/jenkins-token.txt) is given then it works. Missed this bug at first, because was testing on local machine and when absolute path was overwriting ATTACHMENTS_DIR it still pointed to the right file. But when deployed in charm it failed to find the attachments correctly.

Resolved issues

Closes https://warthogs.atlassian.net/browse/OEX86-416

Documentation

n/a

Web service API changes

n/a

Tests

Run agent charm and test provisioning on HP machine.

Before fix: https://testflinger.canonical.com/jobs/67001261-d590-41a1-bb3d-43a3e5db153b

After fix: https://testflinger.canonical.com/jobs/f86f6684-45be-407b-8db6-ca724c828606

Artur-at-work commented 1 month ago

@plars could you help to review please? or should I ask oem team to review when smaller changes?