FluidFramework icon indicating copy to clipboard operation
FluidFramework copied to clipboard

feat(build-cli): add `check compatLayerGeneration` command and integrate into release prepare

Open Copilot opened this issue 3 months ago • 6 comments

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 fluidCompatMetadata or generation files
  • Shared library: src/library/layerCompatGeneration.ts

    • Extracted shared functions from generate compatLayerGeneration command
    • 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
  • Release prepare integration: src/library/releasePrepChecks.ts

    • New CheckLayerCompatGeneration check function
    • Fix command includes release group when checking a release group
  • 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.

Copilot avatar Nov 24 '25 16:11 Copilot

/azp run Build - protocol-definitions,Build - test-tools,server-gitrest,server-gitssh,server-historian,server-routerlicious,Build - client packages,repo-policy-check

tylerbutler avatar Nov 24 '25 17:11 tylerbutler

/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

tylerbutler avatar Nov 24 '25 17:11 tylerbutler

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Nov 24 '25 17:11 azure-pipelines[bot]

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Nov 24 '25 17:11 azure-pipelines[bot]

@copilot Address the PR feedback at https://github.com/microsoft/FluidFramework/pull/25907#pullrequestreview-3501417038

tylerbutler avatar Nov 24 '25 17:11 tylerbutler

@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.

Copilot avatar Nov 24 '25 17:11 Copilot

/azp run Build - protocol-definitions,Build - test-tools,server-gitrest,server-gitssh,server-routerlicious,Build - client packages,repo-policy-check,Build - build-tools

tylerbutler avatar Dec 17 '25 02:12 tylerbutler

/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

tylerbutler avatar Dec 17 '25 02:12 tylerbutler

Azure Pipelines successfully started running 2 pipeline(s).

azure-pipelines[bot] avatar Dec 17 '25 02:12 azure-pipelines[bot]

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Dec 17 '25 02:12 azure-pipelines[bot]

/azp run Build - protocol-definitions,Build - test-tools,server-gitrest,server-gitssh,server-routerlicious,Build - client packages,repo-policy-check,Build - build-tools

tylerbutler avatar Dec 17 '25 20:12 tylerbutler

/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

tylerbutler avatar Dec 17 '25 20:12 tylerbutler

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Dec 17 '25 20:12 azure-pipelines[bot]

Azure Pipelines successfully started running 2 pipeline(s).

azure-pipelines[bot] avatar Dec 17 '25 20:12 azure-pipelines[bot]