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

Handle errors gracefully on routes #93

Merged
merged 4 commits into from
May 16, 2024

Conversation

isinyaaa
Copy link
Contributor

@isinyaaa isinyaaa commented May 15, 2024

Description

This fixes an unhandled error on the GetEnvironmentEnvironments route, as well as standardizes error value treatment using an error to http status converter. All status codes now use the standard net/http consts (enum).

How Has This Been Tested?

Tested with make test.

Merge criteria:

  • The commits and have meaningful messages; the author will squash them after approval or will ask to merge with squash.
  • Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has manually tested the changes and verified that the changes work

Copy link
Member

@tarilabs tarilabs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you @isinyaaa for this PR,
let me know if the comment below you want to do it as part of this PR or future PR

@rareddy
Copy link
Contributor

rareddy commented May 16, 2024

Do we want to do anything with left over "todo" comments? if no further steps we are going to like 401 ones which get intercepted at filter level, can we remove them?

Signed-off-by: Isabella Basso do Amaral <idoamara@redhat.com>
Signed-off-by: Isabella Basso do Amaral <idoamara@redhat.com>
Signed-off-by: Isabella Basso do Amaral <idoamara@redhat.com>
Signed-off-by: Isabella Basso do Amaral <idoamara@redhat.com>
@tarilabs
Copy link
Member

Do we want to do anything with left over "todo" comments? if no further steps we are going to like 401 ones which get intercepted at filter level, can we remove them?

I'd advise to manage the TODOs as follow-up PR, so to keep the scope of this PR to start consolidating repeated code, while "debt" to be managed separately

Copy link
Member

@tarilabs tarilabs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me @isinyaaa thank you for the quick loop, I'd say we merge this and we track the TODO for the auth in a single filter in a subsequent PR; reason is I would like to parallelize work since a reported issue (#95 ) could then investigated in parallel better with this one merged already so we set a baseline

/lgtm
/approve

Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tarilabs

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@google-oss-prow google-oss-prow bot merged commit a32b1c9 into kubeflow:main May 16, 2024
10 checks passed
@isinyaaa isinyaaa deleted the go-err-handler branch May 16, 2024 17:21
tarilabs pushed a commit to tarilabs/model-registry that referenced this pull request Jul 25, 2024
periodic sync upstream KF to midstream ODH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants