You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
« Previous
Version 14
Next »
TODO:
Channels where we receive input
How we choose work to be done
UX design
UI design
Jira
Sprint planning
…and everything else leading up to…
Development
We follow the development process below to have:
Code changes that follow the design and style of the existing code
Code changes that
Commit messages in a consistent format
Pull Requests in a consistent format
Pull Requests that are easy to review
After a developer is assigned a Jira task, they begin work.
Make sure that the Jira task is broken down into small piece(s) of work
What makes a good Jira task
The goal for all developers is to create Pull Requests that are easy to review. Avoid:
Make sure that the Jira task has a clear description, and then move it to In Progress
What makes a good Jira description
Ideally the description in the Jira task is written in a way that it can be copied and pasted as the description of the Pull Request. This is very subjective, but the description should:
Unless you’re the person most familiar with the area of the codebase that you are changing, first discuss the changes with that person
What does this mean?
There will always be improvements underway in the CHEFS code, and any new work must align with those improvements. The end goal of these improvements is code that is:
necessary (YAGNI - don’t maintain, document, test, etc, code that we don’t need)
correct (it should work!)
simple (“as simple as possible but no simpler”)
documented
easy to read
easy to understand
easy to modify
easy to fully test
consistent (to reduce cognitive load)
Information that everyone should be familiar with:
Using the type
from Conventional Commits, decide what the primary type of work is, such as feat
for a new feature
List of the commit "type" values that we use
build
: change in build system or dependencies
ci
: change in continuous integration / deployment
docs
: change to documentation
feat
: a new feature is being added
fix
: an existing bug or defect is being fixed
perf
: change to improve performance
refactor
: change to improve code quality
revert
: reverts changes in a previous commit
style
: change to code style/formatting
test
: add missing tests or correct existing tests
Ensure that the main
branch in your cloned fork is up to date
The fetch/rebase GitHub workflow
The fetch
and rebase
GitHub workflow used by Kubernetes is a common way to keep cloned repos in sync with the origin
and upstream
repos.
Note: Some people prefer to pull
and create merge commits, and that’s fine because we squash commits when a Pull Request is merged into upstream/main
.
With an example Jira task FORMS-1234
that is a new feat
, create a branch off your main
with a name like feat/1234-new-map-component
Why this format is recommended
You can name the branch anything you want, but:
Crank out some code and tests (or tests and code, for TDD bonus points) and whatever documentation that needs to be created or updated
Periodically commit your work with messages like:
feat: FORMS-1234 new map component for dropping a pin
Added a new map component that allows the user to drop a "pin" on the map,
and the location is saved as both Lat/Lon or UTM coordinates.
Why this format is recommended
It’s only a recommendation that “working” commit messages use this format - these commit messages will eventually be squashed, and it’s only the final commit message that must be in this format. It’s a good idea to always use this format to be familiar with how the final commit message must look.
Tip: In the VS Code commit message input box, the up arrow allows you to scroll back through previous commit messages
Run the unit tests using Terminal
→ Run Task...
→ Unit Tests
and check the test coverage of your new code
Everything you ever wanted to know about the unit tests
Test coverage reports appear in:
Refer to the backend unit test documentation for details on:
test writing strategy
running tests on the command line
running with and without the coverage report
running single specs or single tests
Publish your branch, for example using the “Publish” button in VS Code
Create a Pull Request for your branch, for example using “New pull request” in the GitHub web site
Do a self review (diff)
(somewhere above: limit size of change)
Run the deploy Action
test
Mark as ready for review
Add reviewers
Talk to reviewers
Keep up to date
Deploy Action
merge and message
Push Action
Undeploy Action
Code Climate / etc?
Jira: moving tickets, rewrite description
What is the intention of a PR review? Ship / Show / Ask. nitpicks. style guide. choose your battles