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

Local Project Manager should be able to work against any folder #8650

Closed
jdunkerley opened this issue Jan 2, 2024 · 14 comments · Fixed by #8985
Closed

Local Project Manager should be able to work against any folder #8650

jdunkerley opened this issue Jan 2, 2024 · 14 comments · Fixed by #8985
Assignees
Labels
-project-manager x-new-feature Type: new feature request

Comments

@jdunkerley
Copy link
Member

The goal is for the local and cloud project managers to have mostly the same functionality.

One step is for the local Project Manager to be based off another folder.
Will need an API for the IDE to be able to change folders.

Goal is for the local IDE to have folder structure visible so you can organize stuff.

@jdunkerley jdunkerley converted this from a draft issue Jan 2, 2024
@jdunkerley jdunkerley added x-new-feature Type: new feature request --bug Type: bug -project-manager and removed --bug Type: bug labels Jan 2, 2024
@somebody1234
Copy link
Contributor

somebody1234 commented Jan 2, 2024

I think ideally we would want a way to watch specific folders for status changes (project added, project removed, project state change). Cloud doesn't have this functionality either so it's low priority + probably needs time spent designing it, but I think it's still something we should potentially take into consideration when designing this API.

Apart from that, note that the dashboard shows projects in a tree, meaning it can have multiple folders open at once. It's not a big deal since it just uses the underlying listDirectory API in the cloud to do that, but again might be worth taking into consideration.

Also note that there are a number of operations on projects (cut, copy, duplicate, plus dragging assets to move them around) that should eventually be supported. (Again though, likely out of scope for this initial issue.)

@4e6
Copy link
Contributor

4e6 commented Jan 12, 2024

I imagine it this way. If the user wants to open a project from a different location, Electron should allow opening a native system dialog to choose a directory. After a new directory is selected, you can pass it to the project/list to list the projects in the new directory.

For this to work, we need to update the project manager API to support a new optional baseDirectory parameter.

interface ProjectListRequest {
  numberOfProjects?: Int;
  baseDirectory?: string;
}

@somebody1234
Copy link
Contributor

@4e6 I think though, that the main usecase would be to be able to browse (and/or watch) an entire directory tree (which should initially be ~/enso?). But it's worth noting that we probably don't want to watch the entire tree right away, because the directory structure might be really deep and/or really big

@4e6
Copy link
Contributor

4e6 commented Feb 2, 2024

@JaroslavTulach pointed out that having a running process that can tell you the contents of a directory is a security vulnerability because the project manager doesn't have authentication and any user of the system can list directories of the user that started the project manager.

To mitigate this, instead of using project/list command on a running process, we can run the project manager as a CLI tool, e.g project-manager --list /path/to/directory and read the stdout. And only start the long-running project manager when we open the project.

@4e6 4e6 moved this from 📤 Backlog to 🔧 Implementation in Issues Board Feb 2, 2024
@enso-bot
Copy link

enso-bot bot commented Feb 2, 2024

Dmitry Bushev reports a new STANDUP for yesterday (2024-02-01):

Progress: Started working on the task. Tried to reproduce the issue. Catching up and going through notifications after the vacation. It should be finished by 2024-02-09.

Next Day: Next day I will be working on the #8650 task. Continue working on the task

@enso-bot
Copy link

enso-bot bot commented Feb 2, 2024

Dmitry Bushev reports a new STANDUP for today (2024-02-02):

Progress: Continue working on the task. Starting the project list command implementation. Added the CLI parameter and the parameter handling logic. Started working on the JSON conversion of the result. It should be finished by 2024-02-09.

Next Day: Next day I will be working on the #8650 task. Continue working on the task

@somebody1234
Copy link
Contributor

@4e6 just a heads up, cloud does allow opening subdirectories of the root directory. is there a security issue in allowing those without restrictions?

@4e6
Copy link
Contributor

4e6 commented Feb 6, 2024

It is not an issue in the Cloud because we can guarantee that only one user has access to the machine.

@enso-bot
Copy link

enso-bot bot commented Feb 6, 2024

Dmitry Bushev reports a new STANDUP for yesterday (2024-02-05):

Progress: Continue working on the task. Implemented the JSON conversion of the command line result. Finished implementation of the command line logic. Tested locally It should be finished by 2024-02-09.

Next Day: Next day I will be working on the #8650 task. Continue working on the task

@enso-bot
Copy link

enso-bot bot commented Feb 6, 2024

Dmitry Bushev reports a new STANDUP for today (2024-02-06):

Progress: Continue working on the task. Updated the JSON-RPC protocol of the project manager to allow to work with the projects located in custom directories. Updated the tests. Created the PR. It should be finished by 2024-02-09.

Next Day: Next day I will be working on the #8650 task. Continue working on the task

@somebody1234
Copy link
Contributor

wait, i mean letting the local backend (not the cloud backend) list descendant folders of the initial root directory

@enso-bot
Copy link

enso-bot bot commented Feb 8, 2024

Dmitry Bushev reports a new STANDUP for yesterday (2024-02-07):

Progress: Continue working on the task. Debugging the issues with the execution after the restart. Fixed NPE in the expression update serialization. Created a PR It should be finished by 2024-02-09.

Next Day: Next day I will be working on the #8650 task. Continue working on the task

@enso-bot
Copy link

enso-bot bot commented Feb 8, 2024

Dmitry Bushev reports a new STANDUP for today (2024-02-08):

Progress: Continue working on the task. Debugging the issues with the execution after the restart. Added cleanup of execution contexts after the client connection is terminated. Created a PR It should be finished by 2024-02-09.

Next Day: Next day I will be working on the #8650 task. Continue working on the task

@enso-bot
Copy link

enso-bot bot commented Feb 10, 2024

Dmitry Bushev reports a new STANDUP for yesterday (2024-02-09):

Progress: Continue working on the task. Was working on the issue with the suggestion updates not properly applied after the restart. Implemented the synchronization of suggestion udpates between the language srever actor logic and the runtime. Started testing. It should be finished by 2024-02-09.

Next Day: Next day I will be working on the #8650 task. Continue working on the task

@mergify mergify bot closed this as completed in #8985 Feb 12, 2024
mergify bot pushed a commit that referenced this issue Feb 12, 2024
close #8650

Changes in project manager required to work with projects located in custom directories.

Changelog:
- add: `--projects-directory /path/to/projects` `--project-list` command line parameters returning the projects located in custom directory
- update: `project/create`, `project/open`, `project/delete`, `project/rename` commands to work with projects located in custom directories
@github-project-automation github-project-automation bot moved this from 🔧 Implementation to 🟢 Accepted in Issues Board Feb 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
-project-manager x-new-feature Type: new feature request
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants