Skip to content

Kokoro to gcb firestore#8700

Draft
danieljbruce wants to merge 8 commits into
mainfrom
kokoro-to-gcb-firestore
Draft

Kokoro to gcb firestore#8700
danieljbruce wants to merge 8 commits into
mainfrom
kokoro-to-gcb-firestore

Conversation

@danieljbruce

Copy link
Copy Markdown
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> 🦕

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

Copy link
Copy Markdown
Contributor

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 introduces a new Cloud Build configuration (cloudbuild.yaml) for running system tests and optional code coverage reporting in the handwritten/firestore directory. The feedback suggests a more robust and idiomatic way to run the locally installed nyc binary using npx --no-install instead of relying on a hardcoded internal path.

Comment on lines +47 to +51
if [ -f ./node_modules/nyc/bin/nyc.js ]; then
./node_modules/nyc/bin/nyc.js report || true # `|| true` prevents build failure if nyc report itself exits non-zero
else
echo "nyc not found, skipping coverage report."
fi

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Instead of hardcoding the internal path to the nyc executable (./node_modules/nyc/bin/nyc.js), which is fragile and dependent on the package's internal structure, use npx --no-install to run the locally installed binary. This is more idiomatic and robust.

    if npx --no-install nyc --version >/dev/null 2>&1; then
      npx nyc report || true
    else
      echo "nyc not found, skipping coverage report."
    fi

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