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

feat(service): restore optimized migration check #2854

Merged
merged 5 commits into from
Apr 27, 2022

Conversation

lorenzo-cavazzi
Copy link
Member

This PR restores the optimized migration check for the service.
The problem was mainly caused by invalid GitLab tokens that trigger errors when passed to the gitlab python library -- quite unexpected considering the different outcomes when invoking similar GitLab APIs with the same expired/invalid tokens.

In short, I added logic to:

  • handle the gitlab library common errors.
  • fall back to full repository checkout in case of unforeseen errors.

/deploy
fix #2546

- handle the GitLab library specific errors.
- fall back to full repository checkout in case of unforseen errors.

fix #2546
@lorenzo-cavazzi lorenzo-cavazzi requested a review from a team as a code owner April 22, 2022 15:31
@lorenzo-cavazzi lorenzo-cavazzi temporarily deployed to renku-ci-rp-2854 April 22, 2022 15:32 Inactive
@RenkuBot
Copy link
Contributor

You can access the deployment of this PR at https://renku-ci-rp-2854.dev.renku.ch

Copy link
Member

@Panaetius Panaetius left a comment

Choose a reason for hiding this comment

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

Thank you, looks a lot better now 🙂 I just had one really nitpicky comment

renku/ui/service/controllers/cache_migrations_check.py Outdated Show resolved Hide resolved
use `BaseException` instead of `Exception` to catch all the remaining exceptions

Co-authored-by: Ralf Grubenmann <ralf.grubenmann@sdsc.ethz.ch>
@lorenzo-cavazzi lorenzo-cavazzi temporarily deployed to renku-ci-rp-2854 April 25, 2022 11:22 Inactive
@lorenzo-cavazzi lorenzo-cavazzi enabled auto-merge (squash) April 25, 2022 11:38
@lorenzo-cavazzi lorenzo-cavazzi temporarily deployed to renku-ci-rp-2854 April 25, 2022 11:38 Inactive
@lorenzo-cavazzi lorenzo-cavazzi temporarily deployed to renku-ci-rp-2854 April 26, 2022 06:51 Inactive
@lorenzo-cavazzi lorenzo-cavazzi temporarily deployed to renku-ci-rp-2854 April 26, 2022 09:38 Inactive
@lorenzo-cavazzi
Copy link
Member Author

I added a test with a public repo, to be sure we don't break that for the optimized migrations checks (although that except BaseException should assure that will never be the case again)

@lorenzo-cavazzi lorenzo-cavazzi enabled auto-merge (squash) April 27, 2022 09:29
@lorenzo-cavazzi lorenzo-cavazzi merged commit 7e2a3d4 into develop Apr 27, 2022
@lorenzo-cavazzi lorenzo-cavazzi deleted the 2546-migration-optimized branch April 27, 2022 11:02
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.

Fix optimized migration check for users with an invalid auth
3 participants