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 login to sandbox workflow #4109

Merged
merged 1 commit into from
May 9, 2024

Conversation

datho7561
Copy link
Contributor

@datho7561 datho7561 commented May 8, 2024

  • Install portfinder as a runtime dependency (needed to start the extension when running as a vsix)
  • Remove the hack to create a service account to avoid being logged out (it seems the user is no longer allowed to list service accounts).
  • Trim the whitespace surrounding the copied token (the token gets padded with spaces for whatever reason).
  • Find and switch to the user's project when logging into a sandbox cluster
  • Fix the missing logo in the add cluster page
  • Resolve a NPE in the Application Explorer view when logging in, which would result in an error popup. Instead, the cluster name will be blank for a few milliseconds after logging in.

Signed-off-by: David Thompson davthomp@redhat.com

- Install portfinder as a runtime dependency (needed to start the
  extension when running as a vsix)
- Remove the hack to create a service account to avoid being logged out.
- Find and switch to the user's project when logging into a sandbox
  cluster
- Fix the missing logo in the add cluster page

Signed-off-by: David Thompson <davthomp@redhat.com>
@datho7561 datho7561 requested review from msivasubramaniaan and vrubezhny and removed request for msivasubramaniaan May 8, 2024 21:22
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 38.09524% with 13 lines in your changes are missing coverage. Please review.

Project coverage is 44.84%. Comparing base (da60441) to head (ec07b41).
Report is 212 commits behind head on main.

Files Patch % Lines
src/webview/cluster/clusterViewLoader.ts 26.66% 11 Missing ⚠️
src/explorer.ts 66.66% 1 Missing ⚠️
src/openshift/cluster.ts 66.66% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #4109       +/-   ##
===========================================
+ Coverage   32.37%   44.84%   +12.46%     
===========================================
  Files          85       86        +1     
  Lines        6505     6924      +419     
  Branches     1349     1446       +97     
===========================================
+ Hits         2106     3105      +999     
+ Misses       4399     3819      -580     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@vrubezhny vrubezhny 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. Thanks!

@vrubezhny vrubezhny merged commit 78dd780 into redhat-developer:main May 9, 2024
4 checks passed
@datho7561 datho7561 deleted the fix-login-with-sandbox branch May 9, 2024 19:30
vrubezhny added a commit to vrubezhny/vscode-openshift-tools that referenced this pull request May 13, 2024
- Now, when switching projects/namespaces, one can manually type in a project name to be set as an active one

Fixes: redhat-developer#3999

- The project listing is fixed, so annotated projects are shown now

Fixes: redhat-developer#4101

- For a Sandbox cluster a project which name contains current user name is used as a default one when logging in
  (A follow up to redhat-developer#4109)

Issue: redhat-developer#4080 (?)

Signed-off-by: Victor Rubezhny <vrubezhny@redhat.com>
vrubezhny added a commit to vrubezhny/vscode-openshift-tools that referenced this pull request May 13, 2024
- Now, when switching projects/namespaces, one can manually type in a project name to be set as an active one

Fixes: redhat-developer#3999

- The project listing is fixed, so annotated projects are shown now

Fixes: redhat-developer#4101

- For a Sandbox cluster a project which name contains current user name is used as a default one when logging in
  (A follow up to redhat-developer#4109)

Issue: redhat-developer#4080 (?)

Signed-off-by: Victor Rubezhny <vrubezhny@redhat.com>
vrubezhny added a commit to vrubezhny/vscode-openshift-tools that referenced this pull request May 14, 2024
- Now, when switching projects/namespaces, one can manually type in a project name to be set as an active one

Fixes: redhat-developer#3999

- The project listing is fixed, so annotated projects are shown now

Fixes: redhat-developer#4101

- For a Sandbox cluster a project which name contains current user name is used as a default one when logging in
  (A follow up to redhat-developer#4109)

Issue: redhat-developer#4080 (?)

Signed-off-by: Victor Rubezhny <vrubezhny@redhat.com>
vrubezhny added a commit to vrubezhny/vscode-openshift-tools that referenced this pull request May 15, 2024
- Now, when switching projects/namespaces, one can manually type in a project name to be set as an active one.
- No more 'Missing project/namespace' item for a project/namespace that doesn't exist on a cluster. This allows
  working normally on clusters with restrictions on list for projects.

Fixes: redhat-developer#3999

- The project listing is fixed, so annotated projects are shown now

Fixes: redhat-developer#4101

- For a Sandbox cluster a project which name contains current user name is used as a default one when logging in
  (A follow up to redhat-developer#4109)

Issue: redhat-developer#4080 (?)

Signed-off-by: Victor Rubezhny <vrubezhny@redhat.com>
vrubezhny added a commit to vrubezhny/vscode-openshift-tools that referenced this pull request May 15, 2024
- Now, when switching projects/namespaces, one can manually type in a project name to be set as an active one.
- No more 'Missing project/namespace' item for a project/namespace that doesn't exist on a cluster. This allows
  working normally on clusters with restrictions on list for projects.

Fixes: redhat-developer#3999

- The project listing is fixed, so annotated projects are shown now

Fixes: redhat-developer#4101

- For a Sandbox cluster a project which name contains current user name is used as a default one when logging in
  (A follow up to redhat-developer#4109)

Issue: redhat-developer#4080 (?)

Signed-off-by: Victor Rubezhny <vrubezhny@redhat.com>
vrubezhny added a commit to vrubezhny/vscode-openshift-tools that referenced this pull request May 15, 2024
- Now, when switching projects/namespaces, one can manually type in a project name to be set as an active one.
- No more 'Missing project/namespace' item for a project/namespace that doesn't exist on a cluster. This allows
  working normally on clusters with restrictions on list for projects.

Fixes: redhat-developer#3999

- The project listing is fixed, so annotated projects are shown now

Fixes: redhat-developer#4101

- For a Sandbox cluster a project which name contains current user name is used as a default one when logging in
  (A follow up to redhat-developer#4109)

Issue: redhat-developer#4080 (?)

Signed-off-by: Victor Rubezhny <vrubezhny@redhat.com>
vrubezhny added a commit to vrubezhny/vscode-openshift-tools that referenced this pull request May 16, 2024
- Now, when switching projects/namespaces, one can manually type in a project name to be set as an active one.
- No more 'Missing project/namespace' item for a project/namespace that doesn't exist on a cluster. This allows
  working normally on clusters with restrictions on list for projects.

Fixes: redhat-developer#3999

- The project listing is fixed, so annotated projects are shown now

Fixes: redhat-developer#4101

- For a Sandbox cluster a project which name contains current user name is used as a default one when logging in
  (A follow up to redhat-developer#4109)

Issue: redhat-developer#4080 (?)

Signed-off-by: Victor Rubezhny <vrubezhny@redhat.com>
vrubezhny added a commit to vrubezhny/vscode-openshift-tools that referenced this pull request May 16, 2024
- Now, when switching projects/namespaces, one can manually type in a project name to be set as an active one.
- No more 'Missing project/namespace' item for a project/namespace that doesn't exist on a cluster. This allows
  working normally on clusters with restrictions on list for projects.

Fixes: redhat-developer#3999

- The project listing is fixed, so annotated projects are shown now

Fixes: redhat-developer#4101

- For a Sandbox cluster a project which name contains current user name is used as a default one when logging in
  (A follow up to redhat-developer#4109)

Issue: redhat-developer#4080 (?)

Improved the detection whether we're logged in to a cluster or not.

Signed-off-by: Victor Rubezhny <vrubezhny@redhat.com>
vrubezhny added a commit to vrubezhny/vscode-openshift-tools that referenced this pull request May 16, 2024
- Now, when switching projects/namespaces, one can manually type in a project name to be set as an active one.
- No more 'Missing project/namespace' item for a project/namespace that doesn't exist on a cluster. This allows
  working normally on clusters with restrictions on list for projects.

Fixes: redhat-developer#3999

- The project listing is fixed, so annotated projects are shown now

Fixes: redhat-developer#4101

- For a Sandbox cluster a project which name contains current user name is used as a default one when logging in
  (A follow up to redhat-developer#4109)

Issue: redhat-developer#4080 (?)

Improved the detection whether we're logged in to a cluster or not.

Signed-off-by: Victor Rubezhny <vrubezhny@redhat.com>
vrubezhny added a commit to vrubezhny/vscode-openshift-tools that referenced this pull request May 16, 2024
- Now, when switching projects/namespaces, one can manually type in a project name to be set as an active one.
- No more 'Missing project/namespace' item for a project/namespace that doesn't exist on a cluster. This allows
  working normally on clusters with restrictions on list for projects.

Fixes: redhat-developer#3999

- The project listing is fixed, so annotated projects are shown now

Fixes: redhat-developer#4101

- For a Sandbox cluster a project which name contains current user name is used as a default one when logging in
  (A follow up to redhat-developer#4109)

Issue: redhat-developer#4080 (?)

Improved the detection whether we're logged in to a cluster or not.

Signed-off-by: Victor Rubezhny <vrubezhny@redhat.com>
vrubezhny added a commit to vrubezhny/vscode-openshift-tools that referenced this pull request May 17, 2024
- Now, when switching projects/namespaces, one can manually type in a project name to be set as an active one.
- No more 'Missing project/namespace' item for a project/namespace that doesn't exist on a cluster. This allows
  working normally on clusters with restrictions on list for projects.

Fixes: redhat-developer#3999

- The project listing is fixed, so annotated projects are shown now

Fixes: redhat-developer#4101

- For a Sandbox cluster a project which name contains current user name is used as a default one when logging in
  (A follow up to redhat-developer#4109)

Issue: redhat-developer#4080 (?)

Improved the detection whether we're logged in to a cluster or not.

Signed-off-by: Victor Rubezhny <vrubezhny@redhat.com>
vrubezhny added a commit to vrubezhny/vscode-openshift-tools that referenced this pull request May 17, 2024
- Now, when switching projects/namespaces, one can manually type in a project name to be set as an active one.
- No more 'Missing project/namespace' item for a project/namespace that doesn't exist on a cluster. This allows
  working normally on clusters with restrictions on list for projects.

Fixes: redhat-developer#3999

- The project listing is fixed, so annotated projects are shown now

Fixes: redhat-developer#4101

- For a Sandbox cluster a project which name contains current user name is used as a default one when logging in
  (A follow up to redhat-developer#4109)

Issue: redhat-developer#4080 (?)

Improved the detection whether we're logged in to a cluster or not.

Signed-off-by: Victor Rubezhny <vrubezhny@redhat.com>
vrubezhny added a commit to vrubezhny/vscode-openshift-tools that referenced this pull request May 17, 2024
- Now, when switching projects/namespaces, one can manually type in a project name to be set as an active one.
- No more 'Missing project/namespace' item for a project/namespace that doesn't exist on a cluster. This allows
  working normally on clusters with restrictions on list for projects.

Fixes: redhat-developer#3999

- The project listing is fixed, so annotated projects are shown now

Fixes: redhat-developer#4101

- For a Sandbox cluster a project which name contains current user name is used as a default one when logging in
  (A follow up to redhat-developer#4109)

Issue: redhat-developer#4080 (?)

Improved the detection whether we're logged in to a cluster or not.

Signed-off-by: Victor Rubezhny <vrubezhny@redhat.com>
vrubezhny added a commit to vrubezhny/vscode-openshift-tools that referenced this pull request May 17, 2024
- Now, when switching projects/namespaces, one can manually type in a project name to be set as an active one.
- No more 'Missing project/namespace' item for a project/namespace that doesn't exist on a cluster. This allows
  working normally on clusters with restrictions on list for projects.

Fixes: redhat-developer#3999

- The project listing is fixed, so annotated projects are shown now

Fixes: redhat-developer#4101

- For a Sandbox cluster a project which name contains current user name is used as a default one when logging in
  (A follow up to redhat-developer#4109)

Issue: redhat-developer#4080 (?)

Improved the detection whether we're logged in to a cluster or not.

Signed-off-by: Victor Rubezhny <vrubezhny@redhat.com>
vrubezhny added a commit that referenced this pull request May 17, 2024
- Now, when switching projects/namespaces, one can manually type in a project name to be set as an active one.
- No more 'Missing project/namespace' item for a project/namespace that doesn't exist on a cluster. This allows
  working normally on clusters with restrictions on list for projects.

Fixes: #3999

- The project listing is fixed, so annotated projects are shown now

Fixes: #4101

- For a Sandbox cluster a project which name contains current user name is used as a default one when logging in
  (A follow up to #4109)

Issue: #4080 (?)

Improved the detection whether we're logged in to a cluster or not.

Signed-off-by: Victor Rubezhny <vrubezhny@redhat.com>
@vrubezhny vrubezhny added this to the 1.14.0 milestone May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants