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

acorn build --tag option accepts invalid repository names #1875

Closed
njhale opened this issue Jun 29, 2023 · 1 comment
Closed

acorn build --tag option accepts invalid repository names #1875

njhale opened this issue Jun 29, 2023 · 1 comment
Labels
kind/bug Something isn't working
Milestone

Comments

@njhale
Copy link
Contributor

njhale commented Jun 29, 2023

Description

The --tag option of the acorn build command accepts invalid repository names. This results in images with unusable tags.

Reproduction Steps

  1. Build w/ an invalid --tag option argument
$ # Assuming a valid Acornfile exists in the current working directory
$ acorn build --tag -bad-name .
$ acorn images
REPOSITORY               TAG             IMAGE-ID
-bad-name                latest          8f2a08b35396

Expected Behavior

acorn build catches the invalid --tag, prints a friendly error to stderr, and doesn't build the image.

Versions

client:

commit: de5c165f3563841983ae1080078cbf43b5c546a3
tag: v0.0.0-dev

server:

tag: v0.8.0-alpha3-2-gde5c165f
version: v0.8.0-alpha3-2-gde5c165f+de5c165f
@njhale njhale added the kind/bug Something isn't working label Jun 29, 2023
@cjellick cjellick added this to the Backlog milestone Jul 1, 2023
pratikjagrut added a commit to pratikjagrut/acorn that referenced this issue Jul 7, 2023
)

Signed-off-by: pratikjagrut <26519653+pratikjagrut@users.noreply.github.com>
pratikjagrut added a commit to pratikjagrut/acorn that referenced this issue Jul 8, 2023
)

Signed-off-by: pratikjagrut <26519653+pratikjagrut@users.noreply.github.com>
@g-linville g-linville modified the milestones: Backlog, v0.8.0 Jul 8, 2023
pratikjagrut added a commit to pratikjagrut/acorn that referenced this issue Jul 10, 2023
)

Signed-off-by: pratikjagrut <26519653+pratikjagrut@users.noreply.github.com>
thedadams added a commit that referenced this issue Jul 12, 2023
Fix: Add image tag validation prior to building the image (#1875)
@sangee2004
Copy link
Contributor

Tested with acorn version v0.8.0-alpha7-98-gbb130866+bb130866

acorn build --tag -bad-name .
  ✗  ERROR:  invalid image tag: -bad-name

cloudnautique pushed a commit to cloudnautique/runtime that referenced this issue Sep 28, 2023
)

Signed-off-by: pratikjagrut <26519653+pratikjagrut@users.noreply.github.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants