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

Priority cannot be configured for files in spec #780

Closed
Sheludchenko opened this issue Mar 30, 2023 · 3 comments
Closed

Priority cannot be configured for files in spec #780

Sheludchenko opened this issue Mar 30, 2023 · 3 comments

Comments

@Sheludchenko
Copy link

Sheludchenko commented Mar 30, 2023

I tried to split a long file into multiple ones. I used this document docs/how_to/misc/multiple_desired_state_files_specification.md as a reference.

Here's a sample spec file I'm trying to use:

---
stateFiles:
 - path: common.yaml
   priority: -20
 - path: crd.yaml
   priority: -10
 - path: service.yaml
   priority: 0

Here's a command I'm trying to run:

helmsman --spec environment.spec.yaml --dry-run --no-fancy

Here's an error I'm getting:

2023-03-30 14:42:55 CRITICAL: error parsing spec file: yaml: unmarshal errors:
  line 4: field priority not found in type app.StatePath

I looked through internal/app/spec_state.go and didn't find any reference for priority field.

@mkubaczyk
Copy link
Collaborator

mkubaczyk commented Mar 31, 2023

Hey,

first of all, which Helmsman version are you using? When I run it for the current master state, it just ignores "priority:" field without an error.
And yes, priority is not supported. -spec file was introduced in 3.8.0, but 3.8.1 removed priority field (breaking change introduced as hotfix in versioning, that's our fault). Files are being processed in the order they are defined in the spec file from the top to bottom.
I will update the docs and remove the misleading part.
Thanks!

@Sheludchenko
Copy link
Author

@mkubaczyk currently I'm using Helmsman v3.11.0. Thanks for quick update.

@mkubaczyk
Copy link
Collaborator

ok, quite an old one. I think newer versions would just ignore this priority field (can't tell if that's better or worse atm). Nevertheless priority field is deprecated and the ordering decides. :-)

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

No branches or pull requests

2 participants