Skip to content

refactor(storage): gaxios migration system test fix#8

Open
thiyaguk09 wants to merge 12 commits intostorage-node-18from
node18/system-test
Open

refactor(storage): gaxios migration system test fix#8
thiyaguk09 wants to merge 12 commits intostorage-node-18from
node18/system-test

Conversation

@thiyaguk09
Copy link
Copy Markdown
Owner

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> 🦕

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the Google Cloud Storage client to use the /storage/v1 prefix for API endpoints and ensures Content-Type: application/json headers are explicitly set for POST requests. It also includes significant updates to system tests, such as skipping problematic public access tests, improving error handling in cleanup routines, and ensuring Node 18 compatibility in the transport layer. Review feedback identified a potential TypeError in getServiceAccount due to missing optional chaining, a bug in a test timeout callback that would cause tests to hang, and a potential type mismatch in error status assertions within the system tests.

Comment thread handwritten/storage/src/storage.ts Outdated
const ms = Math.pow(2, retries) * 1000 + Math.random() * 2000;
console.info(`retrying "${title}" in ${ms}ms`);
setTimeout(done(), ms);
setTimeout(() => done, ms);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The setTimeout call is passing an arrow function that returns the done function but does not execute it. This will cause the test to hang or timeout because the done callback is never invoked. It should be changed to pass the done function directly so it can be executed when the timer expires.

Suggested change
setTimeout(() => done, ms);
setTimeout(done, ms);

Comment thread handwritten/storage/system-test/storage.ts Outdated
@thiyaguk09 thiyaguk09 changed the title Gaxios migration system test fix Refactor: gaxios migration system test fix Apr 20, 2026
@thiyaguk09 thiyaguk09 changed the title Refactor: gaxios migration system test fix refactor: gaxios migration system test fix Apr 20, 2026
@thiyaguk09
Copy link
Copy Markdown
Owner Author

/gemini_review

@thiyaguk09 thiyaguk09 changed the title refactor: gaxios migration system test fix refactor(storage): gaxios migration system test fix Apr 22, 2026
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.

1 participant