Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Fix artifact upload logic #101

Merged
merged 1 commit into from
Dec 4, 2024

Conversation

doanac
Copy link
Contributor

@doanac doanac commented Dec 4, 2024

Curl doesn't exit with non-zero code on bad HTTP responses unless you include the --fail-with-body option. This should allow our retry logic to actually work.

This also changed from -v which is too verbose to options that will print response headers and the HTTP status code. A new failure example will look like:

h /tmp/tmp.sh
HTTP/2 404
content-type: text/plain; charset=utf-8
x-content-type-options: nosniff
x-correlation-id: olpibb8dckt9en06
x-cloud-trace-context: b7bce595271f58d4f9ba5110b79664a7;o=1
date: Wed, 04 Dec 2024 16:05:47 GMT
server: Google Frontend
content-length: 15
alt-svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000

Does not exist
curl: (22) The requested URL returned error: 404
404
Error: unable to publish artifacts, sleep and retry
HTTP/2 404
content-type: text/plain; charset=utf-8
x-content-type-options: nosniff
x-correlation-id: ksbj4bkxr0e4ccor
x-cloud-trace-context: 211fe02ffdb72279d1236715f01fc2b8
date: Wed, 04 Dec 2024 16:05:50 GMT
server: Google Frontend
content-length: 15
alt-svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000

Does not exist
curl: (22) The requested URL returned error: 404
404
Error: unable to publish artifacts, sleep and retry
HTTP/2 404
content-type: text/plain; charset=utf-8
x-content-type-options: nosniff
x-correlation-id: mv9svphecr7a5d40
x-cloud-trace-context: 4c284a6b61832b999b5fb7097596324c
date: Wed, 04 Dec 2024 16:05:52 GMT
server: Google Frontend
content-length: 15
alt-svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000

Does not exist
curl: (22) The requested URL returned error: 404
404
Error: unable to publish artifacts, sleep and retry
Failed to publish artifacts

Curl doesn't exit with non-zero code on bad HTTP responses unless you
include the `--fail-with-body` option. This should allow our retry logic
to actually work.

This also changed from `-v` which is too verbose to options that will
print response headers and the HTTP status code. A new failure example
will look like:
```
h /tmp/tmp.sh
HTTP/2 404
content-type: text/plain; charset=utf-8
x-content-type-options: nosniff
x-correlation-id: olpibb8dckt9en06
x-cloud-trace-context: b7bce595271f58d4f9ba5110b79664a7;o=1
date: Wed, 04 Dec 2024 16:05:47 GMT
server: Google Frontend
content-length: 15
alt-svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000

Does not exist
curl: (22) The requested URL returned error: 404
404
Error: unable to publish artifacts, sleep and retry
HTTP/2 404
content-type: text/plain; charset=utf-8
x-content-type-options: nosniff
x-correlation-id: ksbj4bkxr0e4ccor
x-cloud-trace-context: 211fe02ffdb72279d1236715f01fc2b8
date: Wed, 04 Dec 2024 16:05:50 GMT
server: Google Frontend
content-length: 15
alt-svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000

Does not exist
curl: (22) The requested URL returned error: 404
404
Error: unable to publish artifacts, sleep and retry
HTTP/2 404
content-type: text/plain; charset=utf-8
x-content-type-options: nosniff
x-correlation-id: mv9svphecr7a5d40
x-cloud-trace-context: 4c284a6b61832b999b5fb7097596324c
date: Wed, 04 Dec 2024 16:05:52 GMT
server: Google Frontend
content-length: 15
alt-svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000

Does not exist
curl: (22) The requested URL returned error: 404
404
Error: unable to publish artifacts, sleep and retry
Failed to publish artifacts
```

Signed-off-by: Andy Doan <[email protected]>
@ricardosalveti ricardosalveti merged commit 9731612 into qualcomm-linux:main Dec 4, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

3 participants