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

Bug 2108638: SDK - expose useLastNamespace #11828

Merged

Conversation

upalatucci
Copy link
Contributor

@upalatucci upalatucci commented Jul 13, 2022

@vojtechszocs

Hei guys, don't know exactly how to test this change.
But should work :D

Why do we need to expose this hook?
Sometimes to create a link (like vm/template lists links) we need to know which is the last namespace used.
This logic is used also to create the links for the side menu

There is also a function here that we can expose instead if you want. But the hook seems to have more functionality

@openshift-ci openshift-ci bot added the component/sdk Related to console-plugin-sdk label Jul 13, 2022
@upalatucci
Copy link
Contributor Author

/retest

2 similar comments
@upalatucci
Copy link
Contributor Author

/retest

@upalatucci
Copy link
Contributor Author

/retest

@christianvogt
Copy link
Contributor

Wouldn't you be looking for the active namespace?
cc @spadgett

@upalatucci
Copy link
Contributor Author

upalatucci commented Jul 14, 2022

No, they are different. Now we are using the useActiveNamespace hook and it's not working properly.
The active namespace is the actual namespace in which I am at that moment. But I need the last namespace

For example:
I'm in the pod list with all-namespaces selected and go to a pod details page. Now I'm in the pod namespace (useActiveNamespace returns the pod namespace). But if I click on the breadcrumb menu on top, that link should redirect the user to the pod list of all namespace (this is the behavior of the pod link in the side menu). So for this reason we need the last namespace and not the active namespace.

Basically, i need to recreated this logic

@vojtechszocs
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jul 18, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 18, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: upalatucci, vojtechszocs

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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 18, 2022
@upalatucci upalatucci changed the title SDK - expose useLastNamespace Bug 2108638: SDK - expose useLastNamespace Jul 19, 2022
@openshift-ci openshift-ci bot added bugzilla/severity-medium Referenced Bugzilla bug's severity is medium for the branch this PR is targeting. bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. labels Jul 19, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 19, 2022

@upalatucci: This pull request references Bugzilla bug 2108638, which is invalid:

  • expected the bug to target the "4.12.0" release, but it targets "4.11.0" instead

Comment /bugzilla refresh to re-evaluate validity if changes to the Bugzilla bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

Bug 2108638: SDK - expose useLastNamespace

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.

@upalatucci
Copy link
Contributor Author

/bugzilla refresh

@openshift-ci openshift-ci bot added bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. and removed bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. labels Jul 19, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 19, 2022

@upalatucci: This pull request references Bugzilla bug 2108638, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.12.0) matches configured target release for branch (4.12.0)
  • bug is in the state NEW, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

Requesting review from QA contact:
/cc @gouyang

In response to this:

/bugzilla refresh

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.

@openshift-ci openshift-ci bot requested a review from gouyang July 19, 2022 15:08
@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 2 against base HEAD dfd610e and 8 for PR HEAD 9f1e88d in total

@upalatucci
Copy link
Contributor Author

/retest

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 1 against base HEAD dfd610e and 7 for PR HEAD 9f1e88d in total

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD dfd610e and 6 for PR HEAD 9f1e88d in total

@upalatucci
Copy link
Contributor Author

/retest

@upalatucci
Copy link
Contributor Author

tests passed (128/129 with 1 skipped) but i got Job execution failed: Pod got deleted unexpectedly. Can we override ci/prow/e2e-gcp-console ?

@upalatucci
Copy link
Contributor Author

/retest

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 21, 2022

@upalatucci: all tests passed!

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

@openshift-merge-robot openshift-merge-robot merged commit 34bc98b into openshift:master Jul 21, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 21, 2022

@upalatucci: All pull requests linked via external trackers have merged:

Bugzilla bug 2108638 has been moved to the MODIFIED state.

In response to this:

Bug 2108638: SDK - expose useLastNamespace

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. bugzilla/severity-medium Referenced Bugzilla bug's severity is medium for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. component/sdk Related to console-plugin-sdk lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants