Skip to content

chore(internal/librarian): add snippet directories to legacy state#5137

Merged
JoeWang1127 merged 1 commit intomainfrom
chore/add-src-root
Apr 6, 2026
Merged

chore(internal/librarian): add snippet directories to legacy state#5137
JoeWang1127 merged 1 commit intomainfrom
chore/add-src-root

Conversation

@JoeWang1127
Copy link
Copy Markdown
Contributor

@JoeWang1127 JoeWang1127 commented Apr 6, 2026

The createLegacyLibrary function is updated to include the generated snippets directory in both the SourceRoots and ReleaseExcludePaths fields for the legacy configuration.

Snippet directory needs to be present in SourceRoots so that the updated snippet metadata can be copied from docker response to language repository.

Snippet directory needs to be present in ReleaseExcludePaths so that changes in this directory will cause a release.

See go/sdk-librarian-interim-state for more details.

Fixes #5034

@JoeWang1127 JoeWang1127 changed the title chore: add source root and release exclude paths chore(internal/librarian): add snippet directories to legacy state Apr 6, 2026
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 createLegacyLibrary function to include generated snippet paths in SourceRoots and exclude them from releases via ReleaseExcludePaths. Corresponding test cases have been updated to reflect these changes. Feedback suggests defining a constant for the hardcoded snippet path prefix to improve maintainability and addressing the trailing slash inconsistency between the source root and the exclusion path.

Comment thread internal/librarian/add.go
@JoeWang1127 JoeWang1127 marked this pull request as ready for review April 6, 2026 21:58
@JoeWang1127 JoeWang1127 requested a review from a team as a code owner April 6, 2026 21:58
@JoeWang1127 JoeWang1127 merged commit bedd158 into main Apr 6, 2026
35 of 36 checks passed
@JoeWang1127 JoeWang1127 deleted the chore/add-src-root branch April 6, 2026 22:06
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.

golang: daily generation check failed because version in snippet metadata is not updated by legacylibrarian release

2 participants