Skip to content

Commit

Permalink
Merge branch 'master' into advance-rfc-0659
Browse files Browse the repository at this point in the history
  • Loading branch information
ef4 authored Dec 15, 2023
2 parents 38547cd + bc0b57c commit 074be41
Show file tree
Hide file tree
Showing 53 changed files with 5,029 additions and 179 deletions.
18 changes: 10 additions & 8 deletions .github/PULL_REQUEST_TEMPLATE/advance-to-ready-for-release.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Advance #__RFC_NUMBER__ to the [Ready For Release Stage](https://github.com/emberjs/rfcs#ready-for-release)

## [Rendered](__RFC_RENDERED_URL__)

## Summary

This pull request is advancing the RFC to the [Ready For Release Stage](https://github.com/emberjs/rfcs#ready-for-release).
Expand Down Expand Up @@ -28,16 +30,16 @@ Each Ember core team will be requested as a reviewer on the PR to move into this

- [ ] Implementation is complete according to plan outlined in the RFC, with any adjustments noted in the RFC
- [ ] Any necessary learning materials have been updated
- [ ] The Ember team is ready to commit to the stability of any interfaces exposed by the current implementation of the feature
- [ ] The Ember team is ready to commit to the stability of any interfaces exposed by the current implementation of the feature. This is the go/no go decision for any feature flags, but the flags should only be turned on when moving to Released.
- [ ] Criteria for moving to the Recommended Stage has been filled out
- [ ] This PR has been converted from a draft to a regular PR and the `Final Comment Period` label has been added to start the FCP
- [ ] Each [team](https://github.com/emberjs/rfcs#relevant-teams) has been added as a reviewer to the PR at the start of the FCP
* [ ] Framework @emberjs/framework
* [ ] Data @emberjs/ember-data-core
* [ ] CLI @emberjs/cli
* [ ] Learning @emberjs/learning-core
* [ ] Typescript @emberjs/typescript-core
* [ ] Steering @emberjs/steering
- [ ] Each [team](https://github.com/emberjs/rfcs#relevant-teams) has been added as a reviewer to the PR at the start of the FCP. Reviews are not required by the end of the FCP. This is a notification step.
* Framework @emberjs/framework
* Data @emberjs/ember-data-core
* CLI @emberjs/cli
* Learning @emberjs/learning-core
* Typescript @emberjs/typescript-core
* Steering @emberjs/steering


## Criteria for moving to Recommended (required)
Expand Down
2 changes: 2 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/advance-to-recommended.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Advance #__RFC_NUMBER__ to the [Recommended Stage](https://github.com/emberjs/rfcs#recommended)

## [Rendered](__RFC_RENDERED_URL__)

## Summary

This pull request is advancing the RFC to the [Recommended Stage](https://github.com/emberjs/rfcs#recommended).
Expand Down
4 changes: 3 additions & 1 deletion .github/PULL_REQUEST_TEMPLATE/advance-to-released.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Advance #__RFC_NUMBER__ to the [Released Stage](https://github.com/emberjs/rfcs#released)

## [Rendered](__RFC_RENDERED_URL__)

## Summary

This pull request is advancing the RFC to the [Released Stage](https://github.com/emberjs/rfcs#released).
Expand All @@ -23,6 +25,6 @@ An RFC is moved into "Released" when the above is verified by consensus of the r

## Checklist to move to Released

- [ ] The work is published in stable versions of the relevant package(s)
- [ ] The work is published in stable versions of the relevant package(s), with any feature flags toggled on.
- [ ] Deviations from the original RFC are noted in the RFC
- [ ] Release packages and dates are updated in the RFC frontmatter
19 changes: 15 additions & 4 deletions .github/READTHIS.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ This has various checks to ensure new the RFC has correct metadata, filename, et
This should be tested when updating actions/find-added-or-modified-rfcs or any of
the actions used within that action. See [testing](#testing).

Test the following:
#### Testing Steps

- [ ] Adding a new RFC. A new pull request should be opened with a new RFC, the
first job should correctly determine that an RFC has been added and the other
jobs should run.
Expand All @@ -34,7 +35,8 @@ whether the pull request adds a new RFC. If it does, it labels the pull request
This should be tested when updating actions/find-added-or-modified-rfcs or any of
the actions used within that action. See [testing](#testing).

Test the following:
#### Testing Steps

- [ ] Adding a new RFC. A new pull request should be opened with a new RFC, the
first job should correctly determine that an RFC has been added and the other
jobs should run. The label `S-Proposed` should be added.
Expand All @@ -57,7 +59,8 @@ If an RFC stage was modified, this triggers the open-advancement-pr.yml workflow
This should be tested when updating actions/find-added-or-modified-rfcs or any of
the actions used within that action. See [testing](#testing).

Test the following:
#### Testing Steps

- [ ] Adding a new RFC. Merging a pull request that adds an RFC should open a
pull request to advance to the next stage using the correct template.
- [ ] Updating an RFC stage. Merging a pull request that modifies an existing RFC's
Expand All @@ -74,7 +77,15 @@ This workflow runs on workflow_dispatch and can be triggered from the GitHub UI.
It takes a path to an RFC and will open a PR to advance it to the next stage, if
applicable.

Test the following:
RFCs that already existed before the implementation of
[Staged RFCs](https://github.com/emberjs/rfcs/blob/master/text/0617-rfc-stages.md)
did not get advancement PRs to their next stage. To create an advancement PR you
can manually run the workflow from the Github UI.

![Screenshot of the Github UI for manually triggering a workflow](./doc-assets/advance-rfc.png)

#### Testing Steps

- [ ] In the UI, on this workflow, trigger with a path of an existing RFC. A pull
request should be opened to advance the RFC to the next stage.
- [ ] In the UI, on this workflow, trigger with a path of an existing RFC at the
Expand Down
21 changes: 5 additions & 16 deletions .github/actions/find-added-or-modified-rfcs/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,31 +17,20 @@ outputs:
value: ${{ steps.modified-rfc.outputs.path }}
modified-rfcs-count:
description: "The count of how many RFCs were added or modified"
value: ${{ steps.counts.outputs.all_changed }}
value: ${{ steps.rfcs.outputs.all_changed_files_count }}
added-rfcs-count:
description: "The count of how many RFCs that were added"
value: ${{ steps.counts.outputs.added }}
value: ${{ steps.rfcs.outputs.added_files_count }}

runs:
using: "composite"
steps:
- name: Find added or modified RFCs
id: rfcs
uses: tj-actions/changed-files@v31
uses: tj-actions/changed-files@v39
with:
path: 'text'
json: 'true'
sha: ${{ inputs.sha }}
base_sha: ${{ inputs.base-sha }}

- name: Get counts of changed and added RFCs
id: counts
shell: bash
run: |
changed_len=`echo "${{ steps.rfcs.outputs.all_changed_files }}" | jq '. | length'`
echo "all_changed=$changed_len" >> $GITHUB_OUTPUT
added_len=`echo "${{ steps.rfcs.outputs.added_files }}" | jq '. | length'`
echo "added=$added_len" >> $GITHUB_OUTPUT
files: text
json: true

- name: Find modified or added RFC info
id: modified-rfc
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/setup-rfcs-tooling/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ runs:
with:
repository: emberjs/rfcs-tooling
path: rfcs-tooling
ref: 'v2.1.0'
ref: 'v3.0.0'

- uses: actions/setup-node@v3
with:
Expand Down
Binary file added .github/doc-assets/advance-rfc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
61 changes: 61 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<!-- If you are proposing a new RFC, please fill out the below template.
If not, please remove the below contents
-->

# Propose {{RFC_NAME}}

<!-- Update the below to link to the rendered version of your RFC.
The URL can be interpolated below or can be found by going to the files tab
and choosing `View file' from the `...' menu in the right hand corner of the file. -->

## [Rendered](https://github.com/{{username}}/rfcs/blob/{{branch}}/text/{{rfc_number}}-{{rfc_slug}}.md)

## Summary

This pull request is proposing a new RFC.

To succeed, it will need to pass into the [Exploring Stage](https://github.com/emberjs/rfcs#exploring)), followed by the [Accepted Stage](https://github.com/emberjs/rfcs#accepted).

A Proposed or Exploring RFC may also move to the [Closed Stage](https://github.com/emberjs/rfcs#closed) if it is withdrawn by the author or if it is rejected by the Ember team. This requires an "FCP to Close" period.

**An FCP is required before merging this PR to advance to Accepted.**

Upon merging this PR, automation will open a draft PR for this RFC to move to the [Ready for Released Stage](https://github.com/emberjs/rfcs#ready-for-release).

<details>
<summary>Exploring Stage Description</summary>

This stage is entered when the Ember team believes the concept described in the RFC should be pursued, but the RFC may still need some more work, discussion, answers to open questions, and/or a champion before it can move to the next stage.

An RFC is moved into Exploring with consensus of the relevant teams. The relevant team expects to spend time helping to refine the proposal. The RFC remains a PR and will have an `Exploring` label applied.

An Exploring RFC that is successfully completed can move to [Accepted](https://github.com/emberjs/rfcs#accepted) with an FCP is required as in the existing process. It may also be moved to [Closed](https://github.com/emberjs/rfcs#closed) with an FCP.
</details>

<details>
<summary>Accepted Stage Description</summary>

To move into the "accepted stage" the RFC must have complete prose and have successfully passed through an "FCP to Accept" period in which the community has weighed in and consensus has been achieved on the direction. The relevant teams believe that the proposal is well-specified and ready for implementation. The RFC has a champion within one of the relevant teams.

If there are unanswered questions, we have outlined them and expect that they will be answered before [Ready for Release](https://github.com/emberjs/rfcs#ready-for-release).

When the RFC is accepted, the PR will be merged, and automation will open a new PR to move the RFC to the [Ready for Release](https://github.com/emberjs/rfcs#ready-for-release) stage. That PR should be used to track implementation progress and gain consensus to move to the next stage.

</details>

## Checklist to move to Exploring

- [ ] The team believes the concepts described in the RFC should be pursued.
- [ ] The label `S-Proposed` is removed from the PR and the label `S-Exploring` is added.
- [ ] The Ember team is willing to work on the proposal to get it to Accepted

## Checklist to move to Accepted

- [ ] This PR has had the `Final Comment Period` label has been added to start the FCP
- [ ] The RFC is announced in #news-and-announcements in the Ember Discord.
- [ ] The RFC has complete prose, is well-specified and ready for implementation.
- [ ] All sections of the RFC are filled out.
- [ ] Any unanswered questions are outlined and expected to be answered before Ready for Release.
- [ ] "How we teach this?" is sufficiently filled out.
- [ ] The RFC has a champion within one of the relevant teams.
- [ ] The RFC has consensus after the FCP period.
6 changes: 2 additions & 4 deletions .github/workflows/advance-rfc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ jobs:
- name: RFCs Added or Changed
id: rfcs
uses: ./.github/actions/find-added-or-modified-rfcs
with:
base-sha: ${{ github.event.before }}

- name: Fail if more than 1 RFC is added or modified
if: steps.rfcs.outputs.modified-rfcs-count > 1
Expand Down Expand Up @@ -55,7 +53,7 @@ jobs:
echo "A new RFC was added"
echo "value=true" >> $GITHUB_OUTPUT
else
node rfcs-tooling/has-stage-changed.js ${{ github.event.before }} ${{ steps.rfcs.outputs.modified-rfc }}
node rfcs-tooling/scripts/has-stage-changed.mjs ${{ github.event.before }} ${{ steps.rfcs.outputs.modified-rfc }}
if [[ $? == 0 ]]; then
echo "## Yes, stage has changed" >> $GITHUB_STEP_SUMMARY
echo "value=true" >> $GITHUB_OUTPUT
Expand All @@ -69,7 +67,7 @@ jobs:
if: steps.has-stage-changed.outputs.value == 'true'
id: new-stage
run: |
new_stage=`node rfcs-tooling/find-next-stage.js ${{ steps.rfcs.outputs.modified-rfc }}`
new_stage=`node rfcs-tooling/scripts/find-next-stage.mjs ${{ steps.rfcs.outputs.modified-rfc }}`
echo "New Stage: $new_stage"
echo "value=$new_stage" >> $GITHUB_OUTPUT
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ jobs:
uses: ./.github/actions/setup-rfcs-tooling

- name: Lint the frontmatter of all RFCs
run: node ./rfcs-tooling/lint-rfc-frontmatter.js text/*.md
run: node ./rfcs-tooling/scripts/lint-rfc-frontmatter.mjs text/*.md
2 changes: 1 addition & 1 deletion .github/workflows/generate-rfc-frontmatter-json.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:

- name: Generate frontmatter data file
run: |
node rfcs-tooling/list-frontmatter.js text/*.md > rfc-data.json
node rfcs-tooling/scripts/list-frontmatter.mjs text/*.md > rfc-data.json
- uses: actions/upload-artifact@v3
with:
Expand Down
16 changes: 4 additions & 12 deletions .github/workflows/newly-added-rfcs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,6 @@ on:
paths:
- 'text/*.md'

concurrency:
# Events within 5 minutes are not guaranteed to run in order, and so when removing S-Proposed and adding S-Exploring
# we can't guarantee that the run of the workflow will be the one where S-Exploring is added. Adding `github.event_name`
# to the concurrency allows both workflows to complete and the PR to eventually have successful checks.
group: newly-added-rfc-${{ github.head_ref || github.ref }}-${{ github.event_name }}
cancel-in-progress: true

jobs:
check-rfcs:
name: Does PR add RFCs?
Expand Down Expand Up @@ -76,7 +69,7 @@ jobs:
- name: Fail if more than 1 RFC is added or modified
if: ${{ needs.check-rfcs.outputs.rfcs-changed > 1}}
run: |
echo "::error::More than 1 RFC is added in this PR; will be unable to automatically open PRs for advancement"
echo "::error::More than 1 RFC is added or modified in this PR; will be unable to automatically open PRs for advancement"
exit 1
frontmatter-stage-is-accepted:
Expand All @@ -92,7 +85,7 @@ jobs:

- name: Verify stage of newly added RFC is `accepted` in frontmatter
run: |
frontmatter=`node rfcs-tooling/rfc-frontmatter.js ${{ needs.check-rfcs.outputs.modified-rfc }}`
frontmatter=`node rfcs-tooling/scripts/rfc-frontmatter.mjs ${{ needs.check-rfcs.outputs.modified-rfc }}`
stage=`echo $frontmatter | jq '.stage'`
if [[ $stage != '"accepted"' ]]; then
echo "::error::Newly added RFCs must have the stage 'accepted' in the frontmatter"
Expand All @@ -113,8 +106,7 @@ jobs:
- name: Test RFC Filename matches PR Number that adds it
env:
PR_NUMBER: ${{ github.event.pull_request.number }}
run: node check-filename-matches-pr.js $PR_NUMBER ${{ needs.check-rfcs.outputs.modified-rfc }}
working-directory: rfcs-tooling
run: node rfcs-tooling/scripts/check-filename-matches-pr.mjs $PR_NUMBER ${{ needs.check-rfcs.outputs.modified-rfc }}

check-accepted-pr-url:
name: Verify Accepted PR URL is correct
Expand All @@ -129,7 +121,7 @@ jobs:

- name: Verify Accepted PR URL is correct
run: |
frontmatter=`node rfcs-tooling/rfc-frontmatter.js ${{ needs.check-rfcs.outputs.modified-rfc }}`
frontmatter=`node rfcs-tooling/scripts/rfc-frontmatter.mjs ${{ needs.check-rfcs.outputs.modified-rfc }}`
accepted_pr=`echo $frontmatter | jq '.prs.accepted'`
accepted_pr=${accepted_pr//\"/}
expected_pr="${{ github.event.pull_request.html_url }}"
Expand Down
19 changes: 11 additions & 8 deletions .github/workflows/open-advancement-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,48 +28,51 @@ jobs:

- name: Update frontmatter
run: |
node rfcs-tooling/update-rfc-stage.js ${{ inputs.new-stage }} ${{ inputs.rfc-path }}
node rfcs-tooling/scripts/update-rfc-stage.mjs ${{ inputs.new-stage }} ${{ inputs.rfc-path }}
- name: Set variables for use in PR
id: pr-variables
run: |
frontmatter=`node rfcs-tooling/rfc-frontmatter.js ${{ inputs.rfc-path }}`
frontmatter=`node rfcs-tooling/scripts/rfc-frontmatter.mjs ${{ inputs.rfc-path }}`
ready_for_release_pr=`echo $frontmatter | jq '.prs."ready-for-release"'`
ready_for_release_pr=${ready_for_release_pr//\"/}
released_pr=`echo $frontmatter | jq '.prs.released'`
released_pr=${released_pr//\"/}
rendered_rfc_url="https://github.com/$GITHUB_REPOSITORY/blob/advance-rfc-${{ inputs.rfc-number }}/${{ inputs.rfc-path }}"
title=`echo $frontmatter | jq '.title'`
if [[ ${{ inputs.new-stage }} == "ready-for-release" ]]; then
pretty_stage="Ready for Release"
template=`sed -e 's/__RFC_NUMBER__/${{ inputs.rfc-number }}/g' .github/PULL_REQUEST_TEMPLATE/advance-to-ready-for-release.md`
template=`sed -e 's/__RFC_NUMBER__/${{ inputs.rfc-number }}/g' -e "s>__RFC_RENDERED_URL__>$rendered_rfc_url>g" .github/PULL_REQUEST_TEMPLATE/advance-to-ready-for-release.md`
elif [[ ${{ inputs.new-stage }} == "released" ]]; then
pretty_stage="Released"
template=`sed -e 's/__RFC_NUMBER__/${{ inputs.rfc-number }}/g' -e "s>__READY_FOR_RELEASE_PR__>$ready_for_release_pr>g" .github/PULL_REQUEST_TEMPLATE/advance-to-released.md`
template=`sed -e 's/__RFC_NUMBER__/${{ inputs.rfc-number }}/g' -e "s>__READY_FOR_RELEASE_PR__>$ready_for_release_pr>g" -e "s>__RFC_RENDERED_URL__>$rendered_rfc_url>g" .github/PULL_REQUEST_TEMPLATE/advance-to-released.md`
elif [[ ${{ inputs.new-stage }} == "recommended" ]]; then
pretty_stage="Recommended"
template=`sed -e 's/__RFC_NUMBER__/${{ inputs.rfc-number }}/g' -e "s>__READY_FOR_RELEASE_PR__>$ready_for_release_pr>g" -e "s>__RELEASED_PR__>$released_pr>g" .github/PULL_REQUEST_TEMPLATE/advance-to-recommended.md`
template=`sed -e 's/__RFC_NUMBER__/${{ inputs.rfc-number }}/g' -e "s>__READY_FOR_RELEASE_PR__>$ready_for_release_pr>g" -e "s>__RELEASED_PR__>$released_pr>g" -e "s>__RFC_RENDERED_URL__>$rendered_rfc_url>g" .github/PULL_REQUEST_TEMPLATE/advance-to-recommended.md`
fi
echo 'body<<EOF' >> $GITHUB_OUTPUT
echo "$template" >> $GITHUB_OUTPUT
echo 'EOF' >> $GITHUB_OUTPUT
echo "Pretty Stage: $pretty_stage"
echo "pretty-stage=$pretty_stage" >> $GITHUB_OUTPUT
echo "title=$title" >> $GITHUB_OUTPUT
- name: Open PR
id: create-pr
uses: peter-evans/[email protected]
with:
token: ${{ secrets.personal-access-token }}
commit-message: "Advance RFC to Stage ${{ inputs.new-stage }}"
commit-message: "Advance RFC ${{ inputs.rfc-number }} to Stage ${{ inputs.new-stage }}"
add-paths: 'text'
branch: "advance-rfc-${{ inputs.rfc-number }}"
title: "Advance RFC #${{ inputs.rfc-number}} to Stage ${{ steps.pr-variables.outputs.pretty-stage }}"
title: "Advance RFC #${{ inputs.rfc-number}} `${{ steps.pr-variables.outputs.title }}` to Stage ${{ steps.pr-variables.outputs.pretty-stage }}"
body: "${{ steps.pr-variables.outputs.body }}"
labels: "RFC Advancement,S-${{ steps.pr-variables.outputs.pretty-stage}}"
draft: true

- name: Add new PR link to RFC frontmatter
run: |
node rfcs-tooling/update-advancement-pr.js ${{ inputs.rfc-path }} ${{ inputs.new-stage}} ${{ steps.create-pr.outputs.pull-request-url }}
node rfcs-tooling/scripts/update-advancement-pr.mjs ${{ inputs.rfc-path }} ${{ inputs.new-stage}} ${{ steps.create-pr.outputs.pull-request-url }}
- name: Update PR
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/trigger-opening-advancement-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- name: Find new stage
id: new-stage
run: |
new_stage=`node rfcs-tooling/find-next-stage.js ${{ inputs.rfc-path }}`
new_stage=`node rfcs-tooling/scripts/find-next-stage.mjs ${{ inputs.rfc-path }}`
echo "New Stage: $new_stage"
echo "value=$new_stage" >> $GITHUB_OUTPUT
Expand Down
Loading

0 comments on commit 074be41

Please sign in to comment.