Skip to content
This repository has been archived by the owner on Feb 6, 2024. It is now read-only.

Exit the resolver if publishing fails #188

Merged
merged 1 commit into from
Oct 12, 2018

Conversation

ceason
Copy link
Contributor

@ceason ceason commented Oct 5, 2018

Currently, when there is a problem publishing an image a message will be printed to stderr, but the resolver still tries to resolve the template anyway. The output looks successful (valid yaml on stdout and a returncode of 0) but has one or more problems:

  • Image is output unmodified (tag not resolved to a digest)
  • Image is resolved to the currently published digest (ie not the digest of the container_image dependency)

It turns out logging.fatal() is actually an alias for logging.critical() (which does not exit the process when invoked), thus the need for explicitly exiting.

@k8s-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: erain

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

@chrislovecnm
Copy link
Contributor

/ok-to-test

@k8s-ci-robot
Copy link

@chrislovecnm: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/ok-to-test

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/test-infra repository.

@chrislovecnm
Copy link
Contributor

@nlopezgi @erain can we get a ok-to-test on this? Also it is ready to merge?

@erain
Copy link
Contributor

erain commented Oct 11, 2018

/ok-to-test

@erain
Copy link
Contributor

erain commented Oct 11, 2018

Sorry for the delay! I triggered another round of test and I will merge it once the test finished.

@erain erain merged commit 590f3b4 into bazelbuild:master Oct 12, 2018
@ceason ceason deleted the exit-on-publish-error branch October 13, 2018 12:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants