-
Notifications
You must be signed in to change notification settings - Fork 572
dap: filesystem inspection when paused on a digest #3327
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
Conversation
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.
I'll have to try and fix that. The reason is because it's trying to reevaluate the build that just failed to read the filesystem which, predictably, fails. Need to grab the filesystem from right before the failure happens. |
If we can't show anything that's fine too. I think either a) the tree node shouldn't even appear or b) clearly state why the tree node is empty with some appropriately worded "error message" reason. |
I think we can but it might be easier if I build this on top of the change in #3325 since the method I would use to get the state before the error is already done in that PR but isn't done on master so I'd have to redo it here in a different way. |
da4ac41
to
6cfb87f
Compare
dap/variables.go
Outdated
func statf(st *types.Stat) string { | ||
mode := fs.FileMode(st.Mode) | ||
modTime := time.Unix(0, st.ModTime).UTC() | ||
return fmt.Sprintf("%s\t%d\t%d\t%s", mode, st.Uid, st.Gid, modTime.Format("Jan 2 15:04:05 2006")) | ||
} |
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.
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.
Hm... I don't think the tabs are likely a good idea. I'll look into another way of representing this.
3f1a4cd
to
4af8cf6
Compare
I've updated the PR. Files will now contain their content. The file reading doesn't currently have any restrictions, but it uses a basic heuristic that mimics Perl to determine whether something is a binary file and avoids reading those. Symlinks will show where they link to. File nodes show up as a tab to open. Directories will have their contents and the mode and other stat information for the directory entry are attached to a fake I think this should end up being both easy to use and also provide enough information to limit the need for using |
Add a file explorer to the debugger that allows exploring the filesystem of the current container. It will show directory contents, file contents, and symlink destinations. It will also show the file mode associated with a file. The file explorer defaults to marking itself as an expensive operation so the debugger doesn't automatically retrieve the information. Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
4af8cf6
to
8e356c3
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.
Thanks
Add a file explorer to the debugger that allows exploring the filesystem
of the current container. It will show directory contents, file
contents, and symlink destinations. It will also show the file mode
associated with a file.
The file explorer defaults to marking itself as an expensive operation
so the debugger doesn't automatically retrieve the information.