Skip to content

[ci] tuf-repo: more curl flags fun#3384

Merged
luqmana merged 2 commits into
mainfrom
luqmana/ci-tuf-repo-curl
Jun 20, 2023
Merged

[ci] tuf-repo: more curl flags fun#3384
luqmana merged 2 commits into
mainfrom
luqmana/ci-tuf-repo-curl

Conversation

@luqmana

@luqmana luqmana commented Jun 20, 2023

Copy link
Copy Markdown
Contributor

Tried to do a mupdate over the weekend using the TUF repo outputed from the omicron CI job and ran into a failure while trying to update the scrimlet's SP. Peeking at the artifacts showed some suspicious file sizes:

      168  01-01-1980 00:00   repo/targets/78dee8daef1dcffd8138be2ca1faf0bf5557fe471cba10e7b8bc454269e67a4d.gimlet_sp-1.0.0-alpha+gitbf0963aa2a2.tar.gz
      168  01-01-1980 00:00   repo/targets/78dee8daef1dcffd8138be2ca1faf0bf5557fe471cba10e7b8bc454269e67a4d.psc_sp-1.0.0-alpha+gitbf0963aa2a2.tar.gz
      168  01-01-1980 00:00   repo/targets/78dee8daef1dcffd8138be2ca1faf0bf5557fe471cba10e7b8bc454269e67a4d.switch_sp-1.0.0-alpha+gitbf0963aa2a2.tar.gz

I know hubris builds can be small but 168 bytes seems a bit too small 😅.

$  file gimlet_sp.tar.gz
gimlet_sp.tar.gz:       ascii text

$  cat gimlet_sp.tar.gz
{
  "message": "You must have the actions scope to download artifacts.",
  "documentation_url": "https://docs.github.com/rest/reference/actions#download-an-artifact"
}

Hopefully --netrc is enough there; not sure what scopes are included in the API key buildomat plumbs. Also added some more useful flags for scripted curl.

luqmana added 2 commits June 20, 2023 17:57
An actions scope is needed to download artifacts from the Github API.
Pass `--netrc` to use the buildomat provided API key as we do for the
other curl invocations.
Some useful flags for curl in a scripted context:
  -f    fail on server errors
  -s    silent mode
  -S    show error on failure
  -L    follow redirects
@luqmana luqmana requested a review from iliana June 20, 2023 18:16

@iliana iliana left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't believe I missed that one!

@luqmana luqmana enabled auto-merge (squash) June 20, 2023 18:56
@luqmana luqmana merged commit 9eb7bbb into main Jun 20, 2023
@luqmana luqmana deleted the luqmana/ci-tuf-repo-curl branch June 20, 2023 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants