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

Catch curl upload error when upload fails #892

Merged
merged 1 commit into from
Nov 5, 2024

Conversation

Sunnatillo
Copy link
Member

@Sunnatillo Sunnatillo commented Nov 5, 2024

Jenkins job did not fail when curl upload file failed, it finished successfull eenthough images were not uploaded.
https://jenkins.nordix.org/view/Metal3%20Periodic/job/metal3_periodic_node_image_building/97/consoleFull

{
  "errors" : [ {
    "status" : 403,
   "message" : "Login has failed. Due to Incorrect username/password or locked user."
  } ]

This PR fixes this issue.

Also corrects number comparison conditions.

@metal3-io-bot metal3-io-bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Nov 5, 2024
@Sunnatillo
Copy link
Member Author

/override metal3-ubuntu-e2e-integration-test-main

@metal3-io-bot
Copy link
Collaborator

@Sunnatillo: Overrode contexts on behalf of Sunnatillo: metal3-ubuntu-e2e-integration-test-main

In response to this:

/override metal3-ubuntu-e2e-integration-test-main

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@Sunnatillo Sunnatillo changed the title Catch curl uploading error when upload fails Catch curl upload error when upload fails Nov 5, 2024
@Sunnatillo Sunnatillo force-pushed the catch-upload-error/sunnat branch from bb62087 to df41296 Compare November 5, 2024 12:23
@metal3-io-bot metal3-io-bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Nov 5, 2024
Copy link
Member

@tuminoid tuminoid left a comment

Choose a reason for hiding this comment

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

/approve

@@ -21,7 +21,8 @@ rt_upload_artifact() {
ANONYMOUS="${3:-1}"

_CMD="curl \
$( ([[ "${ANONYMOUS}" != 1 ]] && echo " -u${RT_USER:?}:${RT_TOKEN:?}") || true) \
--fail-with-body \
$( ([[ ""${ANONYMOUS}" -ne 1 ]] && echo " -u${RT_USER:?}:${RT_TOKEN:?}") || true) \
Copy link
Member

Choose a reason for hiding this comment

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

I also now realized how bad this line of code actually is, but let's fix that in another PR.

@metal3-io-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tuminoid

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@metal3-io-bot metal3-io-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 5, 2024
Also corrects conditions of number comparions.

Signed-off-by: Sunnatillo <sunnat.samadov@est.tech>
@Sunnatillo Sunnatillo force-pushed the catch-upload-error/sunnat branch from df41296 to 972ab7a Compare November 5, 2024 12:38
@Sunnatillo
Copy link
Member Author

/override metal3-ubuntu-e2e-integration-test-main

@metal3-io-bot
Copy link
Collaborator

@Sunnatillo: Overrode contexts on behalf of Sunnatillo: metal3-ubuntu-e2e-integration-test-main

In response to this:

/override metal3-ubuntu-e2e-integration-test-main

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Copy link
Member

@lentzi90 lentzi90 left a comment

Choose a reason for hiding this comment

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

/lgtm

@metal3-io-bot metal3-io-bot added the lgtm Indicates that a PR is ready to be merged. label Nov 5, 2024
@metal3-io-bot metal3-io-bot merged commit 85d6766 into metal3-io:main Nov 5, 2024
6 checks passed
@metal3-io-bot metal3-io-bot deleted the catch-upload-error/sunnat branch November 5, 2024 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants