-
Notifications
You must be signed in to change notification settings - Fork 5
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
Events and API unification - Market API. #52
Conversation
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 same set of comments/changes as in second part of my review for #53 applies here also
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.
Second part of review (last)
proposal: Proposal, | ||
}, | ||
#[serde(rename = "ProposalRejectedEvent")] | ||
ProposalRejectedEvent { |
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.
To consider:
Since we have PropsalRejectedEvent
, maybe we could give better name to ProposalEvent
whose name seems to be to general now. Probably similar to AgreementEvent.
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.
Second thing to consider:
I saw in rust Requestor code, that when querying Proposals, he must check if Proposal is initial and make different decisions based on this. Maybe it's reason to separate initial Proposals from counter Proposals??
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 can't change event names and semantics for Alpha.3
, because we need to be backward compatible.
And this PR is meant for Alpha.3
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.
postponed to #53
98ee654
to
5738047
Compare
* Reason message is required, but Reason itself is optional * removed AgreementTimeoutEvent * renamed operations from `rejectProposal__Reason` to `rejectProposal__WithReason` * restored double linebreaks in descriptions to render paragraphs properly in generated documentation
5738047
to
27bdc52
Compare
responses: | ||
'200': | ||
200: | ||
description: Agreement approval result. | ||
content: | ||
application/json: | ||
schema: | ||
type: string | ||
enum: [Approved, Rejected, Cancelled] |
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.
@nieznanysprawiciel the solution for your concern is to return here a single event, but then we will not be back compatible, so it is not possible in this PR which is meant for Alpha.3
$ref: '#/components/schemas/AgreementEvent'
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.
and in ApproveAgreement on Provider
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.
postponed to #53
- $ref: 'common.yaml#/parameters/pollTimeout' | ||
- $ref: 'common.yaml#/parameters/afterTimestamp' | ||
- $ref: 'common.yaml#/parameters/maxEvents' | ||
- $ref: 'common.yaml#/parameters/appSessionId' |
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.
To enable querying only for events regarding single agreement
- $ref: 'common.yaml#/parameters/appSessionId' | |
- $ref: 'common.yaml#/parameters/appSessionId' | |
- $ref: '#/components/parameters/queryAgreementId' |
@@ -827,27 +967,33 @@ components: | |||
|
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.
To enable querying only for events regarding a single agreement
queryAgreementId: | |
name: agreementId | |
description: Used to enable querying agreement events related to a single agreement. | |
in: query | |
required: false | |
schema: | |
type: string | |
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.
For sure it is worth considering, because we have no easy way to query, for example, termination reason for specific Agreement, without querying all events, even these unrelated.
But note that adding new optional filter to endpoint is backward compatible change, so I suggest to postpone these changes for later and investigate other options.
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.
postponed to #53
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.
marked all comments postponed to #53 to easily find them when we need
@@ -827,27 +967,33 @@ components: | |||
|
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.
postponed to #53
responses: | ||
'200': | ||
200: | ||
description: Agreement approval result. | ||
content: | ||
application/json: | ||
schema: | ||
type: string | ||
enum: [Approved, Rejected, Cancelled] |
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.
postponed to #53
proposal: Proposal, | ||
}, | ||
#[serde(rename = "ProposalRejectedEvent")] | ||
ProposalRejectedEvent { |
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.
postponed to #53
This is part I of REST API unification and event-handling changes - Market API.
Part II is #53
Confirmed to be back-compatible with
yapapi v0.3.0
via golemfactory/yagna#758and later on via golemfactory/yagna#775