Skip to content

Commit

Permalink
Add checklist to PRs, CODEOWNERS file, fix duplicates in GH Pages, an…
Browse files Browse the repository at this point in the history
…d add process for released/preview to CONTRIBUTING.md
  • Loading branch information
thogarty committed Dec 19, 2024
1 parent f8bfc0b commit d81f8ca
Show file tree
Hide file tree
Showing 7 changed files with 62 additions and 15 deletions.
4 changes: 4 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
## Checklist
- [ ] I have read the [CONTRIBUTING.md]()
- [ ] I certify that my `preview` and `released` lists for Events/Metrics/Alerts are correct
- [ ] I certify that all Events/Metrics/Alerts in `released` are properly tested and ready for production
5 changes: 3 additions & 2 deletions .github/workflows/create_tag_on_main_merge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ name: Bump version
on:
push:
branches:
- master
- main

jobs:
build:
runs-on: ubuntu-latest
steps:

- uses: actions/checkout@master
- uses: actions/checkout@v4
with:
# Fetches entire history, so we can analyze commits since last tag
fetch-depth: 0
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/pr_checklist_completion.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: 'PR Tasks Completed Check'
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]

jobs:
task-check:
runs-on: ubuntu-latest
steps:
- uses: kentaro-m/[email protected]
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
8 changes: 8 additions & 0 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# See https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners#example-of-a-codeowners-file
#

* @equinix/governor-digin-observability-architects
fabric* @equinix/governor-digin-fabric
resource_manager* @equinix/governor-qore-crh
access_manager* @equinix/governor-qore-crh
network_edge* @equinix/governor-ne-network-edge-engineering
34 changes: 28 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,34 @@ Each contributed data schema requires the following attributes:
* "metricNames" - - Object with list attributes `released` and `preview` that mark which environment the data schema is ready to suppport the given metric in. Only place types in the `released` list if it is fully tested and ready for production. Place it into the `preview` list if it is under development and should only be available in UAT.
* "alertNames" - Object with list attributes `released` and `preview` that mark which environment the data schema is ready to suppport the given event type in. Only place types in the `released` list if it is fully tested and ready for production. Place it into the `preview` list if it is under development and should only be available in UAT.

## Process for Upgrading Event/Metric/Alert from Development to Production

When adding a new event/metric/alert to a data schema always start by
entering it into the `preview` list. This list identifies *in development*
items and is the starting point for new events/metrics/alerts being added
into the repo.

Once an event/metric/alert has been thoroughly tested in lower environments
you will remove that item from the `preview` list and move it to the
`released` list. This indicates that your item is not ready to be consumed
in production and the production Equinix Event Manager will pass these items
through to the consumers.

It is imperative that you understand the responsibility involved for managing
your team's domain with regards to the `preview` and `released` lists in your
data schema files. The [CODEOWNERS](#codeowners) section describes how
responsibility is managed within the repo. Please review it thoroughly.

## CODEOWNERS

CODEOWNERS file will be in place to establish a Github team (Synced with Equinix IAM) responsible for the files along the domain path they are contributing to. This ensures that 1 member from each domain team and 1 architect will always be necessary to approve a Pull Request before it can be merged.

This is critical because the responsibility of maintaining the `released` and `preview` lists outlined in the [Gating](#data-schema-gating-through-equinix-event-manager) section lies with the Domain owners and not the architects. Should any production defect be found the Domain owner is responsible for resolution

When adding a new domain to the `jsonschema/equinix` directory, add an entry
to the CODEOWNERS file signifying which Github Team is responsible for
reviewing/approving PRs that modify the domain directory being added

## Data Schema Versioning

Versioning for data schemas is only based on major versions; there are no minor or patch versions. The major versions
Expand All @@ -91,9 +119,3 @@ Not all data_schemas need to be moved to v2. Just the ones that have breaking ch

The self service contribution model is setup to ensure the repo is always in a stable state that can be released to either UAT or production. Each time a Pull Request is merged into main a new version tag will be created based on SemVar for the commit names
present in the change. This tag will always be available to the Equinix Event Manager for releases. This setup is possible because of our CODEOWNERSHIP model.

## CODEOWNERS

CODEOWNERS file will be in place to establish a Github team (Synced with Equinix IAM) responsible for the files along the domain path they are contributing to. This ensures that 1 member from each domain team and 1 architect will always be necessary to approve a Pull Request before it can be merged.

This is critical because the responsibility of maintaining the `released` and `preview` lists outlined in the [Gating](#data-schema-gating-through-equinix-event-manager) section lies with the Domain owners and not the architects. Should any production defect be found the Domain owner is responsible for resolution
12 changes: 6 additions & 6 deletions scripts/generate_json_catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ def retrieve_json_schemas():
with open(root + "/" + file, "r") as eventFile:
data = json.load(eventFile)
events = {
sc.RELEASED: sorted(data[sc.EVENTS][sc.RELEASED]),
sc.PREVIEW: sorted(data[sc.EVENTS][sc.PREVIEW])
sc.RELEASED: sorted(set(data[sc.EVENTS][sc.RELEASED])),
sc.PREVIEW: sorted(set(data[sc.EVENTS][sc.PREVIEW]))
}
metrics = {
sc.RELEASED: sorted(data[sc.METRICS][sc.RELEASED]),
sc.PREVIEW: sorted(data[sc.METRICS][sc.PREVIEW])
sc.RELEASED: sorted(set(data[sc.METRICS][sc.RELEASED])),
sc.PREVIEW: sorted(set(data[sc.METRICS][sc.PREVIEW]))
}
alerts = {
sc.RELEASED: sorted(data[sc.ALERTS][sc.RELEASED]),
sc.PREVIEW: sorted(data[sc.ALERTS][sc.PREVIEW])
sc.RELEASED: sorted(set(data[sc.ALERTS][sc.RELEASED])),
sc.PREVIEW: sorted(set(data[sc.ALERTS][sc.PREVIEW]))
}
newItem = {
"url": data["$id"],
Expand Down
2 changes: 1 addition & 1 deletion scripts/generate_readme_event_catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def dropdowns(type, supported):
dropdowns += "\n\n</details>\n\n"
if len(supported[sc.RELEASED]) > 0:
dropdowns += "\n\n<details>\n<summary>Released</summary>\n\n"
dropdowns += " <br>\n".join(map(lambda x: f"`{x}`", supported[sc.RELEASED]))
dropdowns += " <br>\n\n".join(map(lambda x: f"`{x}`", supported[sc.RELEASED]))
dropdowns += "\n\n</details>\n"""
return dropdowns if len(dropdowns) > 20 else ""

Expand Down

0 comments on commit d81f8ca

Please sign in to comment.