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

ui: improve docker reference parsing #2518

Merged
merged 1 commit into from
Oct 22, 2021
Merged

ui: improve docker reference parsing #2518

merged 1 commit into from
Oct 22, 2021

Conversation

jgwhite
Copy link
Contributor

@jgwhite jgwhite commented Oct 19, 2021

Why the change?

Closes #2484 and #2495

What’s the plan?

  • Add some failing tests
  • Bring in a library to parse these references

What does it look like?

Before

🌝 🌚

After

🌝 🌚
CleanShot 2021-10-22 at 12 33 45@2x CleanShot 2021-10-22 at 12 34 03@2x
CleanShot 2021-10-22 at 12 34 26@2x CleanShot 2021-10-22 at 12 34 11@2x
CleanShot.2021-10-22.at.12.39.59.mp4

How do I test it?

  1. Pull this branch down ui/docker-reference
  2. Run the UI dev server
  3. Visit localhost:4200
  4. Tweak the image value in the resources factory
  5. Verify these values show up correctly in the UI

Some examples to test with:

alpine
alpine@sha256:aaaaf56b44807c64d294e6c8059b479f35350b454492398225034174808d1726
registry:2
jpetazzo/pxe
jpetazzo/pxe:latest
quay.io/signalfuse/zookeeper
index.docker.io/library/ubuntu:latest
internal.mycorp.com:5000/revealjs
internal.mycorp.com:5000/revealjs:3.4.5-3
localhost:5000/mart/mass:latest
localhost:5000/mass

@jgwhite jgwhite added bug Something isn't working ui labels Oct 19, 2021
@jgwhite jgwhite added this to the 0.6.x milestone Oct 19, 2021
@jgwhite jgwhite self-assigned this Oct 19, 2021
@jgwhite jgwhite marked this pull request as ready for review October 19, 2021 20:29
@jgwhite jgwhite requested a review from a team October 19, 2021 20:29
@jgwhite jgwhite marked this pull request as draft October 20, 2021 10:42
@jgwhite jgwhite removed the request for review from a team October 20, 2021 10:42
@jgwhite
Copy link
Contributor Author

jgwhite commented Oct 20, 2021

Looks like the prod build never completes!

@jgwhite
Copy link
Contributor Author

jgwhite commented Oct 20, 2021

OK, parse-docker-image-name is way too big. Back to the drawing board.

@jgwhite jgwhite marked this pull request as ready for review October 20, 2021 11:35
@jgwhite jgwhite requested a review from a team October 20, 2021 11:35
Copy link
Contributor

@gregone gregone left a comment

Choose a reason for hiding this comment

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

LGTM. Just a comment regarding the display of the full sha: in https://github.com/hashicorp/waypoint/blob/main/ui/app/components/git-commit.hbs#L3 I display the shortened version, but use the <CopyButton> to copy the full value. We could also update the truncate-commit helper to use an optional named length param with a default to 7 to make it applicable here.

Copy link
Contributor

@gregone gregone left a comment

Choose a reason for hiding this comment

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

LGTM. Just a comment regarding the display of the full sha: in https://github.com/hashicorp/waypoint/blob/main/ui/app/components/git-commit.hbs#L3 I display the shortened version, but use the <CopyButton> to copy the full value. We could also update the truncate-commit helper to use an optional named length param with a default to 7 to make it applicable here.

@jgwhite
Copy link
Contributor Author

jgwhite commented Oct 21, 2021

LGTM. Just a comment regarding the display of the full sha: in https://github.com/hashicorp/waypoint/blob/main/ui/app/components/git-commit.hbs#L3 I display the shortened version, but use the <CopyButton> to copy the full value. We could also update the truncate-commit helper to use an optional named length param with a default to 7 to make it applicable here.

Great idea. I’ll implement this before merging.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working ui
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ui: pick dark mode colors for docker image tag ui: Image registry in name ends up breaking formatting
2 participants