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: added retry mechanism when storing and fetching the access token #886

Merged
merged 2 commits into from
Feb 28, 2022

Conversation

joke1196
Copy link
Contributor

@joke1196 joke1196 commented Feb 28, 2022

closes #707

@joke1196 joke1196 requested a review from a team as a code owner February 28, 2022 14:30
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")
Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes good idea!

Copy link
Contributor Author

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

@joke1196 joke1196 merged commit 11d7a9f into development Feb 28, 2022
@joke1196 joke1196 deleted the 707-token-decoding-failures branch February 28, 2022 16:08
@jachro jachro mentioned this pull request Mar 9, 2022
jachro added a commit that referenced this pull request Mar 9, 2022
* 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)
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.

2 participants