Skip to content

Improve GitLab API finder error handling#569

Merged
casperdcl merged 3 commits intodevelfrom
improve-gitlab-api-finder
May 31, 2021
Merged

Improve GitLab API finder error handling#569
casperdcl merged 3 commits intodevelfrom
improve-gitlab-api-finder

Conversation

@0x2b3bfa0
Copy link
Member

@0x2b3bfa0 0x2b3bfa0 commented May 27, 2021

Closes #472, related to #563

@0x2b3bfa0 0x2b3bfa0 added the enhancement New feature or request label May 27, 2021
@0x2b3bfa0 0x2b3bfa0 requested a review from DavidGOrtega May 27, 2021 14:47
@0x2b3bfa0 0x2b3bfa0 self-assigned this May 27, 2021
@0x2b3bfa0 0x2b3bfa0 temporarily deployed to test-internal May 27, 2021 14:47 Inactive
@0x2b3bfa0 0x2b3bfa0 marked this pull request as ready for review May 27, 2021 14:53
@0x2b3bfa0 0x2b3bfa0 changed the base branch from master to devel May 27, 2021 17:17
@0x2b3bfa0 0x2b3bfa0 temporarily deployed to test-internal May 27, 2021 17:19 Inactive
@0x2b3bfa0 0x2b3bfa0 requested review from DavidGOrtega May 27, 2021 17:20

async repoBase() {
if (this._detected_base) return this._detected_base;
if (this.detectedBase) return this.detectedBase;
Copy link
Contributor

Choose a reason for hiding this comment

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

could still keep the underscore prefix though if the intention was to be a private var.

Copy link
Contributor

Choose a reason for hiding this comment

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

More conventional than anything else

Copy link
Member Author

Choose a reason for hiding this comment

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

The most idiomatic alternative would be using a private field, but that's just a proposal.

Copy link
Member Author

@0x2b3bfa0 0x2b3bfa0 May 27, 2021

Choose a reason for hiding this comment

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

We use that variable to memoi*e the function result, so it can be considered private.

Copy link
Contributor

Choose a reason for hiding this comment

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

it does not have to be private either but should be exposed in other drivers for consisitency, being very purist we should do a closure of request here with the detectedbase... not needed IMHO

Copy link
Member Author

Choose a reason for hiding this comment

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

Using a closure sounds tempting, but would add a considerable maintenance overhead and nobody cares about our internal API, yet. 😅 Let's leave it be for now.

Copy link
Member Author

Choose a reason for hiding this comment

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

@casperdcl, what do you think?

Copy link
Contributor

Choose a reason for hiding this comment

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

yes not really massive priority to do this at enterprise level yet, fine as-is

@0x2b3bfa0 0x2b3bfa0 temporarily deployed to test-internal May 27, 2021 17:50 Inactive
@0x2b3bfa0 0x2b3bfa0 requested a review from casperdcl May 27, 2021 21:00

async repoBase() {
if (this._detected_base) return this._detected_base;
if (this.detectedBase) return this.detectedBase;
Copy link
Contributor

Choose a reason for hiding this comment

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

yes not really massive priority to do this at enterprise level yet, fine as-is

@casperdcl casperdcl merged commit 6904134 into devel May 31, 2021
@casperdcl casperdcl deleted the improve-gitlab-api-finder branch May 31, 2021 00:32
@casperdcl casperdcl mentioned this pull request May 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Gitlab on premise misleading "API not found" due to SSL issues

3 participants