Skip to content

Commit d371beb

Browse files
authored
Merge branch 'master' into dependabot/npm_and_yarn/ui/webpack-dev-server-5.2.1
2 parents 5c6d955 + e70f579 commit d371beb

File tree

117 files changed

+4961
-3309
lines changed

Some content is hidden

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

117 files changed

+4961
-3309
lines changed

.codespellignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
rackit

.github/workflows/helm-lint.yaml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# NOTE: This workflow can be run locally using https://github.com/nektos/act with:
2+
# act -W .github/workflows/helm-lint.yaml workflow_call -s GITHUB_TOKEN=$(gh auth token)
3+
name: Helm Lint
4+
on:
5+
# For manual testing
6+
workflow_dispatch:
7+
8+
workflow_call:
9+
inputs:
10+
ref:
11+
type: string
12+
description: The Git ref under test.
13+
required: true
14+
15+
jobs:
16+
lint:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v4
21+
with:
22+
ref: ${{ inputs.ref }}
23+
fetch-depth: 0
24+
25+
- name: Set up Helm
26+
uses: azure/setup-helm@v4
27+
with:
28+
version: v3.15.3
29+
30+
- name: Set up chart-testing
31+
uses: helm/chart-testing-action@v2
32+
33+
- name: Run chart-testing (lint)
34+
run: |-
35+
ct lint \
36+
--print-config \
37+
--lint-conf lintconf.yaml \
38+
--target-branch ${{ github.event.repository.default_branch }} \
39+
--charts chart/ \
40+
--validate-maintainers=false
41+
42+
- name: Run template validation
43+
run: |-
44+
helm template foo chart \
45+
-f chart/tests/values_test_overrides.yaml \
46+
| docker run -i --rm ghcr.io/yannh/kubeconform:latest \
47+
--strict --summary
48+
49+
- name: Run manifest snapshot test
50+
run: docker run -i --rm -v $(pwd):/apps helmunittest/helm-unittest chart

.github/workflows/test-pr.yaml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,18 @@ concurrency:
1818
cancel-in-progress: true
1919

2020
jobs:
21+
# Run the unit tests on every PR, even from external repos
22+
unit_tests:
23+
uses: ./.github/workflows/tox.yaml
24+
with:
25+
ref: ${{ github.event.pull_request.head.sha }}
26+
27+
# Run the chart linting on every PR, even from external repos
28+
lint:
29+
uses: ./.github/workflows/helm-lint.yaml
30+
with:
31+
ref: ${{ github.event.pull_request.head.sha }}
32+
2133
# This job exists so that PRs from outside the main repo are rejected
2234
fail_on_remote:
2335
runs-on: ubuntu-latest
@@ -26,7 +38,7 @@ jobs:
2638
run: exit ${{ github.event.pull_request.head.repo.full_name == 'azimuth-cloud/azimuth' && '0' || '1' }}
2739

2840
publish_artifacts:
29-
needs: [fail_on_remote]
41+
needs: [unit_tests, lint, fail_on_remote]
3042
uses: ./.github/workflows/build-push-artifacts.yaml
3143
with:
3244
ref: ${{ github.event.pull_request.head.sha }}

.github/workflows/tox.yaml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Tox unit tests
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
ref:
7+
type: string
8+
description: The ref to build.
9+
required: true
10+
11+
jobs:
12+
build:
13+
name: Tox unit tests and linting
14+
runs-on: ubuntu-latest
15+
strategy:
16+
matrix:
17+
python-version: ['3.12']
18+
19+
steps:
20+
- name: Check out the repository
21+
uses: actions/checkout@v4
22+
with:
23+
ref: ${{ inputs.ref || github.ref }}
24+
25+
- name: Set up Python ${{ matrix.python-version }}
26+
uses: actions/setup-python@v5
27+
with:
28+
python-version: ${{ matrix.python-version }}
29+
30+
- name: Install dependencies
31+
run: |
32+
python -m pip install --upgrade pip
33+
python -m pip install tox
34+
35+
- name: Test with tox
36+
run: tox
37+
38+
- name: Generate coverage reports
39+
run: tox -e cover
40+
41+
- name: Archive code coverage results
42+
uses: actions/upload-artifact@v4
43+
with:
44+
name: "code-coverage-report-${{ matrix.python-version }}"
45+
path: cover/

.stestr.conf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[DEFAULT]
2+
test_path=./api/tests
3+
top_dir=./

CODEOWNERS

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
* @azimuth-cloud/azimuth-core-developers
1+
# Default owner for all files unless otherwise specified
2+
* @azimuth-cloud/azimuth-release-managers

CONTRIBUTING.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Contributing
2+
3+
We welcome contributions and suggestions for improvements to this code base.
4+
Please check for relevant issues and PRs before opening a new one of your own.
5+
6+
## Making a contribution
7+
8+
### Helm template snapshots
9+
10+
The CI in this repository uses the Helm
11+
[unittest](https://github.com/helm-unittest/helm-unittest) plugin's
12+
snapshotting functionality to check PRs for changes to the templated manifests.
13+
Therefore, if your PR makes changes to the manifest templates or values, you
14+
will need to update the saved snapshots to allow your changes to pass the
15+
automated tests. The easiest way to do this is to run the helm unittest command
16+
inside a docker container from the repo root.
17+
18+
```
19+
docker run -i --rm -v $(pwd):/apps helmunittest/helm-unittest chart -u
20+
```
21+
22+
where the `-u` option is used to update the existing snapshots.

api/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ubuntu:jammy AS python-builder
1+
FROM ubuntu:24.04 AS python-builder
22

33
RUN apt-get update && \
44
apt-get install -y git python3 python3-venv && \
@@ -16,7 +16,7 @@ COPY . /app
1616
RUN /venv/bin/pip install -e /app
1717

1818

19-
FROM ubuntu:jammy
19+
FROM ubuntu:24.04
2020

2121
# Don't buffer stdout and stderr as it breaks realtime logging
2222
ENV PYTHONUNBUFFERED 1

api/azimuth/acls/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
from .acls import allowed_by_acls
1+
from .acls import allowed_by_acls # noqa: F401

api/azimuth/acls/acls.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import re
21
import logging
2+
import re
33

44
LOG = logging.getLogger(__name__)
55

@@ -61,6 +61,5 @@ def allowed_by_acls(raw, tenancy):
6161

6262
# If either 'allow' annotation is present and non-empty then default to deny
6363
return not (
64-
annotations.get(ACL_ALLOW_IDS_KEY) or
65-
annotations.get(ACL_ALLOW_PATTERN_KEY)
64+
annotations.get(ACL_ALLOW_IDS_KEY) or annotations.get(ACL_ALLOW_PATTERN_KEY)
6665
)

0 commit comments

Comments
 (0)