Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

fix(source): Fix issue where worker would crash if a Bitbucket Cloud token couldn''t be refreshed#64028

Merged
pjlast merged 1 commit into
mainfrom
pjlast/fix-bitbucket-oauth-nil-logger
Jul 24, 2024
Merged

fix(source): Fix issue where worker would crash if a Bitbucket Cloud token couldn''t be refreshed#64028
pjlast merged 1 commit into
mainfrom
pjlast/fix-bitbucket-oauth-nil-logger

Conversation

@pjlast

@pjlast pjlast commented Jul 24, 2024

Copy link
Copy Markdown
Contributor

A Bitbucket Cloud incident caused APIs to error which caused Bitbucket Cloud OAuth tokens to fail to refresh. This revealed that the Bitbucket Cloud client called oauthutil.DoRequest with a nil logger, causing a nil pointer dereference.

This PR simply creates the logger before calling DoRequest, which is what the other clients do.

Test plan

No more cases of DoRequest with a nil logger.

Changelog

  • Fixed an issue where a Bitbucket Cloud OAuth token failing to refresh would crash the worker service.

@cla-bot cla-bot Bot added the cla-signed label Jul 24, 2024
@github-actions github-actions Bot added team/product-platform team/source Tickets under the purview of Source - the one Source to graph it all labels Jul 24, 2024
@pjlast pjlast changed the title [fix] Fix issue where worker would crash if a Bitbucket Cloud token couldn''t be refreshed fix(source): Fix issue where worker would crash if a Bitbucket Cloud token couldn''t be refreshed Jul 24, 2024
@pjlast pjlast requested a review from a team July 24, 2024 08:12
@pjlast pjlast merged commit bc036ad into main Jul 24, 2024
@pjlast pjlast deleted the pjlast/fix-bitbucket-oauth-nil-logger branch July 24, 2024 13:03
sourcegraph-release-bot pushed a commit that referenced this pull request Jul 24, 2024
…token couldn''t be refreshed (#64028)

(cherry picked from commit bc036ad)
pjlast added a commit that referenced this pull request Jul 24, 2024
… Bitbucket Cloud token couldn''t be refreshed (#64037)

A Bitbucket Cloud incident caused APIs to error which caused Bitbucket
Cloud OAuth tokens to fail to refresh. This revealed that the Bitbucket
Cloud client called `oauthutil.DoRequest` with a `nil` logger, causing a
nil pointer dereference.

This PR simply creates the logger before calling `DoRequest`, which is
what the other clients do.

## Test plan

No more cases of DoRequest with a nil logger.



## Changelog

- Fixed an issue where a Bitbucket Cloud OAuth token failing to refresh
would crash the `worker` service.


 <br> Backport bc036ad from #64028

Co-authored-by: Petri-Johan Last <petri.last@sourcegraph.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

backport 5.5.x cla-signed team/product-platform team/source Tickets under the purview of Source - the one Source to graph it all

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants