-
Notifications
You must be signed in to change notification settings - Fork 2
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: added retry mechanism when storing and fetching the access token #886
Conversation
tokenFinder.findToken(projectPath).value.flatMap { | ||
case Some(savedToken) => decrypt(savedToken).void | ||
case _ => | ||
new Exception(show"Token associator - saved encrypted token cannot be found for project: $projectPath") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we maybe raise the exception only when we run out of attempts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes good idea!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this error is thrown only when the token is not found after it being saved to the DB. It should not happen, it is an unexpected behaviour of the program. With the retry being after this exception we would insert it again and verify if it was saved properly
* chore: events throughput on the Event Log dashboard * feat: sent_events_count metrics collecting sent events counts (#909) * fix: authorizer to work with security records with mixed visibility (#908) * refactor: GitLab client in KG service (#906) * chore: CLI upgraded to 1.1.0 * fix: transformation flow to deduplicate different members with the same id (#903) * fix: to awaiting deletion status change not to fail if the event is gone * fix: missing project on cloning error as MalformedRepository * fix: auth related problems on cloning as recoverable failures * feat: migrations to restore failed events (#900) * fix: triples generation not to fail when repo is dirty after checkout (#898) * fix: event for repos that cannot be cloned to be non-recoverable (#897) * fix: sparql encoder to escape ' (#895) * fix: event persistence to work in case of race condition (#893) * fix: reduce noise in EL logs (#891) * chore: MemberSyncEvent to be sent less frequently in the first hour * fix: triples removal process not to timeout after 45s * fix: token association not to fail on race condition (#889) * fix: status change event not to fail on 0 updated (#888) * fix: TG processes not to log malformed repo issues (#887) * fix: added retry mechanism when storing and fetching the access token (#886) * fix: auth related issues on cloning to be classified as AuthRecoverableError (#885) * chore: sentry-sdk for renku CLI upgraded to 1.5.5 * fix: project clean-up process not to log error for 401 on webhook removal (#884) * fix: global commit sync finder not to throw error when project is gone (#882) * fix: GET /events to render links in the response correctly * fix: global commit sync to traverse commits from the oldest (#881) * fix: commit sync flows to call GitLab without token on 403 (#878)
closes #707