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

Fix loading namespaced doc_fragments from collections #55249

Merged
merged 2 commits into from May 3, 2019

Conversation

flowerysong
Copy link
Contributor

@flowerysong flowerysong commented Apr 13, 2019

SUMMARY

The syntax for specifying a different fragment name was already using '.' as a separator, so the code needed to be tweaked to avoid choking on names like testns.testcoll.fragname and testns.testcoll.fragname.altvar.

get_plugin_class() returns 'docfragment' for the fragment loader; mangling subdir provides consistent alignment with the normal plugin directory names and avoids any need for special handling of plugin types with 'module' in the name.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

PluginLoader

ADDITIONAL INFORMATION

@ansibot ansibot added WIP This issue/PR is a work in progress. Nevertheless it was shared for getting input from peers. affects_2.9 This issue/PR affects Ansible v2.9 bug This issue/PR relates to a bug. needs_triage Needs a first human triage before being processed. new_plugin This PR includes a new plugin. support:community This issue/PR relates to code supported by the Ansible community. support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels Apr 13, 2019
@flowerysong flowerysong force-pushed the coll_doc_fragments branch 2 times, most recently from ceab4a4 to a54c3f9 Compare April 14, 2019 00:28
@flowerysong flowerysong changed the title [WIP] Fix loading namespaced doc_fragments Fix loading namespaced doc_fragments Apr 14, 2019
@ansibot ansibot added core_review In order to be merged, this PR must follow the core review workflow. and removed WIP This issue/PR is a work in progress. Nevertheless it was shared for getting input from peers. labels Apr 14, 2019
@flowerysong flowerysong changed the title Fix loading namespaced doc_fragments Fix loading namespaced doc_fragments from collections Apr 14, 2019
@flowerysong
Copy link
Contributor Author

cc @nitzmahone

@jillr jillr removed the needs_triage Needs a first human triage before being processed. label Apr 18, 2019
@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Apr 26, 2019
The syntax for specifying a different fragment name was already
using '.' as a separator, so the code needed to be tweaked to
avoid choking on names like `testns.testcoll.fragname` and
`testns.testcoll.fragname.altvar`.

`get_plugin_class()` returns 'docfragment' for the fragment loader;
mangling `subdir` provides consistent alignment with the normal plugin
directory names and avoids needing special handling of plugin types
with 'module' in the name.
@ansibot ansibot removed the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label May 2, 2019
Copy link
Member

@nitzmahone nitzmahone left a comment

Choose a reason for hiding this comment

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

LGTM, just needs a changelog fragment- thanks! Also a good candidate for backport to 2.8, if you feel like it...

@nitzmahone
Copy link
Member

rebuild_merge

@ansibot ansibot added shipit This PR is ready to be merged by Core needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed core_review In order to be merged, this PR must follow the core review workflow. shipit This PR is ready to be merged by Core labels May 2, 2019
@flowerysong flowerysong closed this May 3, 2019
@flowerysong flowerysong reopened this May 3, 2019
@ansibot ansibot added shipit This PR is ready to be merged by Core and removed needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels May 3, 2019
@ansibot ansibot merged commit 2ef8b29 into ansible:devel May 3, 2019
flowerysong added a commit to flowerysong/ansible that referenced this pull request May 3, 2019
* Fix loading namespaced doc_fragments

The syntax for specifying a different fragment name was already
using '.' as a separator, so the code needed to be tweaked to
avoid choking on names like `testns.testcoll.fragname` and
`testns.testcoll.fragname.altvar`.

`get_plugin_class()` returns 'docfragment' for the fragment loader;
mangling `subdir` provides consistent alignment with the normal plugin
directory names and avoids needing special handling of plugin types
with 'module' in the name.

* Add changelog entry

(cherry picked from commit 2ef8b29)
abadger pushed a commit that referenced this pull request May 20, 2019
* Fix loading namespaced doc_fragments

The syntax for specifying a different fragment name was already
using '.' as a separator, so the code needed to be tweaked to
avoid choking on names like `testns.testcoll.fragname` and
`testns.testcoll.fragname.altvar`.

`get_plugin_class()` returns 'docfragment' for the fragment loader;
mangling `subdir` provides consistent alignment with the normal plugin
directory names and avoids needing special handling of plugin types
with 'module' in the name.

* Add changelog entry

(cherry picked from commit 2ef8b29)
@ansible ansible locked and limited conversation to collaborators Aug 5, 2019
@flowerysong flowerysong deleted the coll_doc_fragments branch February 29, 2020 20:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.9 This issue/PR affects Ansible v2.9 bug This issue/PR relates to a bug. new_plugin This PR includes a new plugin. shipit This PR is ready to be merged by Core support:community This issue/PR relates to code supported by the Ansible community. support:core This issue/PR relates to code supported by the Ansible Engineering Team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants