Skip to content

Conversation

@agarwal-navin
Copy link
Contributor

@agarwal-navin agarwal-navin commented Nov 7, 2025

#25670 added a command (fluid generate layerCompatGeneration) that will auto-generate the layer compatibility generation for packages that support it.

This change leverages that as follows:

  • Added layerGeneration:gen script to client-utils's package.json file which will run the above command.
  • Ran the script to generate the layer compatibility generation for the client-utils package. It auto-added layerCompatMetadata to its package.json and auto-generated a layerGenerationState.ts file which contains the generation value. The generation is set to 2 since that is the current generation (hard coded in different layers).

AB#51927

@github-actions github-actions bot added area: build Build related issues base: main PRs targeted against main branch labels Nov 7, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds layer compatibility generation tracking infrastructure to the codebase. The changes enable automatic generation and updating of layer generation files based on package versions and release dates, with the goal of tracking compatibility across different Fluid layers over time.

  • Adds layerGenerationState.ts file to @fluid-internal/client-utils package with generation value of 2
  • Introduces layerGeneration:gen npm script and build configuration to auto-generate generation state files
  • Updates version setting logic to regenerate layer generation files alongside package version files

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
packages/common/client-utils/src/layerGenerationState.ts New auto-generated file defining generation constant (value: 2) for layer compatibility tracking
packages/common/client-utils/package.json Adds layerGeneration:gen script and fluidCompatMetadata with generation 2, release date, and package version
fluidBuild.config.cjs Adds layerGeneration:gen task configuration and includes it as a dependency of build:docs
build-tools/packages/build-cli/src/library/package.ts Updates setVersion function to run layerGeneration:gen script during version updates

* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
* Licensed under the MIT License.
*
* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Policy check is failing because this line ends with a full stop.
@scottn12 @tylerbutler Not sure if this is intentional but either way, this will need a build-tools change.

Copy link
Member

Choose a reason for hiding this comment

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

You can add an ignore for the policy in the root fluidBuild.config.cjs

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Adding layerGenerationState.ts to policy:handlerExclusions seems to fix the problem. However, I think it might be better to just update the code that generates the file to not have a full stop. What do you think?

Copy link
Member

Choose a reason for hiding this comment

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

Do both. Use a workaround for now, fix build-tools, then integrate the fix and remove the workaround. Assuming you're blocked. If not, you can fix it first.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point. I manually removed the . as a workaround. I should wait to check this PR in until the release happens though. Otherwise, this file might be regenerated and the changes to the build process won't be in creating confusion.

@github-actions github-actions bot removed the area: build Build related issues label Nov 12, 2025
@agarwal-navin agarwal-navin merged commit ec5afda into microsoft:main Nov 12, 2025
46 checks passed
@agarwal-navin agarwal-navin deleted the autoGenerationUpdate branch November 12, 2025 22:05
agarwal-navin added a commit that referenced this pull request Nov 21, 2025
…d during release (#25873)

Added a new check function that will run during a release. For minor and
patch releases, it will check the generation for layer compat has been
updated before releasing and bumping versions. The check function runs
the `pnpm run -r layerGeneration:gen` command and if there are any
changes, prompts to commit them before proceeding with the release. This
is similar to how type tests and release notes are updated.

Follow up to #25670 and
#25835.


[AB#51927](https://dev.azure.com/fluidframework/235294da-091d-4c29-84fc-cdfc3d90890b/_workitems/edit/51927)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

base: main PRs targeted against main branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants