-
Notifications
You must be signed in to change notification settings - Fork 52
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
fix: retry request for '"system:anonymous" cannot get resource' error #955
Conversation
Hello @olexii4 @akurinnoy I've noticed that the dashboard already sends a second Is this configurable somewhere? |
@dkwon17 The dashboard is not retrying this particular request. The request was probably done from another component as a sanity check before requesting some data. updated. |
Signed-off-by: David Kwon <dakwon@redhat.com>
c37bd9d
to
ca96c5f
Compare
@@ -24,7 +24,9 @@ export async function getKubernetesNamespace(): Promise<che.KubernetesNamespace[ | |||
} | |||
|
|||
export async function provisionKubernetesNamespace(): Promise<che.KubernetesNamespace> { | |||
const response = await axios.post(`${cheServerPrefix}/kubernetes/namespace/provision`); | |||
const response = await AxiosWrapper.createToRetryCannotGetResourceErrors().post( |
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.
Probably we can use createToRetryAnyErrors
and don't care about error message which we can't guarantee will be same all time.
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.
Sounds good, I have updated the PR
Signed-off-by: David Kwon <dakwon@redhat.com>
@@ -24,7 +24,9 @@ export async function getKubernetesNamespace(): Promise<che.KubernetesNamespace[ | |||
} | |||
|
|||
export async function provisionKubernetesNamespace(): Promise<che.KubernetesNamespace> { | |||
const response = await axios.post(`${cheServerPrefix}/kubernetes/namespace/provision`); |
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.
There is an unused axios import at the top of the page.
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.
Removing this unsued import will fix the build.
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.
Thank you, I've made a new commit to remove it
Signed-off-by: David Kwon <dakwon@redhat.com>
@dkwon17 once merged, could you please make sure that the fix is backported for 3.10.x |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: akurinnoy, dkwon17, ibuziuk, tolusha The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Signed-off-by: David Kwon <dakwon@redhat.com>
f51c6d3
to
ebc407d
Compare
New changes are detected. LGTM label has been removed. |
Docker image build succeeded: quay.io/eclipse/che-dashboard:pr-955 |
Build 3.10 :: dashboard_3.x/368: Console, Changes, Git Data |
Build 3.10 :: sync-to-downstream_3.x/4996: Console, Changes, Git Data |
Signed-off-by: David Kwon <dakwon@redhat.com>
Build 3.10 :: get-sources-rhpkg-container-build_3.x/4825: dashboard : 3.x :: Failed in : quay.io/devspaces/dashboard-rhel8:3.10-39 |
Signed-off-by: David Kwon <dakwon@redhat.com>
Build 3.10 :: dashboard_3.x/369: Console, Changes, Git Data |
Build 3.10 :: sync-to-downstream_3.x/5017: Console, Changes, Git Data |
Build 3.10 :: get-sources-rhpkg-container-build_3.x/4851: dashboard : 3.x :: Failed in : BREW:BUILD/STATUS:UNKNOWN |
What does this PR do?
Extension of #946 to cover the case where a 403 error happens for the
provision
request:What issues does this PR fix or reference?
eclipse-che/che#22352
Is it tested? How?
The issue this PR aims to fix is difficult to reproduce. To test this PR, you can apply this patch:
build the dashboard image, and verify that there are console warning messages notifying of request retries:
Release Notes
Docs PR