Skip to content

Commit

Permalink
DOP-3949: Rename 'master' to 'main'
Browse files Browse the repository at this point in the history
  • Loading branch information
i80and committed Jan 30, 2024
1 parent 40dd3d8 commit 01a4955
Show file tree
Hide file tree
Showing 12 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ As the name suggests, this workflow cleans up the feature branch infrastructure.

### Bugs

Right now, there is a small bug with the `update-feature-branch.yml` workflow. This workflow conditionally deploys the various stacks depending on what files have changed from a commit. The issue is that the custom filter action compares the PR branch to master for every workflow run. This means that if you make a change to `src/app.ts` in the first commit, but only make changes to files in the `api/` directory in subsequent commits, it will still run the deploy for the worker.
Right now, there is a small bug with the `update-feature-branch.yml` workflow. This workflow conditionally deploys the various stacks depending on what files have changed from a commit. The issue is that the custom filter action compares the PR branch to main for every workflow run. This means that if you make a change to `src/app.ts` in the first commit, but only make changes to files in the `api/` directory in subsequent commits, it will still run the deploy for the worker.

For the `deploy-feature-branch.yml` workflow, this will not re-run if the first build when opening a PR fails. This means that subsequent builds of the `update-feature-branch.yml` workflow will also fail. This is due to the fact that the SQS queues would not have been deployed. For now, the workaround is to close and re-open the PR. This will run the `deploy-feature-branch.yml` workflow.
4 changes: 2 additions & 2 deletions .github/workflows/clean-feature-branch.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
on:
pull_request:
branches:
- master
- main
types:
- closed

Expand Down Expand Up @@ -32,4 +32,4 @@ jobs:
- name: Delete cache
run: gh cache delete ${{github.head_ref}}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/deploy-feature-branch.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
on:
pull_request:
branches:
- master
- main
types:
- opened
- reopened
Expand Down Expand Up @@ -40,4 +40,4 @@ jobs:
path: |
node_modules
cdk-infra/node_modules
key: ${{ github.head_ref }}
key: ${{ github.head_ref }}
2 changes: 1 addition & 1 deletion .github/workflows/deploy-stg-ecs.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
on:
push:
branches:
- "master"
- "main"
- "integration"
concurrency:
group: environment-stg-${{ github.ref }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-stg-enhanced-webhooks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ on:
push:
paths: ["api/v2/**", "cdk-infra/lib/constructs/api/**", "cdk-infra/utils/**"]
branches:
- "master"
- "main"
- "integration"

concurrency:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-stg-enhanced-worker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ on:
push:
paths: ["src/**", "cdk-infra/lib/constructs/worker/**", "Dockerfile.enhanced", "modules/**"]
branches:
- 'master'
- 'main'
- 'integration'

concurrency:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-oas-page-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: CI - OAS Page Builder
on:
push:
branches:
- master
- main
pull_request:
branches:
- master
- main

jobs:
# Checks for changes to the modules/oas-page-builder directory
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-persistence.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: CI-persistence
on:
push:
branches:
- master
- main
pull_request:
branches:
- master
- main

jobs:
# Checks for changes to the modules/persistence directory
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: CI
on:
push:
branches:
- master
- main
pull_request:
branches:
- master
- main

jobs:
# Checks for changes outside of /modules directory
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-feature-branch.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
on:
pull_request:
branches:
- master
- main
types:
- synchronize

Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,31 +126,31 @@ See the [spec doc](https://docs.google.com/document/d/1XZOuuGmozcLQRSDitx0UWhZzJ

## Branches

Development in this repository can be done via forks or branches. Currently, we support a `master` branch and `meta` branch. In general, the development workflow is to open pull requests against `master`, and to test `master` prior to creating new tags for a release.
Development in this repository can be done via forks or branches. Currently, we support a `main` branch and `meta` branch. In general, the development workflow is to open pull requests against `main`, and to test `main` prior to creating new tags for a release.

In general, the git workflow within this repository loosely follows https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow .

### Meta

`meta` contains various makefiles and .yaml files used for configuration.
Changes or additions to/of makefiles and .yaml for publishing purposes should be performed against this branch.
There is no general requirement to keep `meta` up to date with `master` or `integration`.
There is no general requirement to keep `meta` up to date with `main` or `integration`.

### Master
### Main

`master` is treated as a running pre-production feature branch. Changes should not go into master until properly tested for regressions in an acceptance environment. It is an expectation that hotfixes may have to occur on occasion - on such an occasion, a feature branch should be made from the commit hash of the last release tag, and not from the head of master. Master may contain changes that have yet to be fully tested for a production release.
`main` is treated as a running pre-production feature branch. Changes should not go into main until properly tested for regressions in an acceptance environment. It is an expectation that hotfixes may have to occur on occasion - on such an occasion, a feature branch should be made from the commit hash of the last release tag, and not from the head of main. Main may contain changes that have yet to be fully tested for a production release.

### Release Tags

Each release tag represents a presumptive stable release - with the most recent release tag representing the current state of our production environment.

## Release Process

docs-worker-pool contains various triggers for release to higher environments. Currently, the repository supports an integration environment (reflecting the state of the master branch) and a production environment (reflecting the state of the most recent release tag).
docs-worker-pool contains various triggers for release to higher environments. Currently, the repository supports an integration environment (reflecting the state of the main branch) and a production environment (reflecting the state of the most recent release tag).

### Integration Environment

- Merge a pull request or otherwise push a commit to `master` branch.
- Merge a pull request or otherwise push a commit to `main` branch.
- Verify that the deploy-integration-ec2 workflow has executed successfully.

### Production Environment
Expand Down
2 changes: 1 addition & 1 deletion src/job/manifestJobHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export class ManifestJobHandler extends JobHandler {
throw new InvalidJobError(`Manifest prefix not found for ${this.currJob._id}`);
}

// For mut-index usage info, see: https://github.com/mongodb/mut/blob/master/mut/index/main.py#L2
// For mut-index usage info, see: https://github.com/mongodb/mut/blob/main/mut/index/main.py#L2
this.currJob.deployCommands = [
'. /venv/bin/activate',
`cd repos/${getDirectory(this.currJob)}`,
Expand Down

0 comments on commit 01a4955

Please sign in to comment.