Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UX bug, warn when using the image name the same as a local directory #2231

Closed
schneems opened this issue Jul 19, 2024 · 3 comments · Fixed by #2256
Closed

UX bug, warn when using the image name the same as a local directory #2231

schneems opened this issue Jul 19, 2024 · 3 comments · Fixed by #2256
Assignees
Labels
good first issue A good first issue to get started with. help wanted Need some extra hands to get this done. status/ready Issue ready to be worked on. type/bug Issue that reports an unexpected behaviour.
Milestone

Comments

@schneems
Copy link

schneems commented Jul 19, 2024

Summary

If you run this:

$ pack build ./ruby-getting-started

It will try to build an image named "./ruby-getting-started" instead of building an image with the contents of the directory in ./ruby-getting-started

Reproduction

Steps
$ git clone https://github.com/heroku/ruby-getting-started
$ pack config default-builder heroku/builder:24
$ pack build ./ruby-getting-started
Current behavior
$ pack build ./ruby-getting-started
24: Pulling from heroku/builder
c3c95e61d135: Already exists
51d8f1b9713f: Pull complete
5a2ba7ce94a1: Pull complete
182afb1fe5dc: Pull complete
a6d1c250c7ea: Pull complete
871d0c542f96: Pull complete
bb2d5bbfa209: Pull complete
1a22f95c2361: Pull complete
35c3a9574722: Pull complete
99677fb6a9c6: Pull complete
cc63f855e080: Pull complete
81491acfe764: Pull complete
113fe7e3e540: Pull complete
9822e4b97eba: Pull complete
ba2d82eef5c3: Pull complete
f48aa984467d: Pull complete
ffaf58b86fd8: Pull complete
6343107da9e3: Pull complete
a4fea99767cd: Pull complete
f63217451a36: Pull complete
15ee3b84c724: Pull complete
3a4558bbdea5: Pull complete
08b352b17a85: Pull complete
4fb627380bfa: Pull complete
962feb4a90d7: Pull complete
183b762aa2b7: Pull complete
0814ee8e7dab: Pull complete
4f4fb700ef54: Pull complete
Digest: sha256:96bc5b2df323bdd8349fae20bc716c6c471ea6cdaad361ad2d7941bd2f10557f
Status: Downloaded newer image for heroku/builder:24
24: Pulling from heroku/heroku
eed1663d2238: Already exists
51d8f1b9713f: Already exists
Digest: sha256:36e92b6b4e2a980a02363b9f1ddce582c32f38e236b778a6570dedf3d52ab733
Status: Downloaded newer image for heroku/heroku:24
===> ANALYZING
Image with name "./ruby-getting-started" not found
===> DETECTING
======== Output: heroku/[email protected] ========
No Python project files found (such as requirements.txt).
======== Results ========
fail: heroku/[email protected]
skip: heroku/[email protected]
======== Results ========
pass: heroku/[email protected]
skip: heroku/[email protected]
pass: heroku/[email protected]
pass: heroku/[email protected]
skip: heroku/[email protected]
Resolving plan... (try #1)
fail: heroku/[email protected] provides unused node
Resolving plan... (try #2)
skip: heroku/[email protected] provides unused node
skip: heroku/[email protected] provides unused jdk
fail: heroku/[email protected] provides unused ruby
======== Results ========
pass: heroku/[email protected]
fail: heroku/[email protected]
fail: heroku/[email protected]
skip: heroku/[email protected]
======== Results ========
pass: heroku/[email protected]
fail: heroku/[email protected]
fail: heroku/[email protected]
skip: heroku/[email protected]
======== Results ========
pass: heroku/[email protected]
skip: heroku/[email protected]
fail: heroku/[email protected]
skip: heroku/[email protected]
======== Results ========
pass: heroku/[email protected]
skip: heroku/[email protected]
skip: heroku/[email protected]
fail: heroku/[email protected]
skip: heroku/[email protected]
======== Results ========
pass: heroku/[email protected]
skip: heroku/[email protected]
Resolving plan... (try #1)
fail: heroku/[email protected] provides unused node
Resolving plan... (try #2)
fail: heroku/[email protected] provides unused node
======== Results ========
pass: heroku/[email protected]
fail: heroku/[email protected]
skip: heroku/[email protected]
======== Results ========
pass: heroku/[email protected]
fail: heroku/[email protected]
skip: heroku/[email protected]
======== Results ========
pass: heroku/[email protected]
fail: heroku/[email protected]
skip: heroku/[email protected]
======== Results ========
pass: heroku/[email protected]
skip: heroku/[email protected]
Resolving plan... (try #1)
fail: heroku/[email protected] provides unused go
======== Output: heroku/[email protected] ========
No PHP project files found.
======== Results ========
fail: heroku/[email protected]
skip: heroku/[email protected]
ERROR: No buildpack groups passed detection.
ERROR: Please check that you are running against the correct path.
ERROR: failed to detect: no buildpacks participating
ERROR: failed to build: executing lifecycle: failed with status code: 20

This is an absolute wall of text

Expected behavior

A warning:

WARNING: You are building an image named `./ruby-getting-started` this is also the name of a directory. Did you mean to run `pack build <args> --path ./ruby-getting-started?

We probably don't need to issue this warning if there's both an explicit image name and a path being used. We should still warn even when only characters are used i.e. no leading ./ or /


Environment

pack info
$ pack report
Pack:
  Version:  0.34.2+git-ce8db3c.build-6005
  OS/Arch:  darwin/arm64

Default Lifecycle Version:  0.19.6

Supported Platform APIs:  0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 0.10, 0.11, 0.12, 0.13

Config:
  default-builder-image = "[REDACTED]"
@schneems schneems added status/triage Issue or PR that requires contributor attention. type/bug Issue that reports an unexpected behaviour. labels Jul 19, 2024
@natalieparellano natalieparellano added status/ready Issue ready to be worked on. good first issue A good first issue to get started with. help wanted Need some extra hands to get this done. and removed status/triage Issue or PR that requires contributor attention. labels Jul 19, 2024
@natalieparellano natalieparellano added this to the 0.36.0 milestone Jul 19, 2024
@hhiroshell
Copy link
Contributor

I want to give it a try. Could you please assign this to me?

@natalieparellano
Copy link
Member

@hhiroshell sounds good! I'll assign you

@hhiroshell
Copy link
Contributor

I'm sorry for the lack of progress for a while. Now that my other work has settled, I have started working on the implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue A good first issue to get started with. help wanted Need some extra hands to get this done. status/ready Issue ready to be worked on. type/bug Issue that reports an unexpected behaviour.
Projects
None yet
3 participants