Issue #3955 has been updated by Daniel Pittman.
After investigation and UX discussion Luke and I have a proposed path forward
on this ticket:
`checksum` is changed to mean "the desired checksum of the file content", only.
It can have the form "{TYPE}VALUE", but if TYPE is omitted will have the value
of the `checksum_type` attribute.
`checksum_type` is changed to mean "the type of checksum to use, if not
otherwise specified", and can be set from a sensible default, explicitly, or by
giving a type in the `checksum` parameter.
`content` is changed to mean "the literal content of the file", only.
Like `source` and `content`, `checksum` is an exclusive value where you can't
have more than one set; we enforce that the same way we do already. Possibly
with the caveat that this makes it *more* desirable to fix the "foo => undef"
is also not allowed bug.
Undetermined is what the correct behaviour is when `checksum_type` is
explicitly set, but conflicts with the TYPE part of `checksum`, although
leaning is to having that be an error.
A possible UI consideration is to add extra parameters for the checksums to
support `sha1 => "foo"` and `md5 => "foo"` in addition / instead of the
existing methods; this would be a little more exciting internally, but might be
nicer for the user.
To implement this, we propose injecting into the compiler part of the code a
hook point that we can add code to be run to "downgrade" a generated catalog
based on the client version. So, when a 2.6 client connects, but doesn't
support this behaviour, we can transform the catalog to go to the less capable
variant.
----------------------------------------
Bug #3955: Specifying file content by checksum should not use 'content' property
https://projects.puppetlabs.com/issues/3955
Author: Markus Roberts
Status: Accepted
Priority: High
Assignee:
Category:
Target version:
Affected Puppet version: development
Keywords:
Branch:
Rather than passing around the contents of a file (e.g. in logs) we use the
checksum; to support this the users is also allowed to _specify_ the contents
as a checksum, but this leads to an ambiguity when the actual contents match
the checksum pattern.
Instead of trying to do magic, we should have distinct syntax for referring to
the contents by checksum (which should _always_ expect a valid checksum) and
for specifying the contents literally (which shouldn't do anything different if
the contents happen to resemble a checksum).
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://projects.puppetlabs.com/my/account
--
You received this message because you are subscribed to the Google Groups
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-bugs?hl=en.