Skip to content

Change to createTestLogger #24880

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Jul 17, 2025
Merged

Conversation

MarioJGMsoft
Copy link
Contributor

@MarioJGMsoft MarioJGMsoft commented Jun 19, 2025

Description

There is a problem in our telemetry where not all of the test results are being reflected in out portal.
This PR consists in changing the getTestLogger function to the createTestLogger function which is a necessary part for the solution.

Also updates the pipelines to use PKG_SPECIFIER instead of PKG_PATH since it's better to have it consistent throughout our pipelines.

Reviewer Guidance

Please let me know if there is something else that I should be aware of.

Fixes: AB#42164

@github-actions github-actions bot added area: build Build related issues area: tests Tests to add, test infrastructure improvements, etc base: main PRs targeted against main branch labels Jun 19, 2025
@MarioJGMsoft MarioJGMsoft marked this pull request as ready for review June 19, 2025 22:43
@Copilot Copilot AI review requested due to automatic review settings June 19, 2025 22:43
Copy link
Contributor

@Copilot 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 updates how the test logger is injected and used in our telemetry setup and aligns pipeline variable naming.

  • Switches from getTestLogger to createTestLogger in Mocha setup hooks
  • Updates Mocha config to inject via FLUID_TEST_LOGGER_PKG_SPECIFIER rather than path
  • Renames pipeline variables from FLUID_TEST_LOGGER_PKG_PATH to FLUID_TEST_LOGGER_PKG_SPECIFIER

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tools/pipelines/test-service-clients.yml Replaced FLUID_TEST_LOGGER_PKG_PATH with PKG_SPECIFIER
tools/pipelines/test-real-service.yml Replaced FLUID_TEST_LOGGER_PKG_PATH with PKG_SPECIFIER
tools/pipelines/test-perf-benchmarks.yml Replaced FLUID_TEST_LOGGER_PKG_PATH with PKG_SPECIFIER
packages/test/mocha-test-setup/src/mochaHooks.ts Switched to async hooks and dynamic createTestLogger import
packages/test/mocha-test-setup/mocharc-common.cjs Added logic to inject specifier-based module before setup
Comments suppressed due to low confidence (1)

tools/pipelines/test-service-clients.yml:54

  • [nitpick] This environment variable declaration is repeated across multiple pipeline files; consider extracting it into a shared template or YAML anchor to reduce duplication.
        FLUID_TEST_LOGGER_PKG_SPECIFIER: '@ff-internal/aria-logger' # Contains createTestLogger impl to inject

@MarioJGMsoft MarioJGMsoft requested review from a team as code owners July 8, 2025 18:55
@github-actions github-actions bot added area: contributor experience area: dds Issues related to distributed data structures area: dds: propertydds area: dds: sharedstring area: dds: tree area: dev experience Improving the experience of devs building on top of fluid area: driver Driver related issues area: examples Changes that focus on our examples area: framework Framework is a tag for issues involving the developer framework. Eg Aqueduct area: loader Loader related issues area: odsp-driver area: runtime Runtime related issues labels Jul 8, 2025
@MarioJGMsoft MarioJGMsoft removed area: build Build related issues area: dev experience Improving the experience of devs building on top of fluid labels Jul 8, 2025
@github-actions github-actions bot added area: build Build related issues and removed area: loader Loader related issues area: server Server related issues (routerlicious) area: runtime Runtime related issues public api change Changes to a public API area: odsp-driver area: website changeset-present dependencies Pull requests that update a dependency file labels Jul 8, 2025
@MarioJGMsoft MarioJGMsoft removed request for a team July 8, 2025 18:59
Copy link
Contributor

github-actions bot commented Jul 8, 2025

🔗 No broken links found! ✅

Your attention to detail is admirable.

linkcheck output


> fluid-framework-docs-site@0.0.0 ci:check-links /home/runner/work/FluidFramework/FluidFramework/docs
> start-server-and-test "npm run serve -- --no-open" 3000 check-links

1: starting server using command "npm run serve -- --no-open"
and when url "[ 'http://127.0.0.1:3000' ]" is responding with HTTP status code 200
running tests using command "npm run check-links"


> fluid-framework-docs-site@0.0.0 serve
> docusaurus serve --no-open

[SUCCESS] Serving "build" directory at: http://localhost:3000/

> fluid-framework-docs-site@0.0.0 check-links
> linkcheck http://localhost:3000 --skip-file skipped-urls.txt

Crawling...

Stats:
  213391 links
    1455 destination URLs
    1686 URLs ignored
       0 warnings
       0 errors


Copy link
Contributor

@alexvy86 alexvy86 left a comment

Choose a reason for hiding this comment

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

Last few comments. I'm particularly interested in knowing what happens when you run the e2e tests locally providing an invalid package specifier (e.g. a package name that doesn't exist). It should throw the error you wrote (after applying the suggestion below).

Copy link
Contributor

@alexvy86 alexvy86 left a comment

Choose a reason for hiding this comment

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

LGTM! 🚀

@MarioJGMsoft MarioJGMsoft merged commit 53e79f3 into microsoft:main Jul 17, 2025
33 checks passed
@MarioJGMsoft MarioJGMsoft deleted the ariaLoggerTest branch July 17, 2025 22:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: build Build related issues area: tests Tests to add, test infrastructure improvements, etc base: main PRs targeted against main branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants