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

Relaxed feature template checks in bind feature and manage commands #112

Open
wants to merge 3 commits into
base: upstream
Choose a base branch
from

Conversation

jouvin
Copy link
Contributor

@jouvin jouvin commented Jul 14, 2018

This PR addresses issue #111 by:

  • Looking for feature templates in the root directory of the domain Git repo, in addition to the archetype directory.
  • Enabling a relaxed feature template check when config option relaxed_feature_template_check is true (false by default) where a warning is displayed if the template existence is assessed rather than raising an exception. This allows to support direct use of template library features.

Not done yet:

  • Removed check in aq manage if --skip_auto_complle is not present: not clear what the added value would be as it will not help much is you don't have relaxed_feature_template_check=True and will only remove the warning if you have it.
  • Option to enforce that only one feature template must exist in the domain Git repo, whatever the location. Waiting for feedback on whether it is needed or not.

Successfully tested at LAL.

@jouvin jouvin requested review from ned21, jrha and urbonegi July 14, 2018 09:25
@ned21
Copy link
Contributor

ned21 commented Jul 15, 2018

As stated in the issue this fixes, I think it's a bad idea to break the name spacing in this way. If the patch were to be accepted, all new code paths would need unit test coverage.

@jouvin
Copy link
Contributor Author

jouvin commented Jul 16, 2018

@ned21 I don't really understand your comment here. I don't think this PR breaks name spacing in any way. Name spacing in Pan is relative to the loadpath and this is the real power of it. This has been the important feature (introduced around panc v6 or v7, not a feature from the origin) that enabled the template library concept, making it feasible. So this PR just allows to use the full power of Pan name spacing with Aquilon, something that was somewhat restricted by the initial implementation. But as said in the issue, it has a price (like the current implement has the price of restricting the power of name space + loadpath combination), this is why I propose to have it a configuration option that allows each site to makes its own decision about the model which is most adapted for it.

@jrha
Copy link
Member

jrha commented Jul 24, 2018

I really don't like the idea of allowing features at the root level, users (and tooling) expect to see nothing but archetypes there, I do however like the idea of sharing features between archetypes. See my comment on #111 about what we did to allow sharing at RAL.

- Enable sharing of feature definitions between several archetypes

Contributes to quattor#111

Change-Id: Ic15880018c615add765724ff82e24acf337d4912
Change-Id: Ida56e61fae9840d45afe17ee0ca4b99856fb6d08
When config option relaxed_feature_template_check is true
(default: false), only display a warning if the template existence
cannot be assessed rather than raising an exception. This allows
to support direct use of features defined in the plenary templates
(e.g. features from the template library).

Contributes to quattor#111

Change-Id: I0b3319cd39a2c962da0464c511a2c42de2595407
@jouvin
Copy link
Contributor Author

jouvin commented Nov 2, 2018

After discussion, decision to implement both features with separate options, using the RAL approach of a directory dedicated to shared features.

@jrha jrha removed the request for review from urbonegi November 7, 2018 09:59
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.

None yet

3 participants