-
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
Update marketplace cli commands with last version of service marketplace #853
Conversation
return output, p.call("createServiceOffer", input, &output) | ||
var o marketplacePublishPublishServiceVersionTaskOutputs | ||
err = p.call("publishPublishServiceVersion", input, &o) | ||
return o.Sid, o.VersionHash, o.Manifest, o.ManifestProtocol, err |
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.
Why not keeping the same pattern in the code. You could expose marketplacePublishPublishServiceVersionTaskOutputs
and have something like that
var o marketplacePublishPublishServiceVersionTaskOutputs
return o, p.call("publishPublishServiceVersion", input, &o)
I feel a function that returns too much data should return a struct.
Same for the PublishCreateServiceOffer
and PublishPurchase
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.
Yes, the function has too many returned value but:
- the CLI doesn't directly depend on the package provider, all the function are declared in commands.go
- it returns only simple types
- the commands actually only read 2 or 3 returned values. Should I only returned value useful for the commands?
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.
the CLI doesn't directly depend on the package provider, all the function are declared in commands.go
It does on few functions already: UploadSource
, PreparePublishServiceVersion
, PrepareCreateServiceOffer
, PreparePurchase
, GetService
... basically all except these ones
it returns only simple types
No it doesn't:
PreparePublishServiceVersion(service provider.MarketplaceManifestServiceData, from string) (provider.Transaction, error)
GetService(sid string) (provider.MarketplaceService, error)
the commands actually only read 2 or 3 returned values. Should I only returned value useful for the commands?
If we need only these data we could just return them but if we have the struct let's return the struct like that we have all the data without having a long list of outputs
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.
manual tests are ok
If you change ENDPOINT then marketplace stucks on
Forever (or maybe there is some timeout but it would be strange to have timeout to nonexisting port) |
Can you check the log of the service? |
Yes it throws error, but at the same time
Is still running, so, in that case, can task return error as well, or service should be killed (and it will be seen as stopped ) EDIT: ok, nvm,status is not tracked on service stop. |
Dependant on #844
Output of commands look like: