-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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: Fix repeated 403 due to app namespace being undefined (#20699) #20819
fix: Fix repeated 403 due to app namespace being undefined (#20699) #20819
Conversation
❌ Preview Environment deleted from BunnyshellAvailable commands (reply to this comment):
|
7f93899
to
99c2819
Compare
d9d7110
to
2c04134
Compare
/bns:deploy |
/bns:deploy |
I've checked Bunnyshell and didn't get any 403 while inspecting network stuff. The resource tree endpoint returns 200. |
Asked UI team to help with review. Thanks Andrii for fixing it, once we cherry-pick it , i will create release |
@pasha-codefresh, let's also include argoproj/gitops-engine#640 and follow-up PR to use it. That's another nasty bug that should be fixed in 2.13.1 |
ui/src/app/applications/components/applications-list/applications-table.tsx
Outdated
Show resolved
Hide resolved
ui/src/app/applications/components/applications-list/applications-tiles.tsx
Outdated
Show resolved
Hide resolved
ui/src/app/applications/components/applications-list/applications-tiles.tsx
Outdated
Show resolved
Hide resolved
ui/src/app/applications/components/application-details/application-details-app-dropdown.tsx
Outdated
Show resolved
Hide resolved
ui/src/app/applications/components/application-details/application-details.tsx
Outdated
Show resolved
Hide resolved
ui/src/app/applications/components/application-details/application-details.tsx
Show resolved
Hide resolved
ui/src/app/applications/components/applications-list/applications-table.tsx
Outdated
Show resolved
Hide resolved
2c04134
to
99152d2
Compare
@oleksandr-codefresh, @plakyda-codefresh, I've addressed the feedback. Thanks! |
Hm, jest is unhappy with using lodash-es.
which may not work in older browsers. I'll switch back to using a custom implementation. |
2619e38
to
4b7784a
Compare
/bns:deploy |
@andrii-korotkov-verkada still, create dedicated utils function |
But it's so simple, that it'd be more code to import a helper function and use it comparing to just check inline. |
@pasha-codefresh, the bns commands on PR don't seem to do anything. And it seems not possible to comment on comment. |
…20699) Fixes argoproj#20699 Constructor may not get called every time the application changes, so previous this.appNamespace could be stale. But the update to use `this.props.match.params.appnamespace` could also fail if it's undefined. As a fix, create and use a helper function `getAppNamespace` which has a special case handling for undefined. Also, use a namespaced endpoint when namespace is not undefined. It needs to be cherry-picked to v2.11-2.13. Signed-off-by: Andrii Korotkov <[email protected]>
4b7784a
to
5bab9fa
Compare
@andrii-korotkov-verkada let me know once it is ready to review, i will run it locally and see if it works |
@pasha-codefresh, it should be ready to review. |
/bns:deploy |
/bns:deploy |
@andrii-korotkov-verkada i am fine with this fix, but any reason why appNamespace should be undefined when you use search bar? i think we also should fix this in order to make it consistent. I can take a look into it |
/cherry-pick release-2.13 |
…20819) Fixes #20699 Constructor may not get called every time the application changes, so previous this.appNamespace could be stale. But the update to use `this.props.match.params.appnamespace` could also fail if it's undefined. As a fix, create and use a helper function `getAppNamespace` which has a special case handling for undefined. Also, use a namespaced endpoint when namespace is not undefined. It needs to be cherry-picked to v2.11-2.13. Signed-off-by: Andrii Korotkov <[email protected]>
@pasha-codefresh, I haven't figured that out. |
I will check it |
…20819) (#20860) Fixes #20699 Constructor may not get called every time the application changes, so previous this.appNamespace could be stale. But the update to use `this.props.match.params.appnamespace` could also fail if it's undefined. As a fix, create and use a helper function `getAppNamespace` which has a special case handling for undefined. Also, use a namespaced endpoint when namespace is not undefined. It needs to be cherry-picked to v2.11-2.13. Signed-off-by: Andrii Korotkov <[email protected]> Co-authored-by: Andrii Korotkov <[email protected]>
…20699) (argoproj#20819) Fixes argoproj#20699 Constructor may not get called every time the application changes, so previous this.appNamespace could be stale. But the update to use `this.props.match.params.appnamespace` could also fail if it's undefined. As a fix, create and use a helper function `getAppNamespace` which has a special case handling for undefined. Also, use a namespaced endpoint when namespace is not undefined. It needs to be cherry-picked to v2.11-2.13. Signed-off-by: Andrii Korotkov <[email protected]>
Fixes #20699
Constructor may not get called every time the application changes, so previous this.appNamespace could be stale. But the update to use
this.props.match.params.appnamespace
could also fail if it's undefined. As a fix, create and use a helper functiongetAppNamespace
which has a special case handling for undefined.Also, use a namespaced endpoint when namespace is not undefined.
It needs to be cherry-picked to v2.11-2.13.
Checklist: