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

ENT-4681: Test proper scoping of classes defined from non-default namespace #3689

Merged
merged 1 commit into from
Jul 2, 2019

Conversation

nickanderson
Copy link
Member

No description provided.

@cf-bottom
Copy link

Thanks for submitting a PR! Maybe @vpodzime can review this?

Copy link
Contributor

@vpodzime vpodzime left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix the typos. Also, is there a ticket for this issue?

expression => "any",
scope => "bundle"; # Bundle scoped classes are NOT visible from other bundles
}
body file control { namespace => "default"; }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this double body file control supposed to do? And what makes you think it should be like that?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The first one set the namespace to test, the second one returned the namespace to default. So bundle agent example is in the test namespace but bundle agent test is in the default namespace.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix the typos. Also, is there a ticket for this issue?

ACK, and yes, ENT-4681 is the related ticket

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am quite surprised that the double body file control just works like this, sequentially. That looks almost like a crime! 😉

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with @vpodzime this looks insane to me. The ordering of bodies and bundles within a file shouldn't matter, at all. Also a body file control is the control body for the file no? It should be for the whole file. I would expect the last body to overwrite the attributes of the first one, or an error.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, but this is how it was designed.

https://docs.cfengine.com/docs/3.12/reference-components-file_control_promises.html

This directive can be given multiple times within any file, outside of body and bundle definitions.

@nickanderson nickanderson changed the title Test proper scoping of classes defined from non-default namespace ENT-4681: Test proper scoping of classes defined from non-default namespace Jun 20, 2019
Copy link
Contributor

@vpodzime vpodzime left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK, but cannot say it looks good to me.

@olehermanse
Copy link
Member

@cf-bottom jenkins

@cf-bottom
Copy link

@nickanderson nickanderson merged commit 3c4d046 into cfengine:master Jul 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants