diff --git a/build-tools/packages/build-cli/src/codeCoverage/compareCodeCoverage.ts b/build-tools/packages/build-cli/src/codeCoverage/compareCodeCoverage.ts index 6d3af2a0fa75..89113bdd382f 100644 --- a/build-tools/packages/build-cli/src/codeCoverage/compareCodeCoverage.ts +++ b/build-tools/packages/build-cli/src/codeCoverage/compareCodeCoverage.ts @@ -34,7 +34,8 @@ const codeCoverageComparisonIgnoreList: string[] = [ ]; /** - * Type for the code coverage report generated by comparing the baseline and pr code coverage + * Type for the code coverage report generated by comparing the baseline and pr code coverage. We are noting both line and branch coverage + * here but as part of the code coverage comparison check, we are only using branch coverage. */ export interface CodeCoverageComparison { /** diff --git a/build-tools/packages/build-cli/src/commands/report/codeCoverage.ts b/build-tools/packages/build-cli/src/commands/report/codeCoverage.ts index 4722853c8ac6..5d744234716e 100644 --- a/build-tools/packages/build-cli/src/commands/report/codeCoverage.ts +++ b/build-tools/packages/build-cli/src/commands/report/codeCoverage.ts @@ -194,7 +194,7 @@ export default class ReportCodeCoverageCommand extends BaseCommand< const summaryFooterOnFailure = "### What to do if the code coverage check fails:\n" + - "- Ideally, add more tests to increase the code coverage for the package(s) whose code-coverage regressed.\n" + + "- Ideally, add more tests to increase the code coverage for the package(s) whose code-coverage regressed. Currently, we are only checking branch coverage for the code coverage check.\n" + "- If a regression is causing the build to fail and is due to removal of tests, removal of code with lots of tests or any other valid reason, there is a checkbox further up in this comment that determines if the code coverage check should fail the build or not. You can check the box and trigger the build again. The test coverage analysis will still be done, but it will not fail the build if a regression is detected.\n" + "- Unchecking the checkbox and triggering another build should go back to failing the build if a test-coverage regression is detected.\n\n" + "- You can check which lines are covered or not covered by your tests with these steps:\n" + diff --git a/packages/loader/container-loader/src/container.ts b/packages/loader/container-loader/src/container.ts index bb5fcb76e60a..35b747f10a20 100644 --- a/packages/loader/container-loader/src/container.ts +++ b/packages/loader/container-loader/src/container.ts @@ -1721,27 +1721,7 @@ export class Container if (pendingLocalState?.clientId !== undefined) { this.protocolHandler.audience.setCurrentClientId(pendingLocalState?.clientId); } - if (pendingLocalState?.clientId !== undefined) { - this.protocolHandler.audience.setCurrentClientId(pendingLocalState?.clientId); - } - if (pendingLocalState?.clientId !== undefined) { - this.protocolHandler.audience.setCurrentClientId(pendingLocalState?.clientId); - } - if (pendingLocalState?.clientId !== undefined) { - this.protocolHandler.audience.setCurrentClientId(pendingLocalState?.clientId); - } - if (pendingLocalState?.clientId !== undefined) { - this.protocolHandler.audience.setCurrentClientId(pendingLocalState?.clientId); - } - if (pendingLocalState?.clientId !== undefined) { - this.protocolHandler.audience.setCurrentClientId(pendingLocalState?.clientId); - } - if (pendingLocalState?.clientId !== undefined) { - this.protocolHandler.audience.setCurrentClientId(pendingLocalState?.clientId); - } - if (pendingLocalState?.clientId !== undefined) { - this.protocolHandler.audience.setCurrentClientId(pendingLocalState?.clientId); - } + timings.phase3 = performance.now(); const codeDetails = this.getCodeDetailsFromQuorum(); await this.instantiateRuntime( diff --git a/packages/loader/container-loader/src/utils.ts b/packages/loader/container-loader/src/utils.ts index 68ff4dc57970..761673b56e0d 100644 --- a/packages/loader/container-loader/src/utils.ts +++ b/packages/loader/container-loader/src/utils.ts @@ -424,28 +424,3 @@ export async function getDocumentAttributes( return attributes; } - -/** - * Just for testing the PR. - */ -export async function getDocumentAttributes1( - storage: Pick, - tree: ISnapshotTree | undefined, -): Promise { - if (tree === undefined) { - return { - minimumSequenceNumber: 0, - sequenceNumber: 0, - }; - } - - // Backward compatibility: old docs would have ".attributes" instead of "attributes" - const attributesHash = - ".protocol" in tree.trees - ? tree.trees[".protocol"].blobs.attributes - : tree.blobs[".attributes"]; - - const attributes = await readAndParse(storage, attributesHash); - - return attributes; -}