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

316 Коммитов

Автор SHA1 Сообщение Дата
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
Tyler Butler 0b158c8bc1
ci: Update upload/download artifact actions to v4 latest (#23001) 2024-11-06 09:41:42 -08:00
Tyler Butler 1bc44ec9d4
ci: Auto-generate and publish release notes for minor releases (#22514)
The transform:releaseNotes command was added in #22466 to enable
automated release note creation for minor releases. This change updates
the CI pipeline to take advantage of the new capabilities.


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

---------

Co-authored-by: Alex Villarreal <716334+alexvy86@users.noreply.github.com>
2024-10-10 16:51:38 +00:00
Jason Hartman aec157d037
build: exclude alpha APIs from review requirement (#22486)
Whitelist `public`, `beta`, and `legacy.*` as requiring review.
`alpha` changes are still best reviewed, but there is no hard owner requirement to complete PR.

`build-tools` and `server` exclusions can be removed as not broken into
those categories.
2024-09-12 16:38:33 -07:00
Tyler Butler fbbed9dfc0
ci: Use correct template path in release notes workflow (#22429)
Addresses a couple of small issues in the release notes workflow.
2024-09-09 11:53:49 -07:00
Tyler Butler 1a4b95f7bf
feat(generate:releaseNotes): Add inline links to headings (#22415)
GitHub does not create heading IDs in the Releases UI, so our release
note TOC links don't work. This change adds a remarkjs/unist plugin that
inserts HTML anchors into the headings.

Also updates the intro message on the release notes issue to include a
command that can be used to generate the release notes locally.


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

---------

Co-authored-by: Alex Villarreal <716334+alexvy86@users.noreply.github.com>
2024-09-06 21:24:00 +00:00
Tyler Butler d79d25a5c3
ci: Use custom scoped token in release approval workflow (#22402)
The standard token doesn't have `org:read` permissions, and that scope
can't be added using permissions in the workflow. So instead use a
custom token that has only those permissions.
2024-09-05 12:14:52 -07:00
Tyler Butler 5c38a8f3f1
ci: Refactor release approval workflows into two pieces (#22386)
The first attempt at a release approval workflow didn't work. The
biggest problem is that the workflow can't enumerate team membership if
it's triggered by a `pull_request`, because the token it gets does not
and cannot have those permissions. To work around this, I split the
workflow into two pieces.

The first workflow is triggered by `pull_request` and
`pull_request_review`, and collects a little metadata about the PR which
is uploaded as a build artifact.

The second workflow is triggered by the completion of the first
(`workflow_run`). It downloads the metadata from the earlier workflow
and, if the metadata indicates, checks that the PR is approved by the
right folks. If it isn't, then it writes a failing status check to
GitHub. We can then require that check to pass for release PRs to be
merged.

I also removed the CODEOWNER approval requirements for the workflows
with a follow-up to re-enable them once the workflows are stable. I was
far too optimistic about how much iteration we'd need.

### Why so complicated?

Yeah, this process is not as simple as it should be. Part of the problem
is auth as noted above. Another problem is that there is no way (that I
have found) to trigger a workflow on `pull_request_review` ONLY for PRs
targeting certain branches, so every PR review on _any_ branch will
trigger this workflow! Given that, I tried to keep that workflow
lightweight. If we download the repo and install build-tools on _every
PR review_ that's a ridiculous amount of wasted resources.

Another source of complexity is supporting manual runs using the
`workflow_dispatch` event. This is very useful for testing and in cases
where the triggers don't work as we expect and a PR gets blocked.
However, it means the workflow has to take input from both the previous
workflow (via the uploaded artifacts) and from the `workflow_dispatch`
event that users provide when running the workflow. That amounts to a
bunch of conditional steps.

What we get in exchange for this complexity, though, is a workflow that
runs in seconds in the typical case, and only does the expensive work of
downloading, building, and running build-tools when running against
release branch PRs.
2024-09-04 18:32:25 -07:00
Tyler Butler 9fff8fcdab
ci: Update workflow permissions (#22373)
One of the output variables had an empty line in it, which meant the
checks weren't getting triggered since the value wasn't the expected
one. Also, the GitHub Actions token doesn't have org:read permissions,
and those can't be given using the `permissions` block in the workflow,
so I created a new narrowly scoped PAT and added it as a secret.
2024-09-03 18:38:25 -07:00
Tyler Butler 497501c703
feat(build-cli): New command check:prApproval (#22302)
Adds a new flub command, check:prApproval, which is used to check if a
PR in the repo is approved by a GitHub team or list of users.

This command is then used in a new workflow that runs on release branch
PRs to check that a member of the FluidFramework-ReleaseApprovers team
has approved the PR. We'll then make that a required check for release
branch PRs.

Finally, the CODEOWNERS file is updated to require approval from
FluidFramework-ReleaseApprovers for changes to the workflow itself.

The command can be run locally with a GitHub PAT, which is how I tested.
I also tested against a test branch on my fork. However, none of these
tests is an exact analog to the real Actions environment.

Because of how Actions work, this workflow must be merged to main before
it can be further tested using branches.

[AB#8814](https://dev.azure.com/fluidframework/235294da-091d-4c29-84fc-cdfc3d90890b/_workitems/edit/8814)
2024-09-03 16:33:41 -07:00
Joshua Smithrud 1a86c7d256
revert: CODEOWNERS additions (#22294)
Reverts additions made in #22278
2024-08-22 15:07:54 -07:00
Joshua Smithrud ecd60634c3
tools: Don't only require FFAPI reviews for report changes in specific directories (#22278)
Don't require API reviews for API report changes in `/tools` packages.
Also simplify specification patterns for CODEOWNERS, and...
* Require `fluid-cr-infra` review for API changes in `/build-tools`
packages
* Require `fluid-cr-server` review for API changes in `/server` packages
2024-08-21 11:33:41 -07:00
Tyler Butler 4fe6a0dec7
ci: Use pull_request_target in release branch warning workflow (#22264)
The release branch warning workflow needs to use the pull_request_target
trigger instead of the pull_request trigger, so it can post to the PR.

This is safe because the PR does not build anything or use content from
the submitted PR. When using pull_request_target the checked-out code is
the base branch, not the PR branch, so there's no access to content from
the PR itself.
2024-08-19 22:05:23 +00:00
Tyler Butler 1873d113cf
ci: Bump marocchino/sticky-pull-request-comment action to latest version (2.9.0) (#22259)
Updates the marocchino/sticky-pull-request-comment action to its latest
version, 2.9.0. This upgrade was needed because some options used in
recent workflows are not available in the older version.

I confirmed that the commit 331f8f5b4215f0445d3c07b4967662a32a2d3e31
corresponds to the v2.9.0 tag in the
marocchino/sticky-pull-request-comment repo:
https://github.com/marocchino/sticky-pull-request-comment/releases/tag/v2.9.0

This will be ported to the 2.2 release branch as well.
2024-08-19 20:44:02 +00:00
Tyler Butler 7db4f5c917
ci: Update release notes tracking issue (#22102)
Adds a GitHub actions workflow to update an issue with the current
release notes every time changesets are added or changed on the main
branch. This will provide a continually updated snapshot of what the
release notes will look like when we release.

I also updated some changeset content to better work with the release
note layout. There will be additional changes made in #22067.

---------

Co-authored-by: Alex Villarreal <716334+alexvy86@users.noreply.github.com>
Co-authored-by: Craig Macomber (Microsoft) <42876482+CraigMacomber@users.noreply.github.com>
Co-authored-by: jzaffiro <110866475+jzaffiro@users.noreply.github.com>
Co-authored-by: Joshua Smithrud <54606601+Josmithr@users.noreply.github.com>
2024-08-06 10:21:26 -07:00
Tyler Butler f2648ea15c
ci: Ignore changesets and release notes for website check (#22130)
Self-explanatory.
2024-08-05 22:59:13 -05:00
Tyler Butler 614392a6ff
ci: Add warning to release branch PRs (#22104) 2024-08-02 09:47:00 -07:00
Michael Zhen cefdda29cc
(ci): include .md file changes to trigger website validation (#22093)
Updating CI to run website validation for changes to any .md files
instead of just changes to the "docs/" directory.

Currently, `markdown-magic` generates some of the content in the docs
using content from sources outside the docs directory including package
READMEs throughout the repo. We want to validate these changes as they
could implicitly break the website content.
2024-08-01 16:16:09 -07:00
Tyler Butler e6da0cf46f
ci: Use correct release tag in manual runs (#22028)
The push-tag-create-release workflow was recently updated to support
manual runs using the GitHub UI. However, that change did not update the
step that checked out the release tag, so the release reports are
generated with the wrong data.
2024-07-25 15:03:12 -07:00
Tyler Butler 886762274a
ci: Label PRs that add/modify changesets (#21954)
It's helpful when preparing for a release to check if any pending PRs
are adding changesets. If the PRs were labeled, doing that query becomes
trivial.

I updated the area labeler to add the
[changeset-present](https://github.com/microsoft/FluidFramework/issues?q=sort%3Aupdated-desc+is%3Aopen+label%3Achangeset-present)
to changes with edits to changesets. This does nothing besides add the
label. Nothing else is automated or changed.
2024-07-22 12:02:27 -07:00
Tyler Butler fe1cc9a02b
ci: Require approval from fluid-cr-api for code ownership changes (#21862)
I noticed that changes to the codeowners file itself could be made
without approval, since the file itself was not "owned". I made
@microsoft/fluid-cr-api the owner, but perhaps it should be
@microsoft/fluidframework-admin?
2024-07-12 11:58:58 -07:00
Tyler Butler 8b489a7599
ci: Require fluid-cr-docs approval for changesets and release notes (#21861) 2024-07-12 08:02:08 -07:00
Tyler Butler c1602f38b1
ci: Upgrade pnpm/action-setup to v4 (#21782)
Upgrades pnpm/action-setup to v4 to fix
https://github.com/pnpm/action-setup/issues/135.

I also updated the GH release creation job to support manual runs. That
will allow us to create releases semi-manually from main, so we don't
have to port all the CI fixes to every release branch before we create
the releases.
2024-07-05 12:11:16 -07:00
Tyler Butler 67ce4d46b7
ci: Run PR labeler on release branches (#21753) 2024-07-02 11:55:12 -07:00
Tyler Butler 73e479f70a
ci: fix build-tools installation in GH actions workflow (#21556)
This workflow was not updated after build-tools was updated to ESM
instead of CJS. The fix is to use `npm link` to make `flub` available
since the old shim was removed when we switched to ESM.

Tested with [act](https://github.com/nektos/act):

```
act push -W .github/workflows/push-tag-create-release.yml -v
```


[AB#8474](https://dev.azure.com/fluidframework/235294da-091d-4c29-84fc-cdfc3d90890b/_workitems/edit/8474)
2024-06-20 15:56:16 -07:00
Daniel Lehenbauer a01074347b
github: public and legacy API changes require council review (#21533)
Configure CODEOWNERS so that deltas in the generated API reports
automatically add 'fluid-cr-api' as a required reviewer.
2024-06-19 15:58:48 -07:00
Tyler Butler 249ee2ed13
ci: Upgrade actions in GH workflows (#21255)
Our GitHub actions are using some outdated versions of actions. I
updated all of them to the latest without picking up new major versions.
Major upgrades can be done separately.

Command used:

```shell
docker run -it --rm -v "${PWD}:${PWD}" -w "${PWD}" ghcr.io/sethvargo/ratchet:latest update .github/workflows/*.yml
```
2024-06-05 21:42:12 +00:00
Tyler Butler 039bb1509f
ci: Publish patch GitHub releases automatically (#21254)
Now that the GitHub release process has been working stably for several
months, I've updated the workflow to auto-publish patch releases. This
means that the person doing the release won't need to do anything extra
to get the release published on GitHub.

Applies to patches only; minor and major releases are still left as
drafts.
2024-05-30 14:42:59 -07:00
Craig Macomber (Microsoft) 73e371c414
Update pnpm to version 8 (#21118)
## Description

Update pnpm to version 8. That means lock-file format version 6.

This relies on
https://github.com/microsoft/component-detection/pull/1110 which seems
to be deployed and working now.

This gets us onto a supported version of pnpm according to
https://github.com/pnpm/pnpm/security.
2024-05-21 16:48:30 -07:00
Tyler Butler d6566d7ea9
build(docs): Update dependencies (#20454)
Updates the dependencies in docs to the latest. Hugo is the exception,
since upgrading it may directly affect fluidframework.com and should be
tested more thoroughly. These updates are reasonably safe, despite being
major version bumps in some cases.

Additionally, this fixes the linkcheck-bin dependency to work properly
on arm64 mac and Linux systems.
2024-04-08 11:19:17 -07:00
Abram Sanderson d38e957c55
Remove packageVersion.ts from source tree code ownership (#20200)
## Description

Removes packageVersion.ts files (which are autogenerated) from those
package authors subscribe to when adding an entry for a package's source
tree. This should give less friction to bump PRs in future release
branches.

Co-authored-by: Abram Sanderson <absander@microsoft.com>
2024-03-19 10:07:07 -07:00
Alex Villarreal d237be1c13
fix: Do not delete release branches even if they're "stale" (no commits in the past 6 months) (#19769) 2024-03-04 11:31:21 -06:00
Tony Murphy 46ec11509c
Make existing code ownership source only (#19557)
As we rollout the new code ownership model we've found that the current
ownership is primarily about source, and not about the package and build
infrastructure, so moving all the existing source based ownership to
only cover the source

---------

Co-authored-by: Tony Murphy <anthonm@microsoft.com>
2024-02-08 11:26:20 -08:00
Taylor Williams 963332efff
Update ID compressor code owners (#19504)
Add code owners for the compressor.
2024-02-06 20:48:28 +00:00
Alex Villarreal 036431c86a
Add devtools code owners (#19506) 2024-02-06 19:48:31 +00:00
Taylor Williams 9c204f1a42
Update code owners for tree packages (#19503)
Add cr-tree as code owners for legacy and new sharedtree.
2024-02-06 18:57:59 +00:00
Tony Murphy 0b68ada028
Add Merge Tree Code Owners (#19498)
Add owners to merge tree and merge tree related dds.

Owning team:
https://github.com/orgs/microsoft/teams/fluid-cr-merge-tree/members

Co-authored-by: Tony Murphy <anthonm@microsoft.com>
2024-02-06 09:53:56 -08:00
Tony Murphy ad0353a3b1
Remove All Existing Code Owners to Prepare for Requiring Code Owners (#19481)
In order to enable require review from code owners on PR review we will
reset the state of the code owners file. Then it will be the
responsibility of owners to take explicit responsibility for areas of
the codebase they would like to own.

---------

Co-authored-by: Tony Murphy <anthonm@microsoft.com>
2024-02-05 17:33:05 -08:00
Alex Villarreal 3920e76013
Remove unused pipeline definition files (#19474) 2024-02-05 12:26:08 -06:00
Abram Sanderson 5182ce42a2
Add permissions block to push-tag-create-release.yml (#19361)
## Description

Updates the push-tag-create-release workflow to include a permissions
block.

See github permissions doc
[here](https://docs.github.com/en/enterprise-cloud@latest/actions/using-workflows/workflow-syntax-for-github-actions#permissions).

Co-authored-by: Abram Sanderson <absander@microsoft.com>
2024-02-02 15:18:26 -08:00
Tyler Butler 3d41bb28a5
ci: Run CODEOWNERS validation on release branches (#19430)
The CODEOWNERS PR validation should run on release branches, but the
branch trigger was incorrectly specified.
2024-02-01 17:07:07 +00:00
Abram Sanderson 330320bee9
Add permissions block to changeset workflows (#19335)
## Description

Updates the workflows related to changeset management to include a
permissions block.

See github permissions doc
[here](https://docs.github.com/en/enterprise-cloud@latest/actions/using-workflows/workflow-syntax-for-github-actions#permissions).

Co-authored-by: Abram Sanderson <absander@microsoft.com>
2024-01-29 09:08:58 -08:00
Abram Sanderson 5f966d1cb9
Add permissions block to website validation action (#19358)
## Description

Updates the workflows related to website validation to include a
permissions block.

See github permissions doc
[here](https://docs.github.com/en/enterprise-cloud@latest/actions/using-workflows/workflow-syntax-for-github-actions#permissions).

---------

Co-authored-by: Abram Sanderson <absander@microsoft.com>
2024-01-29 09:08:32 -08:00
Abram Sanderson 968bfca289
Remove merge-next and sync-branch actions (#19359)
## Description

These action are no longer used now that we don't maintain a `next`
branch. They will also stop working correctly once GITHUB_TOKEN
permissions are limited to readonly by default.

---------

Co-authored-by: Abram Sanderson <absander@microsoft.com>
2024-01-29 09:07:45 -08:00
Abram Sanderson 55e5075fdb
Add permissions block to stale-branches action (#19360)
## Description

Updates the stale-branches workflow to include a permissions block.

See github permissions doc
[here](https://docs.github.com/en/enterprise-cloud@latest/actions/using-workflows/workflow-syntax-for-github-actions#permissions).

Co-authored-by: Abram Sanderson <absander@microsoft.com>
2024-01-29 09:05:54 -08:00
Abram Sanderson 0b01a66c6e
Add permissions block to pr-labeler and pr-validation workflows (#19338)
## Description

Updates pr-labeler and pr-validation to include a permissions block.

See github permissions doc
[here](https://docs.github.com/en/enterprise-cloud@latest/actions/using-workflows/workflow-syntax-for-github-actions#permissions).

Co-authored-by: Abram Sanderson <absander@microsoft.com>
2024-01-26 14:10:16 -08:00
Tyler Butler 812d76f7cf
ci: Stop removing manually added changeset-required labels (#19020) 2024-01-04 07:15:01 -08:00
Joshua Smithrud 4c60083852
refactor(tree): Move tree package directory from `experimental/dds` to `packages/dds` (#18875)
Also renames directory from "tree2" to "tree"
2023-12-15 20:30:14 -08:00
Tyler Butler ad605eabe7
ci: Remove broken labeling of externally contributed PRs (#18668)
The labeling logic is broken, it seems, and we don't rely on the label
today, so removing.
2023-12-06 10:34:24 -08:00
Tyler Butler fda3c55297
ci: Update the PR labeler to address mislabeled PRs (#18655)
All PRs are being labeled "external-contribution". This is probably
because of https://github.com/srvaroa/labeler/issues/123, which has been
resolved in the latest v1 release. I updated the version of the action
to the latest v1 version.
2023-12-05 16:04:54 -08:00