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

Policyfile Revision ID Validation. #116

Merged
merged 4 commits into from
Feb 27, 2015
Merged

Conversation

danielsdeleo
Copy link
Contributor

In the Policyfile draft RFC, revision_id is a required field. Add this validation to Chef Zero. This works locally with changes to pedant, but I can't commit those because erchef's policyfile validation is broken.

See Also:

@jkeiser
Copy link
Contributor

jkeiser commented Feb 26, 2015

👍 for code. Let's see what the failures are though ...

@jkeiser
Copy link
Contributor

jkeiser commented Feb 26, 2015

Oh, right. Corresponding pedant changes in progress :) 👍 once you update the pedant SHA to a passing one :)

@danielsdeleo
Copy link
Contributor Author

Thanks for review. Now that I got pedant merged, I'll update that.

@danielsdeleo
Copy link
Contributor Author

Ugh, this is a weird one. When I give a policy with a 255 character name, Zero gets this error:

[2015-02-26T21:56:22+00:00] ERROR: #<Errno::ENAMETOOLONG: File name too long @ rb_sysopen - /tmp/d20150226-2418-ftq19p/repo/policies/some_policy_group/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json>

Which is really weird, because:

'/tmp/d20150226-2418-ftq19p/repo/policies/some_policy_group/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json'.size
#=> 319

And yet the manual states:

ENAMETOOLONG
The length of the path argument exceeds {PATH_MAX} or a pathname component is longer than {NAME_MAX}.

And the internet says that on Linux, PATH_MAX is 4096.

@danielsdeleo danielsdeleo merged commit 45e9660 into master Feb 27, 2015
@danielsdeleo danielsdeleo deleted the policyfile-revision-id branch February 27, 2015 16:22
@chef chef locked and limited conversation to collaborators Nov 16, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants