-
Notifications
You must be signed in to change notification settings - Fork 86
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
Extension suggests replacements of modules with internal implentation names #573
Comments
This is really problematic since these internal names should not be exposed to users, and must really not be used. One problem with redirects is that it is totally unclear which redirects should be suggested to users and which ones should not. If the source is deprecated, or the redirect is deprecated, it definitely should. But if the redirect is not, it depends a lot. The redirect community.general.docker_container → community.docker.docker_container should be suggested, a redirect community.general.foo → community.general.bar as well. But a redirect community.general.foo → community.general.something.foo? This depends on the collection (in case of community.general: no). Maybe we should add a new attribute plugin_routing:
modules:
aerospike_migrations:
redirect: community.general.database.aerospike.aerospike_migrations
private_redirect: true ansible-core will ignore this (except the sanity tests), but the VSCode plugin could use this flag to not suggest this redirect. |
This is probably more a bug in https://github.com/ansible/ansible-language-server since all the code that does something is in there. @ssbarnea does it makes sense to create a new issue there, or should this issue be moved over to that repo, or something else? |
@ganeshrn @priyamsahoo any update on this? From my point of view this is a pretty critical bug that should be fixed as soon as possible. |
Sorry for the delay. |
@priyamsahoo Is there any new info? I've found that the modules which are affected by this issue also does not provide autocompletion: |
Some updated would be great indeed. This is a very serious bug that has been around for at least two months now. |
I created an ansible-lint rule which flags the invalid actions generated: ansible/ansible-lint#2572 |
Thanks for creating a rule in lint. |
@priyamsahoo by not treating this as a bug you are risking that your uses will suffer a lot when they have to undo all these suggestions. |
@felixfontein, I meant to say 'security bug'. |
There is a similar issue raised on |
@felixfontein |
Point them to the ansible-language-server repo
## v1.1.0 ### Minor Changes - Update yaml to 2.x (#566) @priyamsahoo - Add variable auto-completion feature when cursor inside jinja inline brackets (#552) @priyamsahoo ### Bugfixes - Get module route for FQCN with more than 3 elements (#538) @fredericgiquel - Replace sphinx with mkdocs (#544) @ssbarnea - Modify package version info in meta-data (#530) @priyamsahoo - Fix intermittent EE test failures (#533) @ganeshrn - Fix github issue links in docs (#573) @antdking - Fix ansible lint config parsing (#577) @priyamsahoo - Add env variable to remove color from command result stdout (#579) @priyamsahoo Co-authored-by: Ansible DevTools <[email protected]>
Sanity check
redhat.ansible
extension is in use and the language of the document in this bug report shows up asAnsible
Summary
Here's my main.yaml
running ansible-lint against it I get the following
That is fine.
However, in VSC, if I hover over community.general.pacman or community.general.npm, I get suggestions to replace them.
The only place where I can find these mentioned is https://github.com/ansible-collections/community.general/blob/main/meta/runtime.yml#L1102
After talking with one of the
community.general
contributors on Matrix, it seems like it shouldn't be a thing and is a bugExtension version
0.11.10
VS Code version
1.69.2
Ansible Version
OS / Environment
Arch Linux
ansible-lint 6.3.0-1
Relevant log output
No response
The text was updated successfully, but these errors were encountered: