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

Specifying multiple dependencies with the same name doesn't produce an error or warning #3067

Closed
kichristensen opened this issue Apr 7, 2024 · 0 comments · Fixed by #3068
Labels
bug Oops, sorry!

Comments

@kichristensen
Copy link
Contributor

Describe the bug

Specifying multiple dependencies with the same name, does not produce an error or warning. The resulting bundle will only install the last dependency with the name, and outputs will only be taken from the last dependency.

To Reproduce

Steps to reproduce the behavior:

  1. Run porter create
  2. And two dependencies with the same name, e.g.,
    dependencies:
      requires:
        - name: hello
          bundle:
            reference: ghcr.io/getporter/porter-hello:v0.2.0
          parameters:
            name: First
        - name: hello
           bundle:
             reference: ghcr.io/getporter/porter-hello:v0.2.0
           parameters:
             name: Second
  3. Run this porter command porter install
  4. Notice that the dependency is only installed once and that there are no errors no warnings

Expected behavior

An error that a dependency with the same name is specified multiple times, or at least a warning.

Porter Command and Output

$ porter install
Executing dependency hello...
executing install action from porter-hello (installation: /porter-hello-hello)
No existing bundle state to unpack
Install Hello World
Hello, Second
Collecting bundle outputs...
  - name
Packing bundle state...
execution completed successfully!
executing install action from porter-hello (installation: /porter-hello)
Install Hello World
Hello World, Second
execution completed successfully!

Version

porter v1.0.17 (605e399)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Oops, sorry!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant