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

The /require/* section does not merge on imports #2935

Open
timofey-drozhzhin opened this issue Jan 26, 2025 · 0 comments
Open

The /require/* section does not merge on imports #2935

timofey-drozhzhin opened this issue Jan 26, 2025 · 0 comments
Labels
kind/bug Something isn't working

Comments

@timofey-drozhzhin
Copy link
Contributor

What happened?
When importing like this

imports:
  - path: import.yaml

The entire /require/* section becomes overridden if it's redeclared.

What did you expect to happen instead?
According to the documentation, sections are supposed to merge, not replace one another. And we can see that with functions, pipelines, etc... Likewise the /require/* section should merge commands, not replace the entire section when additional .require.commands.* are added.

How can we reproduce the bug? (as minimally and precisely as possible)

import.yaml

version: v2beta1
name: devspace

require:
  commands:
    - name: example
      version: "1"

devspace.yaml:

version: v2beta1
name: devspace
    
imports:
  - path: import.yaml

pipelines:
  demo:
    run: |-
      echo "The 'example' command is never checked"

require:
  commands:
    - name: devspace
      versionRegEx: "DevSpace version : (.+)"
      version: ">=6"
...

Run devspace run-pipeline demo

You will see that .require.commands[name=example] is never evaluated, as expected.

Local Environment:

  • DevSpace Version: 6.3.14
  • Operating System: linux
  • ARCH of the OS: arm64
    Kubernetes Cluster:
  • Cloud Provider: n/a
  • Kubernetes Version: n/a

Anything else we need to know?

@timofey-drozhzhin timofey-drozhzhin added the kind/bug Something isn't working label Jan 26, 2025
@timofey-drozhzhin timofey-drozhzhin changed the title [Bug] /require/* section does not merge on imports The /require/* section does not merge on imports Jan 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant