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

Do not throw other then unauthorised error on token refresh #987

Merged
merged 3 commits into from Nov 15, 2023
Merged

Conversation

vinokurig
Copy link
Contributor

@vinokurig vinokurig commented Nov 14, 2023

What does this PR do?

Do not throw exceptions other then unauthorised exception on token refresh request when starting a workspace.

What issues does this PR fix or reference?

https://issues.redhat.com/browse/CRW-5015

Is it tested? How?

  1. Make sure GitHub oauth is NOT configured
  2. Start a workspace from a public GitHub repository.
  3. Stop the workspace and start it again.

See: workspace starts without any issues.

Release Notes

Docs PR

@che-bot
Copy link
Contributor

che-bot commented Nov 14, 2023

Click here to review and test in web IDE: Contribute

Copy link

Docker image build succeeded: quay.io/eclipse/che-dashboard:pr-987

Copy link

codecov bot commented Nov 14, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (e474b99) 85.13% compared to head (901d8b4) 85.17%.
Report is 1 commits behind head on main.

❗ Current head 901d8b4 differs from pull request most recent head 721af0e. Consider uploading reports for the commit 721af0e to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #987      +/-   ##
==========================================
+ Coverage   85.13%   85.17%   +0.03%     
==========================================
  Files         380      380              
  Lines       39198    39198              
  Branches     2524     2521       -3     
==========================================
+ Hits        33373    33388      +15     
+ Misses       5798     5784      -14     
+ Partials       27       26       -1     
Flag Coverage Δ
unittests 85.17% <100.00%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@artaleks9
Copy link
Contributor

Verified on Che with quay.io/eclipse/che-dashboard:pr-987 image.
The functionality works as expected.

}
throw e;
Copy link
Member

Choose a reason for hiding this comment

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

@vinokurig would it be possible to add test for this functionality? Do we need to re-throw exception in general?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

would it be possible to add test for this functionality?

done

Do we need to re-throw exception in general?

Yes, the exception interrupts the workspace start event until the authorisation callback.

@openshift-ci openshift-ci bot removed the lgtm label Nov 15, 2023
Copy link

Docker image build succeeded: quay.io/eclipse/che-dashboard:pr-987

@openshift-ci openshift-ci bot removed the lgtm label Nov 15, 2023
Copy link

Docker image build succeeded: quay.io/eclipse/che-dashboard:pr-987

Copy link

openshift-ci bot commented Nov 15, 2023

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: akurinnoy, artaleks9, ibuziuk, tolusha, vinokurig

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

@vinokurig vinokurig merged commit a2269d8 into main Nov 15, 2023
14 checks passed
@vinokurig vinokurig deleted the CRW-5015 branch November 15, 2023 15:03
@devstudio-release
Copy link

Build 3.11 :: dashboard_3.x/396: Console, Changes, Git Data

@devstudio-release
Copy link

@devstudio-release
Copy link

@devstudio-release
Copy link

@devstudio-release
Copy link

@devstudio-release
Copy link

@devstudio-release
Copy link

Build 3.11 :: dashboard_3.x/396: SUCCESS

Upstream sync done; /DS_CI/sync-to-downstream_3.x/5279 triggered

@devstudio-release
Copy link

@devstudio-release
Copy link

@devstudio-release
Copy link

@devstudio-release
Copy link

@devstudio-release
Copy link

Build 3.11 :: copyIIBsToQuay/2149: Console, Changes, Git Data

@devstudio-release
Copy link

Build 3.11 :: sync-to-downstream_3.x/5280: SUCCESS

Build container: devspaces-operator-bundle synced; /DS_CI/get-sources-rhpkg-container-build_3.x/5152 triggered; /job/DS_CI/job/dsc_3.x triggered;

@devstudio-release
Copy link

Build 3.11 :: operator-bundle_3.x/2287: SUCCESS

Upstream sync done; /DS_CI/sync-to-downstream_3.x/5280 triggered

@devstudio-release
Copy link

Build 3.11 :: dsc_3.x/1554: Console, Changes, Git Data

@devstudio-release
Copy link

Build 3.11 :: update-digests_3.x/4914: SUCCESS

Detected new images: rebuild operator-bundle
* dashboard; /DS_CI/operator-bundle_3.x/2287 triggered

vinokurig added a commit that referenced this pull request Nov 16, 2023
Do not throw exceptions other then unauthorised exception on token refresh request when starting a workspace.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
7 participants