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

fix: solve client api request that can't handle 302 redirects #4352

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lingbohome
Copy link
Contributor

What type of PR is this?

/kind bug

What this PR does / why we need it

Whenever the token is about to expire, a new token will be obtained through refresh_token, and then a 302 redirect will occur. However, the client cannot handle the redirect normally, which will cause some errors on the page.
Therefore, we should adjust the logic here and use the new token to continue subsequent request processing so that the client can obtain the correct API request result.

Some error page rendering phenomena:
home page
image
pod detail page
image

Which issue(s) this PR fixes

Links #

Special notes for reviewers


Does this PR introduced a user-facing change?

solve client api request that can't handle 302 redirects

Additional documentation, usage docs, etc


@ks-ci-bot ks-ci-bot added release-note kind/bug Categorizes issue or PR as related to a bug. labels Dec 5, 2024
@ks-ci-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: lingbohome
To complete the pull request process, please assign donniean after the PR has been reviewed.
You can assign the PR to them by writing /assign @donniean in a comment when ready.

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ks-ci-bot
Copy link
Collaborator

Hi @lingbohome. Thanks for your PR.

I'm waiting for a kubesphere member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@ks-ci-bot ks-ci-bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Dec 5, 2024
Copy link
Contributor

@ROOMrepair ROOMrepair left a comment

Choose a reason for hiding this comment

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

/lgtm

@ks-ci-bot ks-ci-bot added the lgtm Indicates that a PR is ready to be merged. label Dec 9, 2024
@ks-ci-bot
Copy link
Collaborator

LGTM label has been added.

Git tree hash: 2e51044b7a36cc4891811bd4686d8c0219ba2491

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. needs-ok-to-test release-note size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants