ko-build / ko-build/ko

--tags and --tag-only are not respected when --push=false is specified

Open
#688 1 comment 0 reactions 0 assignees View on GitHub
lifecycle/frozen
Dominant language
Go
Stars
8.5k
Forks
447
PR merge metrics
No merged PRs in 30d

Description

## Bug Report

When running `build`, `resolve`, or `apply` with `--push=false`, the `-t` or `--tags` and `--tag-only` options are not respected.

### Expected Behavior

When `-t` or `--tags` option is used with `--push=false`, ko produces an image with the tag applied.
When the `--tag-only` option is used with `--push=false`, image references in `ko resolve` and `ko apply` reference images by tag (not sha).

### Actual Behavior

Only image shas are used in ko appy/resolve when `--push=false`.

### ko version

v0.11.2

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the behavior in the `build`, `resolve`, and `apply` entry points with `--push=false`, using both `--tags` and `--tag-only`. Trace how image references are formed in those paths; done means tags are preserved for `--tags`, and `ko resolve` and `ko apply` use tagged references rather than SHA references for `--tag-only`.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.