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

Development: Fix issue where the VCS token is not present for some users after logging in #8247

Merged
merged 22 commits into from
Apr 25, 2024

Conversation

chrisknedl
Copy link
Contributor

@chrisknedl chrisknedl commented Mar 24, 2024

@coderabbitai ignore

Checklist

General

Client

  • Important: I implemented the changes with a very good performance, prevented too many (unnecessary) REST calls and made sure the UI is responsive, even with large data.
  • I strictly followed the client coding and design guidelines.
  • I added multiple integration tests (Jest) related to the features (with a high test coverage), while following the test guidelines.
  • I documented the TypeScript code using JSDoc style.

Motivation and Context

This issue was initially discovered when a user participates in an exercise for the first time after being created, in which case the VCS access token might be missing, and therefore the resulting repo URL is not correct and cannot be used to clone the repository. This PR fixes this problem and other related issues that might possibly still be undiscovered.

Description

To fix this issue, the user caching mechanism not only checks if the user object is initialized, but also if it contains the token when one is expected. If not, the user is fetched from the database.

Steps for Testing

This issue can only be reproduced with old accounts that were present before the vcsAccessToken feature was activated. Because of this, the PR also doesn't change anything for the test servers.

What you can check:
On any test server check that the clone URL is still shown when participating as student in a programming exercise. Ideally one test for a testserver connected to GitLab/Jenkins and another one to either Bamboo or LocalVCS.

Testserver States

Note

These badges show the state of the test servers.
Green = Currently available, Red = Currently locked







Review Progress

Performance Review

  • I (as a reviewer) confirm that the client changes (in particular related to REST calls and UI responsiveness) are implemented with a very good performance

Code Review

  • Code Review 1
  • Code Review 2

Manual Tests

  • Test 1
  • Test 2

Test Coverage

@github-actions github-actions bot added tests client Pull requests that update TypeScript code. (Added Automatically!) labels Mar 24, 2024
@chrisknedl chrisknedl marked this pull request as ready for review March 27, 2024 17:35
@chrisknedl chrisknedl requested a review from a team as a code owner March 27, 2024 17:35
@BaumiCoder BaumiCoder self-requested a review April 8, 2024 17:21
@b-fein b-fein added this to the 7.0.2 milestone Apr 23, 2024
@krusche krusche merged commit dfe4f09 into develop Apr 25, 2024
30 of 32 checks passed
@krusche krusche deleted the fix-missing-vcs-token-on-login branch April 25, 2024 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix client Pull requests that update TypeScript code. (Added Automatically!) ready to merge small tests
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

6 participants