Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
12 changes: 1 addition & 11 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,8 @@ end_of_line = lf
[Makefile]
indent_style = tab

[*.{xml,js,json,yaml}]
[*.{xml,js,json,yaml,yml}]
indent_size = 2

[*.postman_collection.json]
indent_style = tab

[*.yaml]
trim_trailing_whitespace = false

[*.js]
ij_javascript_force_semicolon_style = true
ij_javascript_use_semicolon_after_statement = false

[*.md]
trim_trailing_whitespace = false
24 changes: 13 additions & 11 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

title: ""
labels: ""
assignees: ""
---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
Expand All @@ -24,15 +24,17 @@ A clear and concise description of what you expected to happen.
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser: [e.g. chrome, safari]
- Version: [e.g. 22]

- OS: [e.g. iOS]
- Browser: [e.g. chrome, safari]
- Version: [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser: [e.g. stock browser, safari]
- Version: [e.g. 22]

- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser: [e.g. stock browser, safari]
- Version: [e.g. 22]

**Additional context**
Add any other context about the problem here.
7 changes: 3 additions & 4 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

title: ""
labels: ""
assignees: ""
---

**Is your feature request related to a problem? Please describe.**
Expand Down
27 changes: 14 additions & 13 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
## Summary
* Routine Change
* :exclamation: Breaking Change
* :robot: Operational or Infrastructure Change
* :sparkles: New Feature
* :warning: Potential issues that might be caused by this change

Add any other relevant notes or explanations here. **Remove this line if you have nothing to add.**
- Routine Change
- :exclamation: Breaking Change
- :robot: Operational or Infrastructure Change
- :sparkles: New Feature
- :warning: Potential issues that might be caused by this change

Add any other relevant notes or explanations here. **Remove this line if you have nothing to add.**

## Reviews Required
* [x] Dev
* [ ] Test
* [ ] Tech Author
* [ ] Product Owner

- [x] Dev
- [ ] Test
- [ ] Tech Author
- [ ] Product Owner

## Review Checklist

:information_source: This section is to be filled in by the **reviewer**.

* [ ] I have reviewed the changes in this PR and they fill all or part of the acceptance criteria of the ticket, and the code is in a mergeable state.
* [ ] If there were infrastructure, operational, or build changes, I have made sure there is sufficient evidence that the changes will work.
* [ ] I have ensured the changelog has been updated by the submitter, if necessary.
- [ ] I have reviewed the changes in this PR and they fill all or part of the acceptance criteria of the ticket, and the code is in a mergeable state.
- [ ] If there were infrastructure, operational, or build changes, I have made sure there is sufficient evidence that the changes will work.
- [ ] I have ensured the changelog has been updated by the submitter, if necessary.
4 changes: 2 additions & 2 deletions .github/workflows/create-release-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ jobs:
- name: Checkout
uses: actions/checkout@v5
with:
fetch-depth: 0 # This causes all history to be fetched, which is required for calculate-version to function
fetch-depth: 0 # This causes all history to be fetched, which is required for calculate-version to function

- name: Install Python 3.9
uses: actions/setup-python@v6
with:
python-version: 3.9

- name: Upgrade python pip
run: python -m pip install --upgrade pip
run: python -m pip install --upgrade pip

- name: Install git
run: pip install gitpython
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,11 @@ jobs:
if: ${{ inputs.environment == 'dev' && inputs.create_mns_subscription }}
with:
python-version: 3.11
cache: 'poetry'
cache: "poetry"

- name: Create MNS Subscription
if: ${{ inputs.environment == 'dev' && inputs.create_mns_subscription }}
working-directory: './lambdas/mns_subscription'
working-directory: "./lambdas/mns_subscription"
env:
APIGEE_ENVIRONMENT: ${{ inputs.apigee_environment }}
SQS_ARN: ${{ env.ID_SYNC_QUEUE_ARN }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/pr-teardown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
permissions:
id-token: write
contents: read

steps:
- name: Connect to AWS
uses: aws-actions/configure-aws-credentials@a03048d87541d1d9fcf2ecf528a4a65ba9bd7838
Expand All @@ -37,7 +37,7 @@ jobs:

- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8

- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd
with:
terraform_version: "1.12.2"
Expand All @@ -55,10 +55,10 @@ jobs:
- uses: actions/setup-python@v6
with:
python-version: 3.11
cache: 'poetry'
cache: "poetry"

- name: Unsubscribe MNS
working-directory: './lambdas/mns_subscription'
working-directory: "./lambdas/mns_subscription"
env:
SQS_ARN: ${{ env.ID_SYNC_QUEUE_ARN }}
run: |
Expand Down
53 changes: 35 additions & 18 deletions .github/workflows/quality-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,26 @@ env:
LAMBDA_PATH: ${{ github.workspace }}/lambdas

jobs:
lint:
name: Lint specification and Python projects
lint-specification:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we also wanna run the same prettier checks and tf fmt check that we have for pre-commits in the pipeline in case someone does not have them switched on locally?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah good shout. Will create a small follow up PR for this and some README changes

name: Lint specification
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v5

- uses: actions/setup-node@v5
with:
node-version: "23.11.0"
cache: "npm"

- name: Install linting dependencies
run: make install-node

- name: Lint
run: make lint

lint-python:
name: Lint Python projects
runs-on: ubuntu-latest

steps:
Expand All @@ -22,23 +40,22 @@ jobs:
- name: Install poetry
run: pip install poetry==2.1.4

# Base linting requires 3.8 due to APIM package dependencies. See root README for details under linting.
# Consider upgrading this and poetry deps if we move away from Azure DevOps to using the Proxygen tool.
- uses: actions/setup-python@v6
with:
python-version: 3.8
cache: 'poetry'

- uses: actions/setup-node@v5
with:
node-version: '23.11.0'
cache: 'npm'
python-version: 3.11
cache: "poetry"

- name: Install linting dependencies
run: make install-node && poetry install --no-root
run: poetry install --no-root
working-directory: quality_checks

- name: Lint
run: make lint
run: poetry run make lint
working-directory: quality_checks

- name: Check formatting
run: poetry run make format-check
working-directory: quality_checks

testcoverage_and_sonarcloud:
name: Test Coverage and SonarCloud
Expand All @@ -53,7 +70,7 @@ jobs:
- uses: actions/setup-python@v6
with:
python-version: 3.11
cache: 'poetry'
cache: "poetry"

- name: Set up AWS credentials
env:
Expand Down Expand Up @@ -110,7 +127,7 @@ jobs:
working-directory: delta_backend
id: delta
env:
PYTHONPATH: delta_backend/src:delta_backend/tests
PYTHONPATH: delta_backend/src:delta_backend/tests
continue-on-error: true
run: |
poetry install
Expand Down Expand Up @@ -144,9 +161,9 @@ jobs:
PYTHONPATH: ${{ env.LAMBDA_PATH }}/ack_backend/src:${{ github.workspace }}/ack_backend/tests
continue-on-error: true
run: |
poetry install
poetry run coverage run --source=src -m unittest discover || echo "ack-lambda tests failed" >> ../../failed_tests.txt
poetry run coverage xml -o ../../ack-lambda-coverage.xml
poetry install
poetry run coverage run --source=src -m unittest discover || echo "ack-lambda tests failed" >> ../../failed_tests.txt
poetry run coverage xml -o ../../ack-lambda-coverage.xml

- name: Run unittest with coverage-mns-subscription
working-directory: lambdas/mns_subscription
Expand Down
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npx lint-staged
7 changes: 7 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# This is a template, not a valid YAML file
/manifest_template.yml

# We hit compile errors in Apigee if these are auto formatted
# TODO - investigate
/proxies/live/apiproxy/resources/jsc/
/proxies/sandbox/apiproxy/resources/jsc/
26 changes: 13 additions & 13 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,22 @@ appearance, race, religion, or sexual identity and orientation.
Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
- The use of sexualized language or imagery and unwelcome sexual attention or
advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic
address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Expand Down
13 changes: 9 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,39 @@
# Contribution Guidelines

## Raising an Issue

If you raise an issue against this repository, please include as much information as possible to reproduce any bugs,
or specific locations in the case of content errors.

## Contributing code

To contribute code, please fork the repository and raise a pull request.

Ideally pull requests should be fairly granular and aim to solve one problem each. It would also be helpful if they
linked to an issue. If the maintainers cannot understand why a pull request was raised, it will be rejected,
so please explain why the changes need to be made (unless it is self-evident).

### Merge responsibility
* It is the responsibility of the reviewer to merge branches they have approved.
* It is the responsibility of the author of the merge to ensure their merge is in a mergeable state.
* It is the responsibility of the maintainers to ensure the merge process is unambiguous and automated where possible.

- It is the responsibility of the reviewer to merge branches they have approved.
- It is the responsibility of the author of the merge to ensure their merge is in a mergeable state.
- It is the responsibility of the maintainers to ensure the merge process is unambiguous and automated where possible.

### Branch naming

Branch names should be of the format:

`apm-nnn-short-issue-description`

Multiple branches are permitted for the same ticket.

### Commit messages

Commit messages should be formatted as follows:

```
APM-NNN Summary of changes

Longer description of changes if explaining rationale is necessary,
limited to 80 columns and spanning as many lines as you need.
```

9 changes: 2 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
SHELL=/usr/bin/env bash -euo pipefail

PYTHON_PROJECT_DIRS_WITH_UNIT_TESTS = backend batch_processor_filter delta_backend filenameprocessor mesh_processor recordprocessor lambdas/ack_backend lambdas/redis_sync lambdas/id_sync lambdas/mns_subscription lambdas/shared
PYTHON_PROJECT_DIRS = e2e e2e_batch $(PYTHON_PROJECT_DIRS_WITH_UNIT_TESTS)
PYTHON_PROJECT_DIRS = e2e e2e_batch quality_checks $(PYTHON_PROJECT_DIRS_WITH_UNIT_TESTS)

#Installs dependencies using poetry.
install-python:
Expand All @@ -12,17 +12,12 @@ install-python:
install-node:
npm install --legacy-peer-deps

#Configures Git Hooks, which are scripts that run given a specified event.
.git/hooks/pre-commit:
cp scripts/pre-commit .git/hooks/pre-commit

#Condensed Target to run all targets above.
install: install-node install-python .git/hooks/pre-commit
install: install-node install-python

#Run the npm linting script (specified in package.json). Used to check the syntax and formatting of files.
lint:
npm run lint
find . -name '*.py' -not -path '**/.venv/*' -not -path '**/.terraform/*'| xargs poetry run flake8

#Removes build/ + dist/ directories
clean:
Expand Down
Loading
Loading