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

Fix for issue #8053: raise error on duplicate ID's in one state file #8589

Merged
merged 2 commits into from Nov 17, 2013

Conversation

emilisto
Copy link
Contributor

Running the following state:

/tmp/file-1:
  file.managed:
    - content: |
        Beep boop.

/tmp/file-1:
  file.touch

will now result in this error:

local:
    Data failed to compile:
----------
    Rendering SLS "base:duplicates-ids" failed: Conflicting ID "/tmp/file-1"

As a bonus, YAML compilation errors are now displayed with the environment and state included — making troubleshooting easier.

Now including the state file in which the RenderError occured. This
makes it easier to track down e.g. YAML syntax errors.
- YAML exceptions are now re-reaised as SaltRenderErrors
- Duplicate ID's in single state files now result in errors, and not
  just warnings. This is now consistent with the how conflicting ID's in
  separate state files are handled.
terminalmage pushed a commit that referenced this pull request Nov 17, 2013
Fix for issue #8053: raise error on duplicate ID's in one state file
@terminalmage terminalmage merged commit babe2d5 into saltstack:develop Nov 17, 2013
@terminalmage
Copy link
Contributor

Nice!

@terminalmage
Copy link
Contributor

@basepi this should be cherry picked

@KatoneVi
Copy link

KatoneVi commented Feb 7, 2014

Emilisto. My current SaltStack Program is doing exactly what yo uare doing. Is there a way to work around this? My program needs to touch/append to a file multiple times in a single run (each loop, the source appends its ID in a text file). How to handle?

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

Successfully merging this pull request may close these issues.

None yet

3 participants