Skip to content

fix(internal/librarian/nodejs): stop renaming snippet metadata files#4840

Merged
julieqiu merged 2 commits intogoogleapis:mainfrom
julieqiu:remove-dot-pattern-snippet-metadata
Mar 26, 2026
Merged

fix(internal/librarian/nodejs): stop renaming snippet metadata files#4840
julieqiu merged 2 commits intogoogleapis:mainfrom
julieqiu:remove-dot-pattern-snippet-metadata

Conversation

@julieqiu
Copy link
Copy Markdown
Member

The copySamplesFromStaging function was renaming snippet metadata files from the generator's underscore pattern (snippet_metadata_.json) to a dot pattern (snippet_metadata..json). This caused repos to end up with both naming variants, since the old dot-pattern files were never cleaned up.

Use the generator's underscore pattern as the canonical name.

The copySamplesFromStaging function was renaming snippet metadata files
from the generator's underscore pattern (snippet_metadata_<api>.json) to
a dot pattern (snippet_metadata.<api>.json). This caused repos to end up
with both naming variants, since the old dot-pattern files were never
cleaned up.

Use the generator's underscore pattern as the canonical name.
@julieqiu julieqiu requested a review from a team as a code owner March 25, 2026 22:01
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.39%. Comparing base (57af767) to head (8552dd7).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4840      +/-   ##
==========================================
- Coverage   81.40%   81.39%   -0.01%     
==========================================
  Files         130      130              
  Lines       10895    10891       -4     
==========================================
- Hits         8869     8865       -4     
  Misses       1387     1387              
  Partials      639      639              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

@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 naming convention for snippet_metadata files in the Node.js generator. The logic that previously renamed snippet_metadata_<api>.json to snippet_metadata.<api>.json has been removed from internal/librarian/nodejs/generate.go. Correspondingly, tests in internal/librarian/nodejs/generate_test.go have been adjusted to expect the snippet_metadata_<api>.json format directly, and the test verifying the absence of the old underscore-prefixed names has been removed. There are no review comments to provide feedback on.

@julieqiu julieqiu enabled auto-merge (squash) March 25, 2026 22:53
@julieqiu julieqiu merged commit 95a6828 into googleapis:main Mar 26, 2026
24 checks passed
@julieqiu julieqiu deleted the remove-dot-pattern-snippet-metadata branch March 26, 2026 13:10
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.

2 participants