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

Fix service API and add comment #1097

Merged
merged 5 commits into from
Jun 25, 2019
Merged

Fix service API and add comment #1097

merged 5 commits into from
Jun 25, 2019

Conversation

NicolasMahe
Copy link
Member

Based on #1092

return &service.Service{
Hash: hash,
Copy link
Member Author

@NicolasMahe NicolasMahe Jun 24, 2019

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)

Copy link
Member

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)
Copy link
Member Author

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.

Copy link
Member

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

Copy link
Member

@antho1404 antho1404 left a 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

@NicolasMahe
Copy link
Member Author

NicolasMahe commented Jun 25, 2019

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

I removed all example 👍

@NicolasMahe NicolasMahe merged commit 89832e4 into dev Jun 25, 2019
@NicolasMahe NicolasMahe deleted the fix/grpc-service branch June 25, 2019 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants