Skip to content

bazel run :elafros doesn't fail if push fails #546

Closed

Description

@adrcunha

Expected Behavior

bazel run :elafros should fail if images can't be pushed to the repo.

Actual Behavior

Error is output, but the process returns with code 0.

Steps to Reproduce the Problem

  1. Set DOCKER_REPO_OVERRIDE to a registry you have no write access to (maybe a bogus value will also work?)
  2. Run hack/release.sh
  3. You'll see errors for bazel run :elafros and bazel run @buildcrd//:everything because the images can't be pushed, but the script will really fail during the gsutil cp step.

Additional Info

W0330 05:12:36.618] INFO: Running command line: bazel-bin/external/buildcrd/everything
W0330 05:12:37.834] CRITICAL:root:Error publishing provided image: Bad status during token exchange: 401
W0330 05:12:37.834] {"errors":[{"code":"UNAUTHORIZED","message":"You don't have the needed permissions to perform this operation, and you may have invalid credentials. To authenticate your request, follow the steps in: https://cloud.google.com/container-registry/docs/advanced-authentication"}]}
W0330 05:12:37.933] CRITICAL:root:Error publishing provided image: Bad status during token exchange: 401
W0330 05:12:37.933] {"errors":[{"code":"UNAUTHORIZED","message":"You don't have the needed permissions to perform this operation, and you may have invalid credentials. To authenticate your request, follow the steps in: https://cloud.google.com/container-registry/docs/advanced-authentication"}]}
W0330 05:12:38.028] CRITICAL:root:Error publishing provided image: Bad status during token exchange: 401
W0330 05:12:38.029] {"errors":[{"code":"UNAUTHORIZED","message":"You don't have the needed permissions to perform this operation, and you may have invalid credentials. To authenticate your request, follow the steps in: https://cloud.google.com/container-registry/docs/advanced-authentication"}]}

Activity

  1. added
    area/test-and-release
    on Mar 30, 2018
  2. mattmoor commented on Mar 30, 2018

    @mattmoor
    Contributor

    We may just need to update our version of rules_k8s. If Bazel is really returning a zero exit code at HEAD of that repo, then we should open a bug there.

  3. adrcunha commented on Jun 7, 2018

    @adrcunha
    ContributorAuthor

    This is obsolete, now that releases use ko (#1025).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/test-and-release

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions