Skip to content

Commit b3e90c8

Browse files
committed
feat(api): add monitoring feature with track_events use case
- features/monitoring: new feature module + track_events endpoint - app.py / authentication / config: wire up monitoring + tweaks - features/todo/use_cases: minor adjustments - Dockerfile + install-equinor-certificates.sh: build infra - openapi.json + uv.lock + pyproject: dependency updates
1 parent 25d214c commit b3e90c8

38 files changed

Lines changed: 1164 additions & 1158 deletions

.github/dependabot.yml

Lines changed: 20 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,87 +1,59 @@
11
version: 2
2-
32
registries:
43
dhi-io:
54
type: docker-registry
65
url: https://dhi.io
76
username: ${{secrets.DHI_USERNAME}}
87
password: ${{secrets.DHI_PASSWORD}}
9-
108
updates:
11-
- package-ecosystem: "github-actions"
12-
directory: "/"
13-
groups:
14-
actions:
15-
update-types:
16-
- "minor"
17-
- "patch"
9+
- package-ecosystem: "npm"
10+
directories:
11+
- "/web"
1812
schedule:
1913
interval: "monthly" # when template is used, recommended interval is "weekly"
20-
cooldown:
21-
default-days: 7
22-
23-
- package-ecosystem: "pre-commit"
24-
directory: "/"
2514
groups:
26-
pre-commit:
15+
web:
16+
exclude-patterns:
17+
- "@hey-api/openapi-ts"
2718
update-types:
2819
- "minor"
2920
- "patch"
30-
schedule:
31-
interval: "monthly" # when template is used, recommended interval is "weekly"
32-
cooldown:
33-
default-days: 7
21+
openapi-ts:
22+
patterns:
23+
- "@hey-api/openapi-ts"
3424

3525
- package-ecosystem: "docker"
3626
directories:
37-
- "/api"
3827
- "/web"
28+
- "/api"
3929
registries:
4030
- dhi-io
31+
schedule:
32+
interval: "monthly" # when template is used, recommended interval is "weekly"
4133
groups:
4234
dockerfile:
4335
update-types:
4436
- "minor"
4537
- "patch"
46-
schedule:
47-
interval: "monthly" # when template is used, recommended interval is "weekly"
48-
cooldown:
49-
default-days: 7
5038

5139
- package-ecosystem: "uv"
52-
directory: "/api"
53-
groups:
54-
api:
55-
update-types:
56-
- "minor"
57-
- "patch"
40+
directories:
41+
- "/docs"
42+
- "/api"
5843
schedule:
5944
interval: "monthly" # when template is used, recommended interval is "weekly"
60-
cooldown:
61-
default-days: 7
62-
63-
- package-ecosystem: "uv"
64-
directory: "/docs"
6545
groups:
6646
docs:
6747
update-types:
6848
- "minor"
6949
- "patch"
50+
51+
- package-ecosystem: "github-actions"
52+
directory: "/"
7053
schedule:
7154
interval: "monthly" # when template is used, recommended interval is "weekly"
72-
cooldown:
73-
default-days: 7
7455

75-
- package-ecosystem: "npm"
76-
directory: "/web"
77-
groups:
78-
web:
79-
update-types:
80-
- "minor"
81-
- "patch"
82-
exclude-patterns:
83-
- "@hey-api/openapi-ts"
56+
- package-ecosystem: "pre-commit"
57+
directory: "/"
8458
schedule:
8559
interval: "monthly" # when template is used, recommended interval is "weekly"
86-
cooldown:
87-
default-days: 7

.github/release-please-config.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
2-
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
3-
"packages": {
4-
".": {
5-
"release-type": "simple",
6-
"changelog-path": "docs/docs/changelog/changelog.md",
7-
"extra-files": ["web/package.json"]
8-
}
9-
}
2+
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
3+
"packages": {
4+
".": {
5+
"release-type": "simple",
6+
"changelog-path": "docs/docs/changelog/changelog.md",
7+
"extra-files": ["web/package.json"]
8+
}
9+
}
1010
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{ ".": "1.5.0" }
1+
{".":"1.5.0"}

