-
Notifications
You must be signed in to change notification settings - Fork 91
feat: add execution environment auto completion #42
Conversation
c5bb029
to
39281b7
Compare
* Add setting in package.json file to configure execution environment related setting. Example client `settings.json` for EE options (default) ``` { "ansible.executionEnvironment.enabled": false, "ansible.executionEnvironment.image": "quay.io/ansible/ansible-navigator-demo-ee:0.6.0", "ansible.executionEnvironment.containerEngine": "auto", "ansible.executionEnvironment.pullPolicy: "missing" } ``` Related to ansible-langauge-server PR ansible/ansible-language-server#42
bb536f3
to
dd7dab4
Compare
This comment has been minimized.
This comment has been minimized.
6a81a96
to
9eead6f
Compare
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.
Nice work abstracting away execution environment and brilliant caching mechanism!
I noticed that you're missing semicolons in many of the newly added lines. I'm not sure whether it was enforced by eslint, but Prettier was definitely configured to fill them in, it should be enough to install the Prettier extension and re-save the files.
Also, some inline and overview docstrings would be nice.
/cc @yaegassy For review from coc.nvim extension perspective. |
@ganeshrn, I don't think it's a great idea to use A similar issue is raised here: #15 |
d2e52ac
to
f07813d
Compare
* Add support for execution environment (EE) configuration options received from client. Example client `settings.json` for EE options (default) ``` { "ansible.executionEnvironment.enabled": false, "ansible.executionEnvironment.image": "quay.io/ansible/ansible-navigator-demo-ee:0.6.0", "ansible.executionEnvironment.containerEngine": "auto", "ansible.executionEnvironment.pullPolicy: "missing" } ``` * Add executionEnvironment service to handle initilization of EE and pulling plugins from within EE into cache path on local system * In case EE is enabled update docsLibrary service to read plugin docs from local cache path after executionEnvironment service is initialized * Add commandRunner utility to run command on local host or within EE based on settings passed from client * Update ansibleConfig service to use commandRunner utility to run ansible-config and related commands
* Add semicolon and fix indetation using Prettier extesnion * Use vscode-uri package to get document path in commandRunner utility * Add progess status for downloaing EE * Change user message to log messeage at all applicable places * Add comments on code for better readability * Simplify logic to add `plugins` folder in `site-packages` path * Fix type on executionEnvironment service * Remove `--interactive` flag from container run command
f07813d
to
7bc43d5
Compare
@tomaciazek Thanks for your detailed review. I have fixed most of them in my recent commit. Please re-review it.
Since I come from python world I tend to inherently ignore semicolons :-) |
@priyamsahoo Based on the API documentation for the method it doesn't seem like it is specific to vscode.
In any case the current test scope if for vscode extension. If in future we figure out it doesn't work with other clients we can fix it in appropriate way as part of Issue #15 for all the usages in the project including the messages added as part of this PR. IMO your comment is out of scope for this particular PR. |
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.
We should avoid force-pushing once the branch is in PR review stage. For instance, I can't browse changes since my last review. Merge-commits are perfectly fine within branches - they are going to be squashed on merge to main anyway.
Sorry, GitHub pulled a trick on me again and some replies to earlier comments ended up duplicated as standalone comments. |
@tomaciazek Fixed your another set of review comments. Some of them are still marked unresolved and I have provided my feedback on them. Please re-review the PR. |
My bad. Something was not right in my local branch. Have fixed it now. |
* Add setting in package.json file to configure execution environment related setting. Example client `settings.json` for EE options (default) ``` { "ansible.executionEnvironment.enabled": false, "ansible.executionEnvironment.image": "quay.io/ansible/ansible-navigator-demo-ee:0.6.0", "ansible.executionEnvironment.containerEngine": "auto", "ansible.executionEnvironment.pullPolicy: "missing" } ``` Related to ansible-langauge-server PR ansible/ansible-language-server#42
* feat(ee): this is a backup commit * Add support for execution environment * feat: add setting options for execution environment * Add setting in package.json file to configure execution environment related setting. Example client `settings.json` for EE options (default) ``` { "ansible.executionEnvironment.enabled": false, "ansible.executionEnvironment.image": "quay.io/ansible/ansible-navigator-demo-ee:0.6.0", "ansible.executionEnvironment.containerEngine": "auto", "ansible.executionEnvironment.pullPolicy: "missing" } ``` Related to ansible-langauge-server PR ansible/ansible-language-server#42 * chore: remove stale edits from package.json file * chore: fix review comment * chore: fix review comment and order setting correctly * chore: order setting alphabetically
@ganeshrn, I think the API implementation belongs to https://github.com/microsoft/vscode/blob/9a21b53/src/vs/vscode.d.ts#L8848, which is specefic to vscode (I may be wrong). But sure, if we see trouble executing this statement in other IDEs, we can have fixes for this in separate PR. |
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 !
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.
Good job!
Thank you! |
Add support for execution environment (EE) configuration
options received from client.
Example client
settings.json
for EE options (default)Add executionEnvironment service to handle initilization of EE
and pulling plugins from within EE into cache path on local system
In case EE is enabled update docsLibrary service to read plugin
docs from local cache path after executionEnvironment service
is initialized
Add commandRunner utility to run command on local host or within
EE based on settings passed from client
Update ansibleConfig service to use commandRunner utility
to run ansible-config and related commands