-
Notifications
You must be signed in to change notification settings - Fork 90
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
Deprecate collection #624
Deprecate collection #624
Conversation
Should we deprecate all content as well? Or just hope the users somehow notice this from the changelogs / README? Context: I wrote the following on matrix:
|
makes sense to me |
Deprecate all modules, plugins and so on in meta/runtime.yml one by one or in a changelog fragment or both? There's no way to deprecate the collection as a whole in meta/runtime.yml or is there? But maybe it's OK to have just a single entry to deprecate the collection in the changelog... what do you think? I would do the work, but need some help what to do and about the wording. |
I don't really understand meta/runtime.yml, there seems to be a lot of outdated stuff. I think we should clear this up first. #625 is a first attempt to do it, but there might be other outdated stuff we could remove to make deprecating the collection easier. |
e5a1658
to
979229e
Compare
I've tried to deprecate everything automatically in import os
import yaml
from copy import deepcopy
categories = ['action', 'cliconf', 'doc_fragments', 'httpapi', 'lookup', 'modules', 'module_utils', 'netconf', 'terminal']
deprecation = {'removal_version': '6.0.0', 'warning_text': 'This collection and all content in it is unmaintained and deprecated.'}
with open('meta/runtime.yml') as file:
runtime_ori = yaml.safe_load(file)
for cat in categories:
if cat not in runtime_ori['plugin_routing'].keys():
runtime_ori['plugin_routing'][cat] = {}
subdir = os.path.join('plugins', cat)
subdir_len = len(subdir) + 1
for path, subdirs, files in os.walk(subdir):
for name in files:
if name.startswith('_'):
continue
content = os.path.join(path, name)[subdir_len:-3].replace('/', '.')
if content not in runtime_ori['plugin_routing'][cat].keys():
runtime_ori['plugin_routing'][cat][content] = {'deprecation': deepcopy(deprecation)}
print(yaml.dump(runtime_ori, default_flow_style=False)) |
d657942
to
01f09d6
Compare
01f09d6
to
b238585
Compare
recheck |
@felixfontein It turned out that there's a lot of content to deprecate 😫 Anyway, what do you think about my latest commits? I didn't add a changelog entry / fragment yet, though. BTW I think the CI failures are unrelated. But I'm not 100% sure. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The CI failures are related to the deprecation in the plugins/modules.
There seems to be something strange with meta/runtime.yml, but maybe it's just GitHub's diff viewer. Will take a look later when I have more time.
Maybe the way that I've used to generate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
I think it was a GitHub bug (or I looked wrong). I didn't have much time and found some entries which were now wrong, but looking at it again they seem to have vanished, and when looking at the runtime.yml from a checkout it looks fine. The main problem with the diff is that also existing entries were re-ordered, which is totally fine, but makes the diff more complex. But now that I had more time I checked in more detail, and everything looks fine to me. |
Thanks for reviewing @felixfontein! What do you think about this PR @Andersson007? |
@mariolenz great work, thanks a lot! |
* Deprecate collection * Deprecate content in meta/runtime.yml * Update documentation * alternatives -> alternative (cherry picked from commit f2c3554)
* Deprecate collection * Deprecate content in meta/runtime.yml * Update documentation * alternatives -> alternative (cherry picked from commit f2c3554)
@felixfontein @mariolenz so i guess now i need to release the collection, should we do it with an announcement under
How about ^ ? |
Yes, I think having this information in the changelog makes sense. Also your proposal sounds good to me. I've created #627 to add a changelog fragment. |
Backport to stable-5: 💔 cherry-picking failed — conflicts found❌ Failed to cleanly apply f2c3554 on top of patchback/backports/stable-5/f2c35544d327c6d837ecb78a6392d3c1228b7508/pr-624 Backporting merged PR #624 into main
🤖 @patchback |
Hmm, looks like automatically backporting fails. |
Ah, I see that this was manually backported in #626. Thanks @Andersson007! |
Deprecate collection as discussed in Should we remove community.network from the Ansible community package?.