Граф коммитов

1696 Коммитов

Автор SHA1 Сообщение Дата
dependabot[bot] e2a1aa0229
build(deps): bump cross-spawn in /tools/telemetry-generator (#23160)
Bumps and [cross-spawn](https://github.com/moxystudio/node-cross-spawn).
These dependencies needed to be updated together.
Updates `cross-spawn` from 6.0.5 to 7.0.6
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/moxystudio/node-cross-spawn/blob/master/CHANGELOG.md">cross-spawn's
changelog</a>.</em></p>
<blockquote>
<h3><a
href="https://github.com/moxystudio/node-cross-spawn/compare/v7.0.5...v7.0.6">7.0.6</a>
(2024-11-18)</h3>
<h3>Bug Fixes</h3>
<ul>
<li>update cross-spawn version to 7.0.5 in package-lock.json (<a
href="f700743918">f700743</a>)</li>
</ul>
<h3><a
href="https://github.com/moxystudio/node-cross-spawn/compare/v7.0.4...v7.0.5">7.0.5</a>
(2024-11-07)</h3>
<h3>Bug Fixes</h3>
<ul>
<li>fix escaping bug introduced by backtracking (<a
href="640d391fde">640d391</a>)</li>
</ul>
<h3><a
href="https://github.com/moxystudio/node-cross-spawn/compare/v7.0.3...v7.0.4">7.0.4</a>
(2024-11-07)</h3>
<h3>Bug Fixes</h3>
<ul>
<li>disable regexp backtracking (<a
href="https://redirect.github.com/moxystudio/node-cross-spawn/issues/160">#160</a>)
(<a
href="5ff3a07d9a">5ff3a07</a>)</li>
</ul>
<h3><a
href="https://github.com/moxystudio/node-cross-spawn/compare/v7.0.2...v7.0.3">7.0.3</a>
(2020-05-25)</h3>
<h3>Bug Fixes</h3>
<ul>
<li>detect path key based on correct environment (<a
href="https://redirect.github.com/moxystudio/node-cross-spawn/issues/133">#133</a>)
(<a
href="159e7e9785">159e7e9</a>)</li>
</ul>
<h3><a
href="https://github.com/moxystudio/node-cross-spawn/compare/v7.0.1...v7.0.2">7.0.2</a>
(2020-04-04)</h3>
<h3>Bug Fixes</h3>
<ul>
<li>fix worker threads in Node &gt;=11.10.0 (<a
href="https://redirect.github.com/moxystudio/node-cross-spawn/issues/132">#132</a>)
(<a
href="6c5b4f0158">6c5b4f0</a>)</li>
</ul>
<h3><a
href="https://github.com/moxystudio/node-cross-spawn/compare/v7.0.0...v7.0.1">7.0.1</a>
(2019-10-07)</h3>
<h3>Bug Fixes</h3>
<ul>
<li><strong>core:</strong> support worker threads (<a
href="https://redirect.github.com/moxystudio/node-cross-spawn/issues/127">#127</a>)
(<a
href="https://github.com/moxystudio/node-cross-spawn/commit/cfd49c9">cfd49c9</a>)</li>
</ul>
<h2><a
href="https://github.com/moxystudio/node-cross-spawn/compare/v6.0.5...v7.0.0">7.0.0</a>
(2019-09-03)</h2>
<h3>⚠ BREAKING CHANGES</h3>
<ul>
<li>
<p>drop support for Node.js &lt; 8</p>
</li>
<li>
<p>drop support for versions below Node.js 8 (<a
href="https://redirect.github.com/moxystudio/node-cross-spawn/issues/125">#125</a>)
(<a
href="https://github.com/moxystudio/node-cross-spawn/commit/16feb53">16feb53</a>)</p>
</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="77cd97f3ca"><code>77cd97f</code></a>
chore(release): 7.0.6</li>
<li><a
href="6717de49ff"><code>6717de4</code></a>
chore: upgrade standard-version</li>
<li><a
href="f700743918"><code>f700743</code></a>
fix: update cross-spawn version to 7.0.5 in package-lock.json</li>
<li><a
href="9a7e3b2165"><code>9a7e3b2</code></a>
chore: fix build status badge</li>
<li><a
href="085268352d"><code>0852683</code></a>
chore(release): 7.0.5</li>
<li><a
href="640d391fde"><code>640d391</code></a>
fix: fix escaping bug introduced by backtracking</li>
<li><a
href="bff0c87c8b"><code>bff0c87</code></a>
chore: remove codecov</li>
<li><a
href="a7c6abc6fe"><code>a7c6abc</code></a>
chore: replace travis with github workflows</li>
<li><a
href="9b9246e096"><code>9b9246e</code></a>
chore(release): 7.0.4</li>
<li><a
href="5ff3a07d9a"><code>5ff3a07</code></a>
fix: disable regexp backtracking (<a
href="https://redirect.github.com/moxystudio/node-cross-spawn/issues/160">#160</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/moxystudio/node-cross-spawn/compare/v6.0.5...v7.0.6">compare
view</a></li>
</ul>
</details>
<br />

Updates `cross-spawn` from 7.0.3 to 7.0.6
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/moxystudio/node-cross-spawn/blob/master/CHANGELOG.md">cross-spawn's
changelog</a>.</em></p>
<blockquote>
<h3><a
href="https://github.com/moxystudio/node-cross-spawn/compare/v7.0.5...v7.0.6">7.0.6</a>
(2024-11-18)</h3>
<h3>Bug Fixes</h3>
<ul>
<li>update cross-spawn version to 7.0.5 in package-lock.json (<a
href="f700743918">f700743</a>)</li>
</ul>
<h3><a
href="https://github.com/moxystudio/node-cross-spawn/compare/v7.0.4...v7.0.5">7.0.5</a>
(2024-11-07)</h3>
<h3>Bug Fixes</h3>
<ul>
<li>fix escaping bug introduced by backtracking (<a
href="640d391fde">640d391</a>)</li>
</ul>
<h3><a
href="https://github.com/moxystudio/node-cross-spawn/compare/v7.0.3...v7.0.4">7.0.4</a>
(2024-11-07)</h3>
<h3>Bug Fixes</h3>
<ul>
<li>disable regexp backtracking (<a
href="https://redirect.github.com/moxystudio/node-cross-spawn/issues/160">#160</a>)
(<a
href="5ff3a07d9a">5ff3a07</a>)</li>
</ul>
<h3><a
href="https://github.com/moxystudio/node-cross-spawn/compare/v7.0.2...v7.0.3">7.0.3</a>
(2020-05-25)</h3>
<h3>Bug Fixes</h3>
<ul>
<li>detect path key based on correct environment (<a
href="https://redirect.github.com/moxystudio/node-cross-spawn/issues/133">#133</a>)
(<a
href="159e7e9785">159e7e9</a>)</li>
</ul>
<h3><a
href="https://github.com/moxystudio/node-cross-spawn/compare/v7.0.1...v7.0.2">7.0.2</a>
(2020-04-04)</h3>
<h3>Bug Fixes</h3>
<ul>
<li>fix worker threads in Node &gt;=11.10.0 (<a
href="https://redirect.github.com/moxystudio/node-cross-spawn/issues/132">#132</a>)
(<a
href="6c5b4f0158">6c5b4f0</a>)</li>
</ul>
<h3><a
href="https://github.com/moxystudio/node-cross-spawn/compare/v7.0.0...v7.0.1">7.0.1</a>
(2019-10-07)</h3>
<h3>Bug Fixes</h3>
<ul>
<li><strong>core:</strong> support worker threads (<a
href="https://redirect.github.com/moxystudio/node-cross-spawn/issues/127">#127</a>)
(<a
href="https://github.com/moxystudio/node-cross-spawn/commit/cfd49c9">cfd49c9</a>)</li>
</ul>
<h2><a
href="https://github.com/moxystudio/node-cross-spawn/compare/v6.0.5...v7.0.0">7.0.0</a>
(2019-09-03)</h2>
<h3>⚠ BREAKING CHANGES</h3>
<ul>
<li>
<p>drop support for Node.js &lt; 8</p>
</li>
<li>
<p>drop support for versions below Node.js 8 (<a
href="https://redirect.github.com/moxystudio/node-cross-spawn/issues/125">#125</a>)
(<a
href="https://github.com/moxystudio/node-cross-spawn/commit/16feb53">16feb53</a>)</p>
</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="77cd97f3ca"><code>77cd97f</code></a>
chore(release): 7.0.6</li>
<li><a
href="6717de49ff"><code>6717de4</code></a>
chore: upgrade standard-version</li>
<li><a
href="f700743918"><code>f700743</code></a>
fix: update cross-spawn version to 7.0.5 in package-lock.json</li>
<li><a
href="9a7e3b2165"><code>9a7e3b2</code></a>
chore: fix build status badge</li>
<li><a
href="085268352d"><code>0852683</code></a>
chore(release): 7.0.5</li>
<li><a
href="640d391fde"><code>640d391</code></a>
fix: fix escaping bug introduced by backtracking</li>
<li><a
href="bff0c87c8b"><code>bff0c87</code></a>
chore: remove codecov</li>
<li><a
href="a7c6abc6fe"><code>a7c6abc</code></a>
chore: replace travis with github workflows</li>
<li><a
href="9b9246e096"><code>9b9246e</code></a>
chore(release): 7.0.4</li>
<li><a
href="5ff3a07d9a"><code>5ff3a07</code></a>
fix: disable regexp backtracking (<a
href="https://redirect.github.com/moxystudio/node-cross-spawn/issues/160">#160</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/moxystudio/node-cross-spawn/compare/v6.0.5...v7.0.6">compare
view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/microsoft/FluidFramework/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-20 12:59:44 -08:00
Michael Zhen cef6ce1d36
(docs): build-docs pipeline without upload artifact (#23150)
previous build-docs pipeline for temporary deployment of static doc
changes.
excludes steps to upload-json artifacts
2024-11-19 15:08:37 -08:00
Craig Macomber (Microsoft) adc25b0961
[bump] client: 2.10.0 => 2.11.0 (minor) (#23134)
## Description

Bumped client from 2.10.0 to 2.11.0.
2024-11-18 19:23:30 -08:00
Craig Macomber (Microsoft) 3cd1f01a14
Generate changelogs (#23132)
## Description

Generate change logs with `pnpm exec flub generate changelog -g client`
2024-11-19 00:16:38 +00:00
Michael Zhen e8d8c654e1
(docs): update build-docs to deploy v2 artifacts (#22934)
Update to deployment and docs generation: adjustments to deploy v2
artifact instead of main artifacts. Note: while the update aims to
deploy artifacts from the latest release branches instead of main, the
actual website build is still done on the main branch. This will prevent
the pipeline from deploying docs which were generated with an outdated
version of the website.
Notable changes:

deploy-docs:
- shifted most of the stages from build-docs to deploy-docs
- build-docs now runs check_branch_version -> upload-json -> trigger
deploy

build-docs:
- shifted check_branch_version to the top since its output is required
to properly in the upload json step

upload-json-step:
- added a new upload step which uploads artifacts with the name
"latest-v*.tar.gz"
- takes in new parameters from check_branch_version to ensure it only
uploads with this name when the pipeline is running on the latest
release branch

latestVersions:
- since upload-json-step requires majorVersion, I figured it was best to
include it as an output variable for the function as it seems more
robust compared to relying on a string parsing script in the pipeline
itself

download-apis:
- update such that it only downloads "latest-v*.tar.gz" instead of the
main branch artifacts
2024-11-18 15:30:43 -08:00
Joshua Smithrud ac5883c8b7
ci(docs): Fix build location (#23114)
Pipeline still had a couple lingering references to the "public"
directory, but the new Docusaurus site outputs to "build".
2024-11-15 22:22:27 +00:00
Joshua Smithrud 65d9ac3dc3
feat(docs): Replace Hugo with Docusaurus (#22990)
# Docusaurus

Updates the website (/docs) to leverage
[Docusaurus](https://docusaurus.io/) in place of Hugo as its static site
generator.

## Functional changes

### Versioning

The existing Hugo-based site only has a partial versioning story.
The API docs are versioned, but the rest of the content isn't.
This creates a messy story where our hand-written docs likely only
discuss topics related to the current version, and we have no place to
put docs discussing earlier versions.
Or, even worse, we have a mixed bag of documentation for different
versions, creating a very unclear user story.

This prototype includes an end-to-end versioning story, [automated by
Docusaurus](https://docusaurus.io/docs/versioning).
Current (v2) docs live under `docs`.
Old (v1) docs live under `versioned_docs/version-1`.

Most of the documentation has been duplicated between the two versions,
but some minor changes have been made to make the docs better line up
with the corresponding version of the API.
These changes should be reviewed before being merged into main /
deploying the new website.

### Search

This branch includes an offline implementation of search.
An offline solution comes with some downsides (slower build, larger
bundle), and probably isn't what we want long term.
That said, it is much better than what our current website has (no
search whatsoever).

We should come back to this after v1 of our new website.

---------

Co-authored-by: Wayne Ferrao <wayneferrao@microsoft.com>
2024-11-15 21:04:34 +00:00
Alex Villarreal e539e00ca5
refactor: Make all pipelines use new agent pools in eastus2 (#23072)
## Description

We're moving our agent pools to the eastus2 region as part of a capacity
management initiative. This PR updates all pipelines to use the new
pools.
2024-11-15 10:16:13 -06:00
Joshua Smithrud d0c5af1b86
build(api-markdown-documenter): Bump package version for publishing (#23098)
Bumped for #23083
2024-11-14 23:15:59 +00:00
Joshua Smithrud a31ed832e0
fix(api-markdown-documenter): Escape heading ID text in Markdown (#23083)
For various call signature API items, we frequently IDs like
`_call_-call`. There are a number of reasons for this, but mostly it
boils down to trying to avoid creating artificial name conflicts while
also ensuring generated files don't contain invalid characters. When we
generate heading IDs from these, we previously weren't escaping the
contents, which was invalid. Hugo previously handled this in most cases,
but Docusaurus (the tooling we're working to adopt in place of Hugo for
generating our website) does not.

This PR updates heading rendering to ensure ID contents are escaped for
Markdown.


[AB#23444](https://dev.azure.com/fluidframework/235294da-091d-4c29-84fc-cdfc3d90890b/_workitems/edit/23444)
2024-11-14 22:52:08 +00:00
Alex Villarreal b70e394731
fix(ci): Fix pattern so the Performance Benchmarks pipeline doesn't choke on packages with overlapping names (#23005)
## Description

Fixes a "glob" pattern (ADO-specific syntax) so the Performance
Benchmarks pipeline can differentiate the `tgz` files for packages that
have partially overlapping names (e.g. `@fluid-experimental/tree` and
`@fluid-experimental/tree-react-api`).

Follow-up to https://github.com/microsoft/FluidFramework/pull/22995.
2024-11-07 00:12:12 +00:00
Michael Zhen 85d0e82baa
(ci): update pattern matching for perf benchmark install (#23009)
previous fix was matching undesired paths, updating to more specific
pattern: <package>-[0-9]*.[0-9]*.[0-9]*.tgz
2024-11-06 10:41:19 -08:00
Michael Zhen a909e19cbd
(ci): update pattern matching in perch benchmark install (#22995)
Current pattern ?.?.? doesn't support multi digit versions. Bump to
client 2.10.0 has caused the "Install package with perf tests" step to
be failing in the pipeline.
2024-11-05 16:48:28 -08:00
Jatin Garg 11971262b8
Bump client minor 2.10.0 (#22978)
## Description

Bump client minor 2.10.0

---------

Co-authored-by: Jatin Garg <jatingarg@Jatins-MacBook-Pro-2.local>
2024-11-05 02:35:05 +00:00
Jatin Garg 54f2a18248
build(client): changelog generation for minor release 2.5.0 (#22976)
## Description

build(client): changelog generation for minor release 2.5.0

Co-authored-by: Jatin Garg <jatingarg@Jatins-MacBook-Pro-2.local>
2024-11-05 01:39:52 +00:00
Michael Zhen ebfbfaa126
(docs): add compile time braces around parameter (#22963)
fix parameter use in condition. swapping parameter to intermediate
variable.
2024-11-01 13:22:32 -07:00
Michael Zhen e432720309
(docs): update force deployment condition for build docs (#22954)
previous shouldDeploy condition have not been included in deployment
condition. This variable has been updated to "forceDeployment" and
included back in the deployment condition.

shouldDeploy has been updated to check if release builds are the latest
version in its major version series.
2024-10-31 16:44:25 -07:00
Abram Sanderson 64d89bd2db
Improve DDS stress pipeline stage rendering (#22952)
## Description

Adjusts the `condition` parameter of
`include-conditionally-run-stress-test` to apply to the entire stage
rather than the test-running job. This improves the clarity from the
pipeline overview page, see most recent run vs previous ones:


![image](https://github.com/user-attachments/assets/e344d02a-a617-4163-bbda-0bfaac276541)

This also fixes the `stressMode` parameter not being given options at
queue time, which was introduced in #21702 and prevented the pipeline
from being queued.

---------

Co-authored-by: Abram Sanderson <absander@microsoft.com>
2024-10-31 12:28:53 -07:00
jzaffiro 30003a864a
Fix JSON format for service clients pipeline (#22935)
Add quotes to the new display name field in the FLUID_LOGGER_PROPS env
variable. Related to #22901, where the lack of quotes led to malformed
JSON.
2024-10-30 16:59:10 +00:00
Tyler Butler 9e1895bfe1
build(build-tools): Use fluid-build to build (#22925)
Updates the configuration for build-tools packages to use fluid-build to
build.

The changes were modest since it was already using fluid-build for most
of the build. Only the root-level tasks needed to be hooked up, and the
individual package scripts needed to be updated.

[AB#17062](https://dev.azure.com/fluidframework/235294da-091d-4c29-84fc-cdfc3d90890b/_workitems/edit/17062)
2024-10-30 16:05:59 +00:00
jzaffiro 362f1ada4a
Add intuitive pipeline names in telemetry events for stress/e2e test runs (#22901)
Instead of only using the package name to distinguish between stress
test runs and end to end test runs, add a more distinct identifier to
the `details` field in Kusto.

<img width="733" alt="image"
src="https://github.com/user-attachments/assets/9b465f4e-a7f5-46ce-8ba3-4b990b9c4607">


[AB#11817](https://dev.azure.com/fluidframework/235294da-091d-4c29-84fc-cdfc3d90890b/_workitems/edit/11817)

---------

Co-authored-by: Alex Villarreal <716334+alexvy86@users.noreply.github.com>
2024-10-28 22:03:22 +00:00
Alex Villarreal b30731fbad
refactor: Cleanup references to markdown-magic-template in lockfiles (#22906)
## Description

Cleanup references to markdown-magic-template from lockfiles.

These projects have a `file:` reference to `@fluid-tools/markdown-magic`
in their package json. The only way I could find to clean up the
lockfile entries corresponding to the dependency tree for the dependency
that we removed in `@fluid-tools/markdown-magic` was to manually delete
that line from the lockfile in these packages and run `pnpm i
--no-frozen-lockfile` after.
2024-10-25 18:24:26 -05:00
Alex Villarreal 8b77d3987e
refactor: Remove unnecessary dep in `@fluid-tools/markdown-magic` (#22900)
## Description

`markdown-magic-template` is not used at all as far as I can tell, and
it brings in a transitive dependency on `lodash.template: 4.5.0` which
is flagged with a CVE that can't be addressed easily because `lodash`
seems to have stopped publishing each of their functions as a separate
package after 4.5.0.
2024-10-25 17:13:08 -05:00
Jatin Garg 5806a27f6e
Modify codecoverageAnalysis name to include job attempt number (#22870)
## Description

Modify codecoverageAnalysis name to include job attempt number. This is
because the reupload attempts fails, if the folder already exists.

Co-authored-by: Jatin Garg <jatingarg@Jatins-MacBook-Pro-2.local>
2024-10-22 19:28:30 +00:00
Alex Villarreal 5c17a9c053
refactor: Update `get-func-name` dependency to address CVE (#22861)
## Description

Updates the `get-func-name` transitive dependency to address
[CVE-2023-43646](https://nvd.nist.gov/vuln/detail/CVE-2023-43646). It
came through `chai@4.3.7`; updating to `chai@4.5.0` was enough to get a
fixed version of `get-func-name`. Also did a few updates of transitive
dependency `loupe` from 2.3.6 to 2.3.7 (even though `chai` doesn't
strictly needed it), where they guarantee that their dependency ranges
now point to fixed versions of their dependencies.
2024-10-22 11:52:42 -05:00
Alex Villarreal bd1807ffe0
refactor(ci): Fix for ADO logging commands and fix for robustness (#22858)
## Description

- It's
[documented](https://learn.microsoft.com/en-us/azure/devops/pipelines/troubleshooting/troubleshooting?view=azure-devops#variables-having--single-quote-appended)
that ADO logging commands (`echo ##vso[<something>]`) don't interact
well with `set -x`, so undoing that part of
https://github.com/microsoft/FluidFramework/pull/22659 because we use
them in several places. I could have wrapped each use in `set +x;
<command>; set -x` but I think that would warrant a comment every time.
We have lived forever without having each command in a script printed
back to us, so I think it's fine to keep that behavior.
- Adds steps to install the correct node version in the job to upload
dev manifests. It wasn't using it, and since the build agent image made
node 18 available by default (by coincidence?) when installing the
several versions that we install in our image, everything worked. But in
the latest version of the image, re-generated automatically, node 16
seems to be the default (unsure why, separate topic I'm looking into),
and that uncovered this missing step.

The second bullet point is highlighted with a comment below. Everything
else in the PR is about the first one.
2024-10-21 15:35:22 -05:00
Scarlett Lee e0679665ca
Disable code coverage for internal pipeline runs (#22855)
Disabling code coverage in internal pipelines to save time since we
don't use this data currently. (We can re-enable this if we end up
needing it later.) I made this change per Alex's suggestion here:
https://github.com/microsoft/FluidFramework/pull/22762/files#r1804966589.

These are the times for the Build stage in my test runs (9m 12s saved on
average):
1. With code coverage: 53m 41s, 58m 3s, 52m 8s, 50m 37s
2. Without code coverage: 46m 35s, 43m 42s, 44m 6s, 43m 16s

See runs for test/nocc branch (ignoring first one since CodeQL Finalize
step takes super long the first time in a branch).
2024-10-21 13:32:42 -07:00
Alex Villarreal 8915f8fb89
refactor(ci): Add `set -eux -o pipefail` to all bash@3 tasks (#22659)
## Description

While we should avoid inline scripts in `Bash@3` tasks in YML pipelines
as much as possible, wherever we have them, we should make them robust.
Adding `set -eux -o pipefail` to prevent common issues (like a
multi-command script failing in the middle but not causing the task to
fail because some other command after it succeeded) seems like a net
good.

Github copilot was pretty helpful to understand exactly what the line
does:

> - set -e: Exit immediately if a command exits with a non-zero status.
> - set -u: Treat unset variables as an error and exit immediately.
> - set -x: Print commands and their arguments as they are executed.
> - -o pipefail: The return value of a pipeline is the status of the
last command to exit with a non-zero status, or zero if no command
exited with a non-zero status.
>
> These options are often used in scripts to make them more robust and
easier to debug.

Motivated by [this pipeline
run](https://dev.azure.com/fluidframework/internal/_build/results?buildId=296239&view=logs&j=39ff69ce-e37a-5454-6dd7-938cc0c22dc6&t=b4f667a1-f59a-5f88-c7c4-0c8c8ea4419c)
(msft internal) where the reported error occurred way after the first
things started to fail but their tasks didn't.
2024-10-21 11:39:18 -05:00
Jatin Garg 3ed9d075bb
Add code coverage reporting to client build yaml file (#22762)
## Description


[AB#15187](https://dev.azure.com/fluidframework/235294da-091d-4c29-84fc-cdfc3d90890b/_workitems/edit/15187)

Add code coverage reporting to client build yaml file.

---------

Co-authored-by: Jatin Garg <jatingarg@Jatins-MacBook-Pro-2.local>
Co-authored-by: Alex Villarreal <716334+alexvy86@users.noreply.github.com>
Co-authored-by: Tyler Butler <tyler@tylerbutler.com>
2024-10-17 14:26:57 -07:00
Alex Villarreal ae197872de
refactor: Disable CodeQL in test pipelines (#22802)
## Description

Disables the auto-injection of CodeQL tasks in our test pipelines. The
CodeQL tasks always "fail" (the ADO step still succeeds but the task
can't find source code so it can't run CodeQL and logs warnings) in the
test pipelines for which we don't checkout the repo, which is the case
for our test pipelines.
[Example](https://dev.azure.com/fluidframework/internal/_build/results?buildId=300062&view=logs&j=26483432-40f5-552c-5792-70aed8cde738&t=fb288d9b-a668-57e8-da86-3cec1930f710&l=55)
(msft internal). The task itself says that it should only run for build
pipelines (where source code exists).
2024-10-15 09:21:50 -05:00
Tyler Butler b053eb67bd
build(client): Generate changelogs for 2.4 release (#22798) 2024-10-14 19:38:11 -07:00
Tyler Butler 3d5cbdc22c
[bump] client: 2.4.0 => 2.5.0 (minor) (#22799)
Bumped client from 2.4.0 to 2.5.0.

Some new packages in the client had `workspace:^` deps that were
corrected to use tilde, so the lockfile had to be updated.

Command used:

```shell
flub release -g client -v
```
2024-10-14 15:57:23 -07:00
Craig Macomber (Microsoft) 3b083cc333
Tidy up some oddities for package configuration in "client" (#22713)
## Description

While looking at our pnpm version, I found two packages inside of client
other than the root specifying the pnpm version. This seems unnecessary.
This removes them, as well as the apparently unneeded workspace and
pnpm-lock from tools/markdown-magic.
2024-10-11 12:46:20 -07:00
Tong Chen 73bdeee619
fix(@fluid-tools/benchmark): Make telemetry generator handler to log error (#22689)
## Description

### Changes Made

Validation Improvement: Updated the validation logic to use
Number.isNaN(Number.parseFloat(value)) instead of isNaN. This ensures
that any non-number data is correctly identified and handled.

### Error Handling
For app insights handlers, retained the try-catch mechanism to continue
processing subsequent metrics even if an error occurs.

_For non-app-insight handlers, implemented a strategy to throw an error
and terminate the process when non-number data is encountered. This
provides a clear indication of unexpected data and prevents the
submission of potentially invalid values._

### Unit Tests

Added unit tests to cover scenarios involving non-number data in
customData. These tests ensure that the new validation logic works as
expected and helps prevent future regressions.

## Test result
~~~
@chentong7 ➜ /workspaces/FluidFramework/tools/telemetry-generator
(telemetry) $ npm run test

> @fluid-tools/telemetry-generator@1.0.0 test
> mocha --recursive "dist/test/**/*.test.*js" --exit

Writing test results relative to package to nyc/junit-report.xml and
nyc/junit-report.json


  appInsightsCustomBenchmarkHandler
    ✔ should emit metrics to Azure App Insights

  appInsightsExecutionTimeTestHandler
    ✔ should emit valid metrics to Azure App Insights
    ✔ should skip logging for invalid metrics

  appInsightsMemoryUsageTestHandler
✔ should emit heap used avg and std dev metrics to Azure App Insights
    ✔ should skip metrics if values are not numbers

  executionTimeTestHandler
    ✔ should emit execution time avg and std dev metrics to logger

  memoryUsageTestHandler
    ✔ should emit heap used avg and std dev metrics to logger
    ✔ should throw an error for invalid heap used avg metric
    ✔ should throw an error for invalid heap used std dev metric


  9 passing (12ms)
~~~

---------

Co-authored-by: Alex Villarreal <716334+alexvy86@users.noreply.github.com>
2024-10-10 11:24:06 -07:00
Joshua Smithrud 6c06bbd686
fix(api-markdown-documenter): Fix issue that caused packages skipped via `skipPackage` option to still be listed on root "model" page (#22772)
See updated test collateral for an example
2024-10-09 22:59:47 +00:00
clarenceli-msft aa24ad4f66
Fix the error due to previous bad pull/rebase (#22771)
Due to some bad pull/rebase, the PR
https://github.com/microsoft/FluidFramework/pull/21702 introduced
content that shouldn't exist in the main branch (based on the commit
c126bba051 (diff-5839274c7eb7f262c570edf94a75999ccf76913c6d7b9ec3d53152537a00b0cb)).
This PR is to address this issue.

## Reviewer Guidance

The review process is outlined on [this wiki
page](https://github.com/microsoft/FluidFramework/wiki/PR-Guidelines#guidelines).

> List any specific things you want to get reviewer opinions on, and
anything a reviewer would need to know to review this PR effectively.
> Things you might want to include:
>
> - Questions about how to properly make automated tests for your
changes.
> -   Questions about design choices you made.
> - Descriptions of how to manually test the changes (and how much of
that you have done).
> -   etc.
>
> If you have any questions in this section, consider making the PR a
draft until all questions have been resolved.
2024-10-09 18:07:21 -04:00
Alex Villarreal 4228a21d96
fix: Update transitive dependencies on `braces` to address CVE (#22768)
## Description

Updates transitive dependencies on `braces` from 3.0.2 to 3.0.3 to
address [CVE-2024-4068](https://nvd.nist.gov/vuln/detail/CVE-2024-4068).

A couple of applications of `flub modify lockfile --dependency braces
--version 3.0.3 --releaseGroup <release group>`, and some manual updates
in packages/release groups that we can't target with `flub`, basically
doing the same thing but manually (add an override in package.json,
install dependencies, remove override, install dependencies again to
clean up override from the lockfile).

In a few cases I got unrelated updates, mostly about node types, which I
reverted manually.

Server packages also got semver update from 7.6.0 to 7.6.3 which seems
fine.
2024-10-09 14:16:38 -05:00
Craig Macomber (Microsoft) a8d7871f48
Delete markdown-magic pipeline (#22714)
## Description

Delete markdown-magic pipeline.
2024-10-08 10:56:10 -07:00
clarenceli-msft fe46e41055
Improve DDS stress testing: introduce enum stress mode (#21702)
[AB#2729](https://dev.azure.com/fluidframework/internal/_workitems/edit/2729),
[AB#2730](https://dev.azure.com/fluidframework/internal/_workitems/edit/2730)

This PR is a prototype for improving the Test - DDS Stress line by using
a numeric stressLevel instead of a boolean isStress. This change allows
for more granular control over whether to use stress runs and to what
degree.

The follow-up tasks include:

1. Integrating this functionality (potentially as a stage) into the CI
build pipeline with a light stress level mode, so it can be triggered in
the PR gateway.

2. Creating a long-running pipeline to execute the DDS stress tests with
a heavy stress level mode, scheduled to run periodically during off-peak
hours, similar to the test stability pipeline.


[Guidelines for Pull
Requests](https://github.com/microsoft/FluidFramework/wiki/PR-Guidelines#guidelines).


## Reviewer Guidance

The review process is outlined on [this wiki
page](https://github.com/microsoft/FluidFramework/wiki/PR-Guidelines#guidelines).

> List any specific things you want to get reviewer opinions on, and
anything a reviewer would need to know to review this PR effectively.
> Things you might want to include:
>
> - Questions about how to properly make automated tests for your
changes.
> -   Questions about design choices you made.
> - Descriptions of how to manually test the changes (and how much of
that you have done).
> -   etc.
>
> If you have any questions in this section, consider making the PR a
draft until all questions have been resolved.

---------

Co-authored-by: Abram Sanderson <Abram.sanderson@gmail.com>
2024-10-07 19:28:23 -04:00
Tony Murphy e180043832
Remove mocha-json-output-reporter (#22735)
The mocha-json-output-reporter is failing which I was able to determine
via trial and error by adjusting the reporters, it also appears to be
essentially unsupported. It seems we only use it for inline logs in our
ci build output, which shouldn't be necessary as we have the test
results separately in the test tab. I think the best solution is to just
remove this.
2024-10-07 18:46:47 +00:00
Michael Zhen a9c881f785
(docs): docs deployment for release branches (#22399)
Note: requires changes from following PR
https://github.com/microsoft/FluidFramework/pull/22252

Updated build-docs to trigger on release branches. 
Now includes a stage before deployment to check if triggering branch
version matches a latest minor version of a major release.
2024-10-03 01:30:15 -07:00
Joshua Smithrud 20b6410315
improvement(api-markdown-documenter): Updates `TSDoc` node handling to emit a warning in place of an error when an embedded `HTML` tag is encountered (#22688)
We handle such input gracefully, so it really isn't an error. A warning
is still appropriate, however, to ensure the caller is aware of the
situation.

Also updates the logged notice to include the tag that was encountered.
2024-09-30 15:38:17 -07:00
Joshua Smithrud 0ee3a2405b
refactor(api-markdown-documenter): Update HTML rendering functionality to leverage HAST domain and existing HAST rendering libraries (#22664)
Removes A LOT of bespoke HTML rendering logic, replacing it with
[hast-util-to-html](https://www.npmjs.com/package/hast-util-to-html) and
[hast-util-format](https://www.npmjs.com/package/hast-util-format) to do
the rendering on our behalf.

Note that there are A LOT of test asset diffs here. The rendering
libraries mentioned above make different styling choices than we made in
our bespoke rendering. In most cases these changes are trivial, or
arguably readability improvements. Regardless, this PR makes the
formatting no longer a direct responsibility of this library, which is a
win IMO.
2024-09-30 14:20:21 -07:00
Joshua Smithrud dc893fea84
test(api-markdown-documenter): Add multi-line fenced code block tests (#22679)
Adds some missing test coverage around fenced code blocks. All of our
existing test cases were single-line.
2024-09-30 13:50:35 -07:00
Joshua Smithrud cf7e83eb5b
fix: Correct text formatting handling in `toHtml` transformation (#22672)
The Documentation domain supports hierarchical text formatting
overrides. This includes setting formatting at a position in the tree,
and disabling it at a lower level in the tree.

HTML does not support this kind of hierarchical format disabling. The
way we were transforming Documentation domain input to HTML ignored
this, and was fundamentally broken. This change fixes the issue by
tracking text formatting context while transforming the tree, and
injecting formatting tags only at the lowest levels.

See updated tests for examples of the changes.
2024-09-30 17:40:48 +00:00
Joshua Smithrud 533e7ddada
improvement(api-markdown-documenter): Remove embedded html support (#22671)
Support for embedded HTML contents in TSDoc comments has been removed.

The TSDoc parser has some half-baked support for preserving HTML tags in
its output, despite the TSDoc spec making no claims about supporting
embedded HTML. But it does so in a structure that is difficult to handle
correctly, assuming that the output language can support arbitrary HTML
contents, and that it is safe to output the contents raw and
unsanitized.

As a result, this library's support for such contents was similarly
half-baked, and difficult to maintain.

VSCode Intellisense, as a comparison, chooses to completely ignore HTML
tags, and simply render the inner contents ignoring any HTML decorators.

This library has adopted the same policy.

### Breaking Change

If you depended on HTML content preservation, this change will affect
your output.
2024-09-30 17:26:15 +00:00
Alex Villarreal 107be83177
refactor(ci): Minor yml cleanup (#22660)
## Description

- Remove a `workingDir` node at the incorrect indentation level. The
script itself checks if that directory exists before `cd`ing into it if
applicable, so having it run in it from the start doesn't seem necessary
(and might even fail if it doesn't exist?)
- Replace a few `tag` strings with the more explicit `Tag image` in
`Docker@1` tasks, as listed [in the
docs](https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/reference/docker-v1?view=azure-pipelines).
`tag` works as an alias, but the explicit version helps so VSCode
doesn't report problems/unexpected values in yml files.
2024-09-27 12:57:53 -07:00
Alex Villarreal 954f465209
fix(ci): Fix indentation of condition so it applies correctly (#22658)
## Description

The `condition` was under the `inputs` node, where it doesn't do its
job.
2024-09-27 12:48:56 -07:00
Joshua Smithrud 4b6957e3fa
feat(api-markdown-documenter): Improve HTML transform API and promote to public (#22652)
Allow users to invoke `toHtml` functions with either a partial config or
a full transform context. Also promotes `toHtml` APIs to `@public` so we
can use them in the website build.

Allows updating custom table renderer in `fluidframework.com`'s API docs
build to leverage the transformation and
[hast-util-to-html](https://www.npmjs.com/package/hast-util-to-html) to
simplify the logic as follows:


![image](https://github.com/user-attachments/assets/bfcfb23e-950c-42a8-bbe9-9b3c85bdd428)


[AB#8866](https://dev.azure.com/fluidframework/235294da-091d-4c29-84fc-cdfc3d90890b/_workitems/edit/8866)

The above bug seems to stem from our "pretty format" HTML rendering. A
cursory investigation didn't yield useful context on exactly what was
going wrong in that code. But the idea has been for quite a while to
eventually remove that code and replace it with the HAST-based `toHtml`
transformation logic anyways. I have confirmed that switching to this,
and using an existing open-source `hast-util-to-html` HAST renderer
resolves the issue.
2024-09-26 17:40:11 -07:00
Abram Sanderson 711a667def
Update blob upload to use managed identity (#22647)
## Description

Updates usages of `az storage` to leverage login information for the
service principal that our pipelines assume.

A successful test run for api report upload can be found
[here](https://dev.azure.com/fluidframework/internal/_build/results?buildId=296024&view=logs&j=897f79ef-2c90-5d46-29c0-b0ed22a2d39c&t=9305981a-7602-52ec-3c74-5436202de3b9)
(requires internal project access).

[This
run](https://dev.azure.com/fluidframework/internal/_build/results?buildId=296015&view=logs&j=897f79ef-2c90-5d46-29c0-b0ed22a2d39c&t=9305981a-7602-52ec-3c74-5436202de3b9)
used the same code but was triggered before I gave the service principal
associated with our service connection storage blob contributor
permissions. The fact that this failed gives a bit more confidence that
this change is working as intended.

[This
run](https://dev.azure.com/fluidframework/internal/_build/results?buildId=296052&view=logs&j=c719ff29-64ed-5818-044d-14407c6a65d1&t=660fdca3-7237-5adb-817c-3d74f278c44a)
verifies dev releases upload as expected.

---------

Co-authored-by: Abram Sanderson <absander@microsoft.com>
2024-09-26 15:18:06 -07:00