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

Address name conflicts #361

Closed
stevendborrelli opened this issue Oct 7, 2016 · 2 comments
Closed

Address name conflicts #361

stevendborrelli opened this issue Oct 7, 2016 · 2 comments
Assignees
Labels
Milestone

Comments

@stevendborrelli
Copy link
Member

If two resources have the same name an error is not raised. In testing the 2nd task defined is used.

task "a" {
   check = "[[ -d /tmp/a ]]"
   apply = "mkdir /tmp/a"
}

task "a" {
   check = "[[ -d /tmp/b ]]"
   apply = "mkdir /tmp/b"
}
@BrianHicks BrianHicks added this to the 0.4.0 milestone Oct 20, 2016
@ryane
Copy link
Contributor

ryane commented Oct 26, 2016

This hcl also can also result in some user confusion:

task "c" {
  check = "[[ -d /tmp/c ]]"
  apply = "mkdir /tmp/c"
}

task "d" {
  check = "[[ -d /tmp/c ]]"
  apply = "mkdir /tmp/c"
}

It is the same task with different names but you'll never see the duplicate in your graph.

MergeDuplicates explicitly handles both of these scenarios and you can identify when it happens if you are running with log-level=debug. Should we just change the logging to Warn with a clearer message or should we actually consider one or both of these as errors and stop execution?

@arichardet arichardet self-assigned this Oct 31, 2016
@arichardet
Copy link
Contributor

Fixed by #458

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

No branches or pull requests

4 participants