Submitting Work
Before implementing a feature or a fix, it is usually best to discuss the proposed changes with team members. Some fixes might require new public API or changes to existing public APIs. If this is the case, it is even more important to discuss the issue's problem space and the proposed changes before diving too deep into the implementation.
Making a PR
Submissions should be made as PRs against the main branch.
If a bugfix for an existing release is needed, that work should be cherry-picked to secondary PRs targeting the appropriate release branches after being accepted to the main branch.
Writing Tests
All PRs should have accompanying tests. For bug-fixes, this should include tests that demonstrate the issue being fixed and test that the solution works.
- We do write tests for our deprecations and assertion messages, using the
assert.expectAssertion()andassert.expectDeprecation()helpers. - Because we run tests in both development and
productionenvironments, assertions, deprecations and warnings may be stripped out. To avoid tests of debug behaviors failing for your PR in production environments, use thetestInDebugfunction instead ofqunittestto skip them in production when appropriate.- alternatively wrap specific assertions in
if (DEBUG)orif (PRODUCTION)
- alternatively wrap specific assertions in
- Update the documentation, examples, and guides when affected by your contribution
Running Tests
- PRs will automatically run an extensive set of test scenarios for your work. In some cases a contributor may need to approve the workflow run if this is your first contribution.
WarpDriveis a collection of packages and comes with multiple test apps scoped to specific situations or parts of the codebase we want to test. These test applications can be found in<project>/tests. These should look like familiar ember app/addon tests, and to run them from within a specific test app usepnpm testorpnpm test --serve. For additional test commands see the list of commands in the respectivepackage.jsonfiles.
Pull Request Titles
PRs should be meaningfully titled to give context into the change for the changelog.
Pull Request Labeling
All PRs should be labeled. PR labeling for changelog and backporting is enforced in CI, but labels may only be applied by project maintainers. PRs from non-maintainers will be labeled by maintainers prior to a PR being accepted and merged.
Changelog Labels
Labels used for the changelog include any labels listed in the changelog config in the root package.json.
These labels are prefixed with changelog: and currently the options are:
:label: breakingwhich should be used to signify a breaking change:label: featwhich should be used to signify an addition of a new public feature or behavior:label: bugwhich should be used to signify a fix for a reported issue:label: perfwhich should be used to signify that the commit will improve performance characteristics in a meaningful way:label: cleanupwhich should be used to signify removal of deprecated features or that a deprecation has become an assertion.:label: deprecationwhich should be used to signify addition of a new deprecation:label: docwhich should be used to signify a fix or improvement to documentation generated for api.emberjs.com:label: testwhich should be used to signify addition of new tests or refactoring of existing tests:label: chorewhich should be used to signify refactoring of internal code that should not have an affect on public APIs or behaviors but which we may want to call out for potentially unintended consequences.:label: dependencieswhich should be used when bumping dependencies onmain. Bumps on other branches should use other labels as this implies a more substantive change.
Backporting Labels
We use one set of labels to indicate that a PR needs to be backported and where it needs to be backported to, and a second set of labels to indicate that a PR is the backport PR.
To indicate that a PR should be backported, the following labels, all prefixed with target: are available:
:dart: canaryindicates that a PR will not require backporting.:dart: betaindicates the PR requires being backported to the current beta release.:dart: releaseindicates the PR requires being backported to the current active release.:dart: ltsindicates that a PR requires being backported to the most current LTS release.:dart: lts-previndicates that a PR requires being backported to the second-most recent LTS release.
Note: a PR should add the individual label for every backport target required. We use this while releasing to search for any commits still requiring backport to include, and will eventually automate opening backport PRs via a bot when these labels are present. We remove the target: label from merged PRs only once the backport PR has been opened.
To indicate that a PR is the backport PR, the following labels, all prefixed with backport- are available:
backport-betafor PRs to the beta branchbackport-releasefor PRs to the current active release branchbackport-old-releasefor PRs to previous release branches that are not LTS branchesbackport-ltsfor PRs targetting the current active LTS branchbackport-lts-prevfor PRs targetting the second most current LTS branch
Note, we automatically add this label to any PR opened to a beta/release/lts branch, but for non-current non-lts backports it will need to be added manually.
Project Labels
Labels used for tracking work in various projects are not enforced, but PRs and issues should be labeled for any applicable projects and added to those projects when reviewed.