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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

(PUP-2838) Fix invalid .dot files due to missing escapes of quoted strings in resource names #6848

Merged
merged 3 commits into from May 21, 2018

Conversation

smortex
Copy link
Contributor

@smortex smortex commented May 19, 2018

When using resource names with quotes, the --graph functionality of puppet produce a broken dot file:

位 dot /var/puppet/state/graphs/relationships.dot
Error: /var/puppet/state/graphs/relationships.dot: syntax error in line 5765 near '"'

The puppetlabs/puppetlabs-postgresql generates a lot of such resources.

This Pull-Request workaround the problem by escaping quotes when generating the dot graph. A better fix strategy is described in the existing code, unfortunately I can't afford it 馃槃:

# This code is totally incomprehensible; it needs to be replaced!

This change introduce a few failing unit tests related to quotes esaping
in dot graph generation.

Puppetlabs's postgresql module produce a lot of resources named this
way, making graph generation failing with a message similar to:

Error: /var/puppet/state/graphs/relationships.dot: syntax error in line 5765 near '"'
@puppetlabs-jenkins
Copy link
Collaborator

Can one of the admins verify this patch?

The warnings check fails because of a bunch of problems in the changed
files:

```
warning: parentheses after method name is interpreted as an argument list, not a decomposed argument
```
@puppetcla
Copy link

CLA signed by all contributors.

@jhelwig jhelwig self-assigned this May 21, 2018
@jhelwig
Copy link
Contributor

jhelwig commented May 21, 2018

Thanks for also taking the time to clean up the warnings unrelated to the dot issue.

@jhelwig jhelwig merged commit 81d213d into puppetlabs:master May 21, 2018
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

4 participants