-
Notifications
You must be signed in to change notification settings - Fork 12
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
core: gateway response change #623
Conversation
f73575f
to
e339636
Compare
e339636
to
8f2ce60
Compare
} | ||
|
||
// gatewayAuthGetResponse defines the response of GET request for /auth | ||
type gatewayAuthGetResponse struct { | ||
Result *types.GatewayAuthParameter `json:"result"` | ||
Error string `json:"error"` |
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.
All KGW error will be in gatewayErrRespose, this is no use.
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.
manually triggered kgw against kgw main
test passed: https://github.com/kwilteam/kwil-db/actions/runs/8571353728/job/23491389542 (that doesn't include https://github.com/kwilteam/kgw/pull/29, so is that weird to pass?)
manually triggered kgw against https://github.com/kwilteam/kgw/pull/29 just failed: https://github.com/kwilteam/kwil-db/actions/runs/8571621385 Couldn't find the kgw commit sha? Retry by kgw branch name instead of commit: https://github.com/kwilteam/kwil-db/actions/runs/8571658702/job/23492412534 looks to be running
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 test on main, I guess not, because we don't really test the error for KGW APIs?
For test on kwilteam/kgw#29, not sure
// gatewayErrResponse defines the response of gateway error. | ||
type gatewayErrResponse struct { | ||
// to be compatible with google.golang.org/genproto/googleapis/rpc/status.Status | ||
Message string `json:"message"` |
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.
Confirmed this matches kgw ResponseError
: https://github.com/kwilteam/kgw/pull/29/files#diff-7ed3dcaadf0b52ddf9731d830f75cdec87978777990f6a397d5a2beb6ad6975bR27-R29
and kgw marshals that type for errors in https://github.com/kwilteam/kgw/pull/29/files#diff-8b7f25bac2ae04c2ce2abb628c6aa28103fd113103a62f3e9d232fa995684915R67
✔️
https://github.com/kwilteam/kgw/pull/29 is merged. I think |
Or kgw update |
Hmm, the kgw manual test run against kgw main and kwil-db main (without this PR) passed. https://github.com/kwilteam/kwil-db/actions/runs/8571925077/job/23493296723 Anyway, this PR LGTM. |
You mean for testing? In the workflow, if the branch is not 'release-*', it'll use 'go work', so it will use the core moudle(commin on 'main') on kwil-db |
yeah that's what I mentioned on the meeting, I didn't create a test on this error response case |
No, just for kgw build. The go.mod in the kgw repo does not have a replace or anything that would have it use latest kwil-db. We have to update it for every change to core that we want kgw to use. |
For local dev I also use 'go work', so it's not a problem? I don't think I get you |
Ah, sorry sorry, I see in .github/workflows/kgw-test-reuse.yaml: |
8f2ce60
to
a17e15b
Compare
yeah, I think that will serve the purpose |
a17e15b
to
1645da1
Compare
This update gateway client to be compatible with new kgw repsonse structure, which is compatible with swagger error response
This requires both kwil-cli and kgw update
This should be merged once after kwilteam/kgw#29 is merged