Skip to content

Commit f98f472

Browse files
authored
VED-738 refactoring (#893)
* -> utilities/ * utilities: package.json * utilities: esc-proxies-containers * utilities: esc-proxies-containers II * utilities: azure build * tests * utils/resource.py pathname * utils/resource.py pathname II * utils/resource.py pathname III * pipelines/azure * Revert "pipelines/azure" This reverts commit cebbafb. * tests/tests -> sample_tests * temporary_sandbox -> infrastructure/ * empty commit: see https://github.com/orgs/community/discussions/59774 * empty commit... * grafana * dependabot fix: sandbox * dependabot fix: grafana * terraform_aws_backup * sonar-project.properties * proxies * terraform * rm minified * prettier * terraform path fix * fix path * cd terraform * mesh_infra * infra (untested) * sonar * infra->global; mesh_infra->mesh * lint * remove temporary_sandbox * remove temporary_sandbox II * remove temporary_sandbox III * ->/sandbox * ->/sandbox II * ->/specification * global->account * restored ../../../specification/... * terraform->instance * sonar * working-directory * tfplan * paths * paths: quality_checks * paths: quality_checks II * terraform fmt * test paths * test paths: run-e2e-tests * test paths II * test paths: run-e2e-tests II * test paths III * e2e/test_proxy * destroy_unused_workspaces * docker_file_path * terraform fmt
1 parent e06a3ee commit f98f472

File tree

310 files changed

+101
-4060
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

310 files changed

+101
-4060
lines changed

.github/dependabot.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,10 @@ updates:
1010
- "/lambdas/ack_backend"
1111
- "/delta_backend"
1212
- "/filenameprocessor"
13-
- "/grafana/non-prod/docker"
13+
- "/infrastructure/grafana/non-prod/docker"
1414
- "/mesh_processor"
1515
- "/recordprocessor"
1616
- "/sandbox"
17-
- "/temporary_sandbox"
1817
schedule:
1918
interval: "daily"
2019
open-pull-requests-limit: 1
@@ -52,8 +51,8 @@ updates:
5251
- "/backend"
5352
- "/batch_processor_filter"
5453
- "/delta_backend"
55-
- "/e2e"
56-
- "/e2e_batch"
54+
- "/tests/e2e"
55+
- "/tests/e2e_batch"
5756
- "/filenameprocessor"
5857
- "/mesh_processor"
5958
- "/recordprocessor"
@@ -73,10 +72,10 @@ updates:
7372

7473
- package-ecosystem: "terraform"
7574
directories:
76-
- "/grafana/non-prod/terraform"
77-
- "/infra"
78-
- "/terraform"
79-
- "/terraform_aws_backup/**"
75+
- "/infrastructure/grafana/non-prod/terraform"
76+
- "/infrastructure/account"
77+
- "/infrastructure/instance"
78+
- "/infrastructure/terraform_aws_backup/**"
8079
schedule:
8180
interval: "daily"
8281
open-pull-requests-limit: 1

.github/workflows/create-release-tag.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
run: pip install semver
3030

3131
- name: Set SPEC_VERSION env var
32-
run: echo ::set-env name=SPEC_VERSION::$(python scripts/calculate_version.py)
32+
run: echo ::set-env name=SPEC_VERSION::$(python utilities/scripts/calculate_version.py)
3333
env:
3434
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
3535

.github/workflows/deploy-backend.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,18 +72,18 @@ jobs:
7272
terraform_version: "1.12.2"
7373

7474
- name: Terraform Init
75-
working-directory: terraform
75+
working-directory: infrastructure/instance
7676
run: make init
7777

7878
- name: Terraform Plan
79-
working-directory: terraform
79+
working-directory: infrastructure/instance
8080
run: make plan-ci
8181

8282
- name: Save Terraform Plan
8383
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
8484
with:
8585
name: ${{ env.ENVIRONMENT }}-${{ env.SUB_ENVIRONMENT }}-tfplan
86-
path: terraform/tfplan
86+
path: infrastructure/instance/tfplan
8787

8888
terraform-apply:
8989
needs: terraform-plan
@@ -108,14 +108,14 @@ jobs:
108108
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0
109109
with:
110110
name: ${{ env.ENVIRONMENT }}-${{ env.SUB_ENVIRONMENT }}-tfplan
111-
path: terraform
111+
path: infrastructure/instance
112112

113113
- name: Terraform Init
114-
working-directory: terraform
114+
working-directory: infrastructure/instance
115115
run: make init
116116

117117
- name: Terraform Apply
118-
working-directory: terraform
118+
working-directory: infrastructure/instance
119119
run: |
120120
make apply-ci
121121
echo "ID_SYNC_QUEUE_ARN=$(make -s output name=id_sync_queue_arn)" >> $GITHUB_ENV

.github/workflows/pr-teardown.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
terraform_version: "1.12.2"
4444

4545
- name: Terraform Init and extract MNS SQS QUEUE ARN
46-
working-directory: terraform
46+
working-directory: infrastructure/instance
4747
run: |
4848
make init apigee_environment=$APIGEE_ENVIRONMENT environment=$BACKEND_ENVIRONMENT sub_environment=$BACKEND_SUB_ENVIRONMENT
4949
make workspace apigee_environment=$APIGEE_ENVIRONMENT environment=$BACKEND_ENVIRONMENT sub_environment=$BACKEND_SUB_ENVIRONMENT
@@ -71,6 +71,6 @@ jobs:
7171
make unsubscribe
7272
7373
- name: Terraform Destroy
74-
working-directory: terraform
74+
working-directory: infrastructure/instance
7575
run: |
7676
make destroy apigee_environment=$APIGEE_ENVIRONMENT environment=$BACKEND_ENVIRONMENT sub_environment=$BACKEND_SUB_ENVIRONMENT

.github/workflows/quality-checks.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ jobs:
175175
working-directory: lambdas/ack_backend
176176
id: acklambda
177177
env:
178-
PYTHONPATH: ${{ env.LAMBDA_PATH }}/ack_backend/src:tests:${{ env.SHARED_PATH }}/src
178+
PYTHONPATH: ${{ env.LAMBDA_PATH }}/ack_backend/src:${{ env.LAMBDA_PATH }}/ack_backend/tests:${{ env.SHARED_PATH }}/src
179179
continue-on-error: true
180180
run: |
181181
poetry install
@@ -186,7 +186,7 @@ jobs:
186186
working-directory: lambdas/mns_subscription
187187
id: mns_subscription
188188
env:
189-
PYTHONPATH: ${{ env.LAMBDA_PATH }}/mns_subscription/src:${{ env.SHARED_PATH }}/src
189+
PYTHONPATH: ${{ env.LAMBDA_PATH }}/mns_subscription/src:${{ env.LAMBDA_PATH }}/mns_subscription/tests:${{ env.SHARED_PATH }}/src
190190
continue-on-error: true
191191
run: |
192192
poetry install
@@ -198,7 +198,7 @@ jobs:
198198
working-directory: lambdas/redis_sync
199199
id: redis_sync
200200
env:
201-
PYTHONPATH: ${{ env.LAMBDA_PATH }}/redis_sync/src:${{ env.SHARED_PATH }}/src
201+
PYTHONPATH: ${{ env.LAMBDA_PATH }}/redis_sync/src:${{ env.LAMBDA_PATH }}/redis_sync/tests:${{ env.SHARED_PATH }}/src
202202
continue-on-error: true
203203
run: |
204204
poetry install
@@ -220,7 +220,7 @@ jobs:
220220
working-directory: lambdas/id_sync
221221
id: id_sync
222222
env:
223-
PYTHONPATH: ${{ env.LAMBDA_PATH }}/id_sync/src:${{ env.SHARED_PATH }}/src
223+
PYTHONPATH: ${{ env.LAMBDA_PATH }}/id_sync/src:${{ env.LAMBDA_PATH }}/id_sync/tests:${{ env.SHARED_PATH }}/src
224224
continue-on-error: true
225225
run: |
226226
poetry install

.github/workflows/run-e2e-tests.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -132,17 +132,17 @@ jobs:
132132

133133
- name: Terraform Init
134134
if: ${{ env.TF_OUTPUTS_REQUIRED == 'true' }}
135-
working-directory: terraform
135+
working-directory: infrastructure/instance
136136
run: make init
137137

138138
- name: Set Terraform workspace
139139
if: ${{ env.TF_OUTPUTS_REQUIRED == 'true' }}
140-
working-directory: terraform
140+
working-directory: infrastructure/instance
141141
run: make workspace
142142

143143
- name: Read Terraform outputs
144144
if: ${{ env.TF_OUTPUTS_REQUIRED == 'true' }}
145-
working-directory: terraform
145+
working-directory: infrastructure/instance
146146
run: |
147147
echo "IMMS_DELTA_TABLE_NAME=$(make -s output name=imms_delta_table_name)" >> $GITHUB_ENV
148148
echo "AWS_DOMAIN_NAME=$(make -s output name=service_domain_name)" >> $GITHUB_ENV
@@ -157,15 +157,15 @@ jobs:
157157
with:
158158
python-version: 3.11
159159
cache: "poetry"
160-
cache-dependency-path: "e2e/poetry.lock"
160+
cache-dependency-path: tests/e2e/poetry.lock
161161

162162
- name: Install e2e test dependencies
163-
working-directory: e2e
163+
working-directory: tests/e2e
164164
run: poetry install --no-root
165165

166166
- name: Get Apigee access token
167167
if: ${{ vars.RUN_FULL_E2E_TESTS == 'true' }}
168-
working-directory: e2e
168+
working-directory: tests/e2e
169169
env:
170170
APIGEE_PASSWORD: ${{ secrets.APIGEE_PASSWORD }}
171171
APIGEE_BASIC_AUTH_TOKEN: ${{ secrets.APIGEE_BASIC_AUTH_TOKEN }}
@@ -187,17 +187,17 @@ jobs:
187187
188188
- name: Run proxy e2e test suite
189189
if: ${{ vars.RUN_PROXY_E2E_TESTS == 'true' }}
190-
working-directory: e2e
190+
working-directory: tests/e2e
191191
run: poetry run python -m unittest test_proxy
192192

193193
- name: Run sandbox e2e test suite
194194
if: ${{ vars.RUN_SANDBOX_E2E_TESTS == 'true' }}
195-
working-directory: e2e
195+
working-directory: tests/e2e
196196
run: poetry run python -m unittest test_proxy.TestProxyHealthcheck
197197

198198
- name: Run full e2e test suite
199199
if: ${{ vars.RUN_FULL_E2E_TESTS == 'true' }}
200-
working-directory: e2e
200+
working-directory: tests/e2e
201201
run: poetry run python -m unittest
202202

203203
batch-e2e-tests:
@@ -223,14 +223,14 @@ jobs:
223223
with:
224224
python-version: 3.11
225225
cache: "poetry"
226-
cache-dependency-path: "e2e_batch/poetry.lock"
226+
cache-dependency-path: tests/e2e_batch/poetry.lock
227227

228228
- name: Install e2e test dependencies
229-
working-directory: e2e_batch
229+
working-directory: tests/e2e_batch
230230
run: poetry install --no-root
231231

232232
- name: Run batch e2e test suite
233-
working-directory: e2e_batch
233+
working-directory: tests/e2e_batch
234234
env:
235235
ENVIRONMENT: ${{ inputs.sub_environment }}
236236
run: poetry run python -m unittest -c -v

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ __pycache__/
1717
.envrc
1818
smoketest-report.xml
1919
lambda_typescript/**/*.js
20-
terraform/zips
20+
instance/zips
2121
.dir-locals.el
2222
*.pyc
2323
.python-version

.prettierignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33

44
# We hit compile errors in Apigee if these are auto formatted
55
# TODO - investigate
6-
/proxies/live/apiproxy/resources/jsc/
7-
/proxies/sandbox/apiproxy/resources/jsc/
6+
/infrastructure/proxies/live/apiproxy/resources/jsc/
7+
/infrastructure/proxies/sandbox/apiproxy/resources/jsc/

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
SHELL=/usr/bin/env bash -euo pipefail
22

33
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
4-
PYTHON_PROJECT_DIRS = e2e e2e_batch quality_checks $(PYTHON_PROJECT_DIRS_WITH_UNIT_TESTS)
4+
PYTHON_PROJECT_DIRS = tests/e2e tests/e2e_batch quality_checks $(PYTHON_PROJECT_DIRS_WITH_UNIT_TESTS)
55

66
.PHONY: install lint format format-check clean publish build-proxy release initialise-all-python-venvs update-all-python-dependencies run-all-python-unit-tests build-all-docker-images
77

@@ -33,10 +33,10 @@ publish: clean
3333

3434
#Runs build proxy script
3535
build-proxy:
36-
scripts/build_proxy.sh
36+
utilities/scripts/build_proxy.sh
3737

3838
#Files to loop over in release
39-
_dist_include="poetry.toml Makefile build/. specification sandbox scripts"
39+
_dist_include="poetry.toml Makefile build/. specification sandbox utilities/scripts"
4040

4141
#Create /dist/ sub-directory and copy files into directory
4242
#Ensure full dir structure is preserved for Lambdas

README.md

Lines changed: 4 additions & 4 deletions

0 commit comments

Comments
 (0)