.github/workflows/deploy-to-radix.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ jobs:
3535
deploy-on-radix:
3636
runs-on: ubuntu-latest
3737
steps:
38-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
38+
- uses: actions/checkout@v6
3939

4040
# You'll need an app registration with a Federated Credential for this to
4141
# work. Note that the credential will need to specify a branch name. This
4242
# step will therefore fail for all branches not mentioned in the credentials
4343
- name: Az CLI login
44-
uses: azure/login@532459ea530d8321f2fb9bb10d1e0bcf23869a43 # v3.0.0
44+
uses: azure/login@v3
4545
with:
4646
client-id: 4a761bec-628d-4c4b-860a-4903cbecc963 #app registration Application ID
4747
tenant-id: 3aa4a235-b6e2-48d5-9195-7fcf05b459b0
@@ -56,7 +56,7 @@ jobs:
5656
echo "APP_SERVICE_ACCOUNT_TOKEN=$token" >> $GITHUB_ENV
5757
5858
- name: Deploy on Radix
59-
uses: equinor/radix-github-actions@b23674a56b82a1da783b507bc7f15e7ca7067dd8 # v2.0.2
59+
uses: equinor/radix-github-actions@v2
6060
env:
6161
APP_SERVICE_ACCOUNT_TOKEN: ${{ env.APP_SERVICE_ACCOUNT_TOKEN }}
6262
with:

.github/workflows/linting-and-checks.yaml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ jobs:
2121
name: "pre-commit"
2222
steps:
2323
- name: "Setup: checkout repository"
24-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
24+
uses: actions/checkout@v6
2525

2626
- name: "Setup: Runtimes"
27-
uses: jdx/mise-action@1648a7812b9aeae629881980618f079932869151 # v4.0.1
27+
uses: jdx/mise-action@v4
2828
timeout-minutes: 5
2929

3030
- name: "Run: pre-commit"
31-
uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
31+
uses: pre-commit/action@v3.0.1
3232
with:
3333
extra_args: --all-files
3434

@@ -40,14 +40,14 @@ jobs:
4040
working-directory: ./api
4141
steps:
4242
- name: "Setup: checkout repository"
43-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
43+
uses: actions/checkout@v6
4444

4545
- name: "Setup: Runtimes"
46-
uses: jdx/mise-action@1648a7812b9aeae629881980618f079932869151 # v4.0.1
46+
uses: jdx/mise-action@v4
4747
timeout-minutes: 5
4848

4949
- name: "Setup: install uv"
50-
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
50+
uses: astral-sh/setup-uv@v7
5151
with:
5252
enable-cache: true
5353

@@ -65,21 +65,21 @@ jobs:
6565
working-directory: ./web
6666
steps:
6767
- name: "Setup: check out repository"
68-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
68+
uses: actions/checkout@v6
6969
with:
7070
sparse-checkout: |
7171
.github
7272
.mise
7373
web
7474
7575
- name: Cache dependencies
76-
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
76+
uses: actions/cache@v5
7777
with:
7878
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
7979
path: /home/runner/.yarn/berry/cache
8080

8181
- name: "Setup: Runtimes"
82-
uses: jdx/mise-action@1648a7812b9aeae629881980618f079932869151 # v4.0.1
82+
uses: jdx/mise-action@v4
8383
timeout-minutes: 5
8484

8585
- name: "Run: compile"
@@ -90,7 +90,7 @@ jobs:
9090
name: "validate Radix config"
9191
steps:
9292
- name: "Setup: checkout repository"
93-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
94-
- uses: equinor/radix-github-actions@b23674a56b82a1da783b507bc7f15e7ca7067dd8 # v2.0.2
93+
uses: actions/checkout@v6
94+
- uses: equinor/radix-github-actions@v2
9595
- name: "Run: validate radix config"
9696
run: rx validate radix-config

.github/workflows/publish-docs.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ jobs:
1313

1414
steps:
1515
- name: Checkout repository
16-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
16+
uses: actions/checkout@v6
1717

1818
- name: Install uv
19-
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
19+
uses: astral-sh/setup-uv@v7
2020

2121
- name: Install dependencies and build website
2222
run: |

.github/workflows/publish-image.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ jobs:
2020
build-and-publish-nginx-main:
2121
runs-on: ubuntu-latest
2222
steps:
23-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
23+
- uses: actions/checkout@v6
2424
with:
2525
fetch-depth: 2
2626

2727
- name: "Login to image registry"
28-
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0
28+
uses: docker/login-action@v4
2929
with:
3030
registry: ghcr.io
3131
username: ${{ github.actor }}
@@ -58,12 +58,12 @@ jobs:
5858
build-and-publish-api-main:
5959
runs-on: ubuntu-latest
6060
steps:
61-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
61+
- uses: actions/checkout@v6
6262
with:
6363
fetch-depth: 2
6464

6565
- name: "Login to image registry"
66-
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0
66+
uses: docker/login-action@v4
6767
with:
6868
registry: ghcr.io
6969
username: ${{ github.actor }}

.github/workflows/release-please.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,20 @@ jobs:
1414
release-please:
1515
runs-on: ubuntu-latest
1616
steps:
17-
- name: Create token
18-
id: create-token
19-
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
17+
- name: Generate token
18+
id: generate-token
19+
uses: actions/create-github-app-token@v3
2020
with:
21-
client-id: ${{ vars.APP_ID }}
21+
app-id: ${{ vars.APP_ID }}
2222
private-key: ${{ secrets.APP_PRIVATE_KEY }}
2323

2424
- name: release-please
2525
id: release-please
26-
uses: googleapis/release-please-action@45996ed1f6d02564a971a2fa1b5860e934307cf7 # v5.0.0
26+
uses: googleapis/release-please-action@v5
2727
with:
2828
config-file: .github/release-please-config.json
2929
manifest-file: .github/release-please-manifest.json
30-
token: ${{ steps.create-token.outputs.token }}
30+
token: ${{ steps.generate-token.outputs.token }}
3131
outputs:
3232
release_created: ${{ steps.release-please.outputs.release_created }}
3333
tag_name: ${{ steps.release-please.outputs.tag_name }}

.github/workflows/rollback.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
]
2626
steps:
2727
- name: "Login to image registry"
28-
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0
28+
uses: docker/login-action@v4
2929
with:
3030
registry: ghcr.io
3131
username: ${{ github.actor }}

.github/workflows/tests.yaml

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,28 +18,24 @@ jobs:
1818
runs-on: ubuntu-latest
1919
steps:
2020
- name: "Setup: checkout repository"
21-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
21+
uses: actions/checkout@v6
2222

2323
- name: "Setup: install uv"
24-
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
24+
uses: astral-sh/setup-uv@v7
2525
with:
2626
enable-cache: true
2727

28-
- name: "Setup: install dependencies"
29-
working-directory: ./api
30-
run: uv sync --locked
31-
3228
- name: "Run: pytest unit tests"
3329
working-directory: ./api
3430
run: uv run pytest --unit
3531

3632
api-integration-tests:
3733
runs-on: ubuntu-latest
3834
steps:
39-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
35+
- uses: actions/checkout@v6
4036

4137
- name: Login to image registry
42-
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0
38+
uses: docker/login-action@v4
4339
with:
4440
registry: ghcr.io
4541
username: ${{ github.actor }}
@@ -60,10 +56,10 @@ jobs:
6056
runs-on: ubuntu-latest
6157
if: ${{ false }} # disable for now as they do not currently work
6258
steps:
63-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
59+
- uses: actions/checkout@v6
6460

6561
- name: Login to image registry
66-
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0
62+
uses: docker/login-action@v4
6763
with:
6864
registry: ghcr.io
6965
username: ${{ github.actor }}
@@ -85,12 +81,12 @@ jobs:
8581
steps:
8682
# If you know your docs does not rely on anything outside of the documentation folder, the commented out code below can be used to only test the docs build if the documentation folder changes.
8783
- name: Checkout GitHub Action
88-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
84+
uses: actions/checkout@v6
8985
# with:
9086
# fetch-depth: 0
9187

9288
- name: Install uv
93-
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
89+
uses: astral-sh/setup-uv@v7
9490

9591
- name: Install dependencies and build website
9692
# if: steps.docs-changes.outputs.changes > 0

0 commit comments

Comments
 (0)