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

chore!: gaxios rebase node 18 #2569

Open
wants to merge 53 commits into
base: node-18
Choose a base branch
from

Conversation

thiyaguk09
Copy link
Contributor

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #<issue_number_goes_here> 🦕

@product-auto-label product-auto-label bot added size: m Pull request size is medium. api: storage Issues related to the googleapis/nodejs-storage API. labels Jan 8, 2025
@thiyaguk09 thiyaguk09 changed the title Gaxios Node 18 Gaxios rebase node 18 Jan 8, 2025
@product-auto-label product-auto-label bot added size: xl Pull request size is extra large. and removed size: m Pull request size is medium. labels Jan 8, 2025
@thiyaguk09 thiyaguk09 changed the title Gaxios rebase node 18 chore!: gaxios rebase node 18 Jan 8, 2025
@thiyaguk09 thiyaguk09 marked this pull request as ready for review February 3, 2025 11:59
@thiyaguk09 thiyaguk09 requested review from a team as code owners February 3, 2025 11:59
src/file.ts Outdated Show resolved Hide resolved
src/file.ts Outdated Show resolved Hide resolved
@@ -261,12 +255,19 @@ class Iam {
qs.optionsRequestedPolicyVersion = options.requestedPolicyVersion;
}

this.request_(
// eslint-disable-next-line @typescript-eslint/no-floating-promises
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this disable necessary? Looks like errors are being handled in the callback. I'd rather we not add these disables if possible.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Your concern about the disable is valid. The linter indicates that because this.storageTransport.makeRequest likely returns a Promise, we must handle potential rejections. Even though we have a callback, the Promise itself might reject, and we need to account for that. Therefore, we are suppressing the warning.

Copy link
Contributor

Choose a reason for hiding this comment

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

Interesting... this must be a more recent linter change as it didn't complain when I originally wrote storage-transport.ts. Maybe it is worth revisiting the signature / implementation for storage-transport.request. Having to add a disable every time we use a callback to that function is not ideal and has a bit of a code smell to it.

@@ -347,20 +348,27 @@ class Iam {
maxRetries = 0;
}

this.request_(
// eslint-disable-next-line @typescript-eslint/no-floating-promises
Copy link
Contributor

Choose a reason for hiding this comment

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

Same comment about this disable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: storage Issues related to the googleapis/nodejs-storage API. size: xl Pull request size is extra large.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants