-
Notifications
You must be signed in to change notification settings - Fork 13
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
Fix service API and add comment #1097
Conversation
return &service.Service{ | ||
Hash: hash, |
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 remove the mapping of the hash here because it's only use in the api service.create that accept service that should NOT have any hash. And also because hash.Decode returns an error if the hash is empty (not valid length)
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.
service.Create
should not take a definition in the first place. It should be definition minus hash and configuration image.
// build service's Docker image and apply to service. | ||
imageHash, err := s.container.Build(path) | ||
// build service's Docker image. | ||
_, err = s.container.Build(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.
We are still building the image for test purpose but not saving the image hash here. It will be saved in instance.create.
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.
still valid to build to test the validity of the service
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'm not 100% sure about the example in the file. The only purpose is for the documentation website and it's hard to maintain this kind of documentation where it can be generated based on the commands grpcurl of the api that contains request and response all the time
b62647b
to
117cbc1
Compare
I removed all example 👍 |
Based on #1092