feat(build-cli): add `check compatLayerGeneration` command and integrate into release prepare
Summary
Adds a check compatLayerGeneration command that validates layer generation metadata and integrates this check into release prepare.
Changes
-
New command:
flub check compatLayerGeneration- Validates generation metadata is current based on version changes and time elapsed
- Verifies generation file content matches expected format
- Reports packages needing updates with specific reasons
- Lenient: silently skips packages without
fluidCompatMetadataor generation files
-
Shared library:
src/library/layerCompatGeneration.ts- Extracted shared functions from
generate compatLayerGenerationcommand -
checkPackageLayerGeneration()- reusable check logic for both command and release prep -
maybeGetNewGeneration()- now accepts optional logger parameter - Constants:
DEFAULT_GENERATION_DIR,DEFAULT_GENERATION_FILE_NAME,DEFAULT_MINIMUM_COMPAT_WINDOW_MONTHS,DAYS_IN_MONTH_APPROXIMATION
- Extracted shared functions from
-
Release prepare integration:
src/library/releasePrepChecks.ts- New
CheckLayerCompatGenerationcheck function - Fix command includes release group when checking a release group
- New
-
Tests: Unit tests for check command covering patch detection, generation validation, content verification
Example usage
# Check a specific package
flub check compatLayerGeneration --dir ./packages/common/client-utils
# Check all packages in a release group
flub check compatLayerGeneration -g client
Breaking Changes
None.
/azp run Build - protocol-definitions,Build - test-tools,server-gitrest,server-gitssh,server-historian,server-routerlicious,Build - client packages,repo-policy-check
/azp run Build - api-markdown-documenter,Build - benchmark-tool,Build - build-common,Build - build-tools,Build - common-utils,Build - eslint-config-fluid,Build - eslint-plugin-fluid
Azure Pipelines successfully started running 1 pipeline(s).
Azure Pipelines successfully started running 1 pipeline(s).
@copilot Address the PR feedback at https://github.com/microsoft/FluidFramework/pull/25907#pullrequestreview-3501417038
@copilot Address the PR feedback at https://github.com/microsoft/FluidFramework/pull/25907#pullrequestreview-3501417038
I don't have access to external GitHub URLs. Could you please paste the specific feedback from that review here, or let me know which aspects of the PR need to be addressed? All the feedback in the current comment threads appears to have been resolved in commit 042a8b7.
/azp run Build - protocol-definitions,Build - test-tools,server-gitrest,server-gitssh,server-routerlicious,Build - client packages,repo-policy-check,Build - build-tools
/azp run Build - api-markdown-documenter,Build - benchmark-tool,Build - build-common,Build - build-tools,Build - common-utils,Build - eslint-config-fluid,Build - eslint-plugin-fluid,server-historian
Azure Pipelines successfully started running 2 pipeline(s).
Azure Pipelines successfully started running 1 pipeline(s).
/azp run Build - protocol-definitions,Build - test-tools,server-gitrest,server-gitssh,server-routerlicious,Build - client packages,repo-policy-check,Build - build-tools
/azp run Build - api-markdown-documenter,Build - benchmark-tool,Build - build-common,Build - build-tools,Build - common-utils,Build - eslint-config-fluid,Build - eslint-plugin-fluid,server-historian
Azure Pipelines successfully started running 1 pipeline(s).
Azure Pipelines successfully started running 2 pipeline(s).