Skip to content
This repository was archived by the owner on Feb 8, 2024. It is now read-only.

SharedDirectoryWriteResponse#1008

Merged
ibeckermayer merged 55 commits intomasterfrom
isaiah/sd-write-response
Jul 28, 2022
Merged

SharedDirectoryWriteResponse#1008
ibeckermayer merged 55 commits intomasterfrom
isaiah/sd-write-response

Conversation

@ibeckermayer
Copy link
Copy Markdown

Requires backport to v9/v10

How to test manually

webapps

  1. Change the value below to true
    enableDirectorySharing: false, // note to reviewers: should be false in any PRs.
  2. run the development server like yarn start-teleport --target=https://ec2-35-171-27-185.compute-1.amazonaws.com/
  3. See https://gravitational.slack.com/archives/C02DQ1C2BMW/p1657807702085829 for a username/password combo

What to expect

Go to the top right ... menu and click Share Directory

image

(X-out of the "uncaught exception" screen if you get it). The directory you select should show up in the File Explorer as a shared drive

Screen Shot 2022-07-19 at 14 13 45

The drive should be navigable as well should any folders within it

image

Trying to open a file should show you the file contents (if you open it in Notepad for example). You will be able to type into the file, and if you save the file the changes should show up on your local disk.

Isaiah Becker-Mayer added 30 commits July 6, 2022 15:53
@ibeckermayer ibeckermayer force-pushed the isaiah/sd-write-response branch from 341b8f2 to 11eb8ed Compare July 21, 2022 17:09
Copy link
Copy Markdown
Contributor

@kimlisa kimlisa left a comment

Choose a reason for hiding this comment

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

resizing isn't possible yet right?

Comment thread packages/teleport/src/lib/tdp/client.ts Outdated
this.logger.debug(req);
// TODO(isaiah): here's where we'll respond with a SharedDirectoryWriteResponse

const bytesWritten = await this.sdManager.writeFile(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

the handleSharedDirectoryListRequest (below) has a try/catch block and calls handleError, does this block need it too?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Yes good catch. Typically anything that calls this.sdManager should be wrapped in try/catch

// SharedDirectoryManager manages a FileSystemDirectoryHandle for use
// by the TDP client. Most of it's methods can potentially throw errors
// and so should be wrapped in try/catch blocks.

@kimlisa
Copy link
Copy Markdown
Contributor

kimlisa commented Jul 22, 2022

was that document is not focused error happening during directory sharing? b/c i get that error even when i'm not sharing (but i don't remember the original discussion).

@ibeckermayer
Copy link
Copy Markdown
Author

resizing isn't possible yet right?

correct

was that document is not focused error happening during directory sharing? b/c i get that error even when i'm not sharing (but i don't remember the original discussion).

Yes that error was only ever happening for me right around when I started directory sharing. You're seeing it while just clicking around the interface while not directory sharing?

@lisa

@lisa
Copy link
Copy Markdown

lisa commented Jul 25, 2022

resizing isn't possible yet right?

correct

was that document is not focused error happening during directory sharing? b/c i get that error even when i'm not sharing (but i don't remember the original discussion).

Yes that error was only ever happening for me right around when I started directory sharing. You're seeing it while just clicking around the interface while not directory sharing?

@lisa

@lisa User Notification

Hello! You're receiving this notice because you've tagged me, @lisa, on GitHub, likely in error. Lisa is a common first name, and happens to be mine. I use the @lisa username here on GitHub. While being tagged in various repositories is an interesting way for me to discover new projects, it's likely not your intention. Did you mean to tag someone else? Did you mean to use @lisa instead, in a word as word usage?

Next Steps

I'm unsubscribing from this issue, pull request or project so if you meant to tag someone else to notify them, I would recommend that. If you meant to use my user ID as a plain string, without having GitHub notify me, you can do so by wrapping with backticks (the ` character), like so: @lisa.

@ibeckermayer ibeckermayer changed the base branch from isaiah/sd-write-request to master July 28, 2022 03:27
@ibeckermayer ibeckermayer enabled auto-merge (squash) July 28, 2022 03:37
@ibeckermayer ibeckermayer merged commit 8a0e9fe into master Jul 28, 2022
ibeckermayer pushed a commit that referenced this pull request Aug 23, 2022
ibeckermayer pushed a commit that referenced this pull request Aug 24, 2022
* `SharedDirectoryInfoResponse` (#996)

* `SharedDirectoryListRequest` (#999)

* `SharedDirectoryListResponse` (#1000)

* `SharedDirectoryReadRequest` (#1003)

* `SharedDirectoryReadResponse` (#1005)

* `SharedDirectoryWriteRequest` (#1007)

* `SharedDirectoryWriteResponse` (#1008)

* Tidy up `sharedDirectoryManager` (#1010)

* `SharedDirectoryMoveRequest` (#1045)

* `SharedDirectoryMoveResponse` (#1074)

* `SharedDirectoryCreateRequest` and `SharedDirectoryCreateResponse` (#1090)

* SharedDirectoryDeleteRequest and SharedDirectoryDeleteResponse (#1096)

* Add warning dialog for unsupported browsers for directory sharing (#1110)

* updates yarn.lock
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants