-
Notifications
You must be signed in to change notification settings - Fork 18.8k
36395 mount print #36407
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
36395 mount print #36407
Conversation
|
Thanks @agawish - looks like there's a test that needs to be updated; |
|
Thanks @thaJeztah I'll update the test |
Codecov Report
@@ Coverage Diff @@
## master #36407 +/- ##
=========================================
Coverage ? 34.69%
=========================================
Files ? 614
Lines ? 45490
Branches ? 0
=========================================
Hits ? 15782
Misses ? 27640
Partials ? 2068 |
|
I checked the log of powerpc jenkins job and it seems like |
volume/validate.go
Outdated
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.
Instead of repeating the error message in a few places I think this var should be replaced with:
func newErrBindSourceDoesNotExist(path string) {
return errors.Errorf("bind mount source path does not exist: %s", path)
}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.
That looks inline with the current implementation of other errors.
Are you happy with this format:
bind mount source path does not exist: %s
or my version of the format is acceptable:
bind mount source path: '%s' does not exist
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 don't have a strong preference. Either is ok with me.
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 think I'll go with your format version - I hate quotes too! 😄 - with a slight change to the method name to match other methods naming convention.
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, Thanks!
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.
thanks! changes LGTM, but can you squash your commits? Let me know if you don't know how to, and need help 👍
|
@thaJeztah wouldn't that mean that I need to create another branch, and/or revert some of these discussions? |
|
@agawish we try to keep changes grouped in logical commits and keep review history ("change name after review", "fix typo" etc) out of the git history. There's no need to create a new branch; if you do an "interactive" rebase, you can squash commits, then after that's done a force push to update the PR. Here's a section in the contribution guide that explains this; https://docs.docker.com/v17.06/opensource/workflow/work-issue/#pull-and-rebase-frequently If your "upstream" remote (the remote pointing to the https://github.com/moby/moby repository) is named "upstream", and the remote pointing to your fork is named "origin", the process is:
You can see that Git already shows some instructions in that file. The first ("Making a dry run test") and third ("Remove the TEST.md file") commits are not needed, so you can either "squash" them, or "remove" them. Removing is simply removing those lines: The remaining commits are all related to this PR, and looking at the changes in this PR, I think it's ok to combine them all in a single commit. So, you'd want to "squash" them together with the first commit; After you made those changes, save the file. Git will now open a new editor, that allows you to update the commit-message; I would suggest updating the After saving the file, the commits are squashed, and Git prints a message that it completed the rebase; Now, to update your PR, you need to force push your changes (because you've rebased); git push -f originAnd you're done 👍 |
Changes Details: -------------- Fixes: #36395 Refactoring the code to do the following: 1. Add the method `errBindSourceDoesNotExist` inside `validate.go` to be in-line with the rest of error message 2. Utilised the new method inside `linux_parser.go`, `windows_parser.go` and `validate_test.go` 3. Change the format from `bind mount source path: '%s' does not exist` to `bind mount source path does not exist: %s` 4. Reflected the format change into the 2 unit tests, namely: `volume_test.go` and `validate_test.go` 5. Reflected the format change into `docker_api_containers_test.go` integration test Signed-off-by: Amr Gawish <amr.gawish@gmail.com>
|
Is everything looks fine now @thaJeztah ? |
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, thanks!

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

fixes #36395
- What I did
errBindNotExistvariable fromvalidate.goas it is not used anymore.linux_parser.goandwindows_parser.goto display the Source directory in the error message.validate_test.gowith the new error message.- How I did it
Followed the contribution guide to build the docker environment and made changes to the source code.
- How to verify it
Run
go test -timeout 30s -run ^TestValidateMount$- Description for the changelog
It was a quick change to include the source directory path in the error message displayed to the user, files effected are 4 files.
- A picture of a cute animal (not mandatory but encouraged)
