Skip to content
New issue

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

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

Already on GitHub? # to your account

Improve error message when a docker image is passed to --reference #904

Open
dev-drprasad opened this issue Feb 14, 2020 · 4 comments · May be fixed by #3244
Open

Improve error message when a docker image is passed to --reference #904

dev-drprasad opened this issue Feb 14, 2020 · 4 comments · May be fixed by #3244
Labels
2 - 🍕 Pizza should be eaten daily user experience 🌈💖 Make it easier for everyone to use Porter

Comments

@dev-drprasad
Copy link
Contributor

Describe the bug

For some reason porter explain not able to show bundle information for some bundles from https://hub.docker.com/r/getporter . I don't think its a bug. something to do with version mismatch

To Reproduce

Steps to reproduce the behavior:

  1. Run porter explain --tag getporter/mysql:v0.1.1
  2. You see information
  3. Run porter explain --tag getporter/porter-hello-installer:0.1.0
  4. You See error

Expected behavior

porter explain --tag getporter/porter-hello-installer:0.1.0 should work. right ?

Porter Command and Output

porter explain --tag getporter/porter-hello-installer:0.1.0

Error: unable to pull bundle before invoking explain command: unable to pull bundle getporter/porter-hello-installer:0.1.0: unable to pull remote bundle: invalid media type "application/vnd.docker.distribution.manifest.v2+json" for bundle manifest

Version

porter v0.22.1-beta.1-14-g4401e74 (4401e74)

@dev-drprasad dev-drprasad added bug Oops, sorry! and removed bug Oops, sorry! labels Feb 14, 2020
@carolynvs
Copy link
Member

The problem is that getporter/porter-hello-installer is the invocation image, and explain requires that you pass in the tag for a bundle. Try the command again and pass in this instead getporter/porter-hello:v0.1.0 and you will see output

$ porter explain -t getporter/porter-hello:v0.1.0
Name: HELLO
Description: An example Porter configuration
Version: 0.1.0

No credentials defined

Parameters:
Name           Description                                                     Type      Default   Required   Applies To
porter-debug   Print debug information from Porter when executing the bundle   boolean   false     false      All Actions

No outputs defined

No custom actions defined

@carolynvs carolynvs added the question Halp plz label Feb 14, 2020
@carolynvs
Copy link
Member

It would be great if porter detected the type of the image pulled, and if it's a regular docker image, it should give you a better error message like "--tag should be the tag of a bundle, but an image tag was specified".

@carolynvs carolynvs added the user experience 🌈💖 Make it easier for everyone to use Porter label Feb 14, 2020
@dev-drprasad
Copy link
Contributor Author

I see error coming directly from dependency package: cnab-to-oci . I don't think porter can detect what type of image it is

@carolynvs
Copy link
Member

cnab-to-oci is a dependency of ours that we can contribute to in the cnabio org, similar to cnab-go. So no worries, we aren't limited to just solutions that are within Porter's codebase.

@carolynvs carolynvs added 2 - 🍕 Pizza should be eaten daily and removed question Halp plz labels Oct 22, 2020
@carolynvs carolynvs changed the title porter explain not showing info for some bundles Improve error message when a docker image is passed to --reference Mar 11, 2022
@kichristensen kichristensen linked a pull request Nov 2, 2024 that will close this issue
4 tasks
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
2 - 🍕 Pizza should be eaten daily user experience 🌈💖 Make it easier for everyone to use Porter
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants