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

Support for local and server profiles and actions #2341

Draft
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

worksofliam
Copy link
Contributor

@worksofliam worksofliam commented Nov 11, 2024

Introduce functionality to manage both local (in VS Code) and server profiles, enhancing the user experience by allowing seamless access to connection profiles. Profiles created in the IFS are shared across all users on that system. Created the JSON schema for profiles and updated related commands to accommodate these changes.

  • Ability to store profiles in the connection, or inside /etc/.vscode/profiles.json in the IFS. Workspace profiles are not possible in this PR.
  • Also added the same support for actions.json, which can also exist in /etc/.vscode/profiles.json as well as VS Code settings and workspace config.
  • Button to reload the config files in the connection settings

How to test this PR (with actions)

  1. Open up VS Code with a local workspace folder open
  2. Create or open .vscode/actions.json locally and ensure the content assist works for the JSON schema
  3. Create or open /etc/.vscode/actions.json on the IFS and ensure the content assist works for the JSON schema
  4. Put valid actions in both files, and when executing a local action

Checklist

  • have tested my change
  • have created one or more test cases
  • updated relevant documentation
  • Remove any/all console.logs I added
  • have added myself to the contributors' list in CONTRIBUTING.md

@worksofliam worksofliam marked this pull request as ready for review November 11, 2024 17:13
Copy link
Contributor

github-actions bot commented Jan 10, 2025

👋 A new build is available for this PR based on 4a4579b.

…fig file and remove deprecated methods

Signed-off-by: worksofliam <[email protected]>
…ig file and remove deprecated methods

Signed-off-by: worksofliam <[email protected]>
@worksofliam worksofliam changed the title Support for local and server profiles Support for local and server profiles and actions Jan 10, 2025
@SanjulaGanepola
Copy link
Member

SanjulaGanepola commented Jan 13, 2025

Noticed a couple issues when testing:

  1. Only remote actions are showing when both local and remote actions are defined. Removing the remote actions allows the local ones to show. Is this expected?
    image
  2. Only remote profile shows up in the view:
    image

schemas/profiles.json Outdated Show resolved Hide resolved
src/api/IBMi.ts Show resolved Hide resolved
src/api/config/configFile.ts Outdated Show resolved Hide resolved
ProfilesConfig.validateAndCleanInPlace = (loadedConfig: ProfilesConfigFile) => {
if (loadedConfig.profiles) {
const profilesJson = loadedConfig.profiles;
// Maybe one day replace this with real schema validation
Copy link
Member

Choose a reason for hiding this comment

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

Side note, just FYI this can be done with https://www.npmjs.com/package/jsonschema to just use the json schema we have defined. We do this for PE and it works pretty well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is something I will add later.

@worksofliam worksofliam self-assigned this Jan 13, 2025
@worksofliam
Copy link
Contributor Author

@SanjulaGanepola Please review again.

Only remote actions are showing when both local and remote actions are defined. Removing the remote actions allows the local ones to show. Is this expected?

No. This was a bug and is now solved.

Only remote profile shows up in the view:

Yes, this is valid for the time being. We are not going to allow profiles to be defined as part of the local workspace (this we have the .env library list control)

@worksofliam
Copy link
Contributor Author

Drafting this to work on the bigger PR.

@worksofliam worksofliam marked this pull request as draft January 15, 2025 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants