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

Add ownership SDK and API #1368

Merged
merged 6 commits into from
Sep 27, 2019
Merged

Add ownership SDK and API #1368

merged 6 commits into from
Sep 27, 2019

Conversation

NicolasMahe
Copy link
Member

This PR add the ownership support to service.

Instead of simply adding a new parameter owner to service, a new ownership sdk has been created to manage the ownership of any resource.
The main argument to separate ownership from service is to be able to transfer the ownership without modification the service resource itself. The same approach should be used on ALL resource: no edition of data: only creating new resource that reference the previous to change its behavior.

Using this PR and the latest of the CLI, run:

./bin/run service:create '{"name":"serviceB","tasks":[{"inputs":[{"type":"String","key":"message"}],"outputs":[{"type":"String","key":"value"}],"key":"taskX"},{"key":"emits"}],"events":[{"data":[{"type":"String","key":"message"}],"key":"eventX"}],"configuration":{},"sid":"serviceD","source":"QmT4DzLGD8GHsvJkfQuzmabpbDCVZAA7NgeRYz3y485kW9"}'  --account=bob --passphrase=pass

Wait a bit. Then check the creation of the ownership by running:

grpcurl -proto protobuf/api/ownership.proto -plaintext localhost:50052 mesg.api.Ownership/List | jq .

Dependant on #1361
Closes #1358

@NicolasMahe NicolasMahe added this to the next milestone Sep 26, 2019
@NicolasMahe NicolasMahe self-assigned this Sep 26, 2019
@NicolasMahe NicolasMahe changed the title Feature/service owner Add ownership SDK to support service ownership. Sep 26, 2019
@NicolasMahe NicolasMahe added the release:add Pull requests that add something label Sep 26, 2019
@antho1404
Copy link
Member

Just a note, there are still 2 issues:

  • There is a timeout when creating a service (certainly because docker build the image), it works if the image is already built
  • We cannot republish the same transaction but that might be a good thing and maybe we shouldn't be able to have two times the exact same transaction.

@NicolasMahe NicolasMahe merged commit 3092897 into dev Sep 27, 2019
@NicolasMahe NicolasMahe deleted the feature/service-owner branch September 27, 2019 04:48
@NicolasMahe NicolasMahe changed the title Add ownership SDK to support service ownership. Add ownership SDK and API to support service ownership. Oct 25, 2019
@NicolasMahe NicolasMahe changed the title Add ownership SDK and API to support service ownership. Add ownership SDK and API Oct 25, 2019
@NicolasMahe NicolasMahe mentioned this pull request Oct 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release:add Pull requests that add something
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add ownership to services
3 participants