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

Issue/pup 2349/deprecate non string modes on file type #2964

Conversation

kylog
Copy link

@kylog kylog commented Aug 13, 2014

No description provided.

@puppetcla
Copy link

CLA signed by all contributors.

@zaphod42
Copy link
Contributor

@kylog the failures in travis seem legitimate in so far as they are not happening only there (I'm getting them locally too).

Is it possible to issue this deprecation if the Puppet[:parser] == :current only and produce a hard failure if it is :future? That would give the actual behavior that user's will have in Puppet 4. I guess this all depends on whether it is reliably knowable what language is in effect when validate is called.

The commit messages also need to be expanded to provide information about why this change is needed and why this is the right implementation.

Kylo Ginsberg added 3 commits August 15, 2014 12:02
Previously there was logic to convert incoming mode using to_i,
but if it were a String that would convert the string as decimal,
whereas mode is always specified as octal. I don't know why the
to_i conversion was in there and whether it ever worked in a
meaningful way.

So fix this to convert Strings as octal.
Previously, mode was specified in some places as a Fixnum, in others
as a String. Consistently specify mode as a string containing octal.
The 'future' (4.x) parser treats literal numbers as actual numbers instead of
strings as the 3.x parser did. This makes file resources that use unquoted
mode values behave strangely (see PUP-2156) so we are deprecating non-String
values for mode.

So this change adds a deprecation warning for non-String values of mode
when running with --parser future.
@kylog
Copy link
Author

kylog commented Aug 15, 2014

Re-submitting this. Travis should be green.

Since validate is called on the agent, I went the route of warning only with --parser future.

adrienthebo added a commit that referenced this pull request Aug 18, 2014
…ng-modes-on-file-type

Issue/pup 2349/deprecate non string modes on file type
@adrienthebo adrienthebo merged commit 87b0b5d into puppetlabs:master Aug 18, 2014
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.

4 participants