Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#513] Release 2.5.0 #514

Closed
wants to merge 65 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
21c1686
:construction_worker: add check OAF version action
Coperh Sep 3, 2024
6f66b35
:bug: [open-zaak/open-zaak#1780] Fix setting NOTIFICATIONS_DISABLED v…
stevenbal Sep 19, 2024
9de79f1
Merge pull request #443 from maykinmedia/feature/dependabot-autoupdate
Coperh Sep 24, 2024
5f74eee
Merge pull request #452 from maykinmedia/issue/notifications-disabled…
annashamray Sep 24, 2024
693d03c
:memo: update CHANGELOG with the forgotten change
annashamray Sep 24, 2024
f517900
Merge pull request #455 from maykinmedia/docs/update-changelog
joeribekker Sep 24, 2024
c465f53
:bug:[#449] support objecttypes API with pagination
Coperh Sep 24, 2024
439a9db
:wrench:[maykinmedia/open-api-framework#68] fix CSP errors
Coperh Sep 27, 2024
36f9c6f
:white_check_mark:[#449] change permission tests
Coperh Sep 27, 2024
e9a69ef
Merge pull request #454 from maykinmedia/feature/449-Permission-admin…
Coperh Sep 27, 2024
c15efcc
:wrench:[maykinmedia/open-api-framework#68] fix CSP errors
Coperh Sep 27, 2024
72712d3
:construction_worker: check OAF version on PRs
Coperh Oct 1, 2024
bc7aed7
Merge pull request #458 from maykinmedia/feature/oaf-68-csp-errors
Coperh Oct 1, 2024
40b71d2
:arrow_up: update pip tools
Coperh Oct 1, 2024
97f1424
Disable trivy image scan (#465)
SonnyBA Oct 4, 2024
7060252
Merge pull request #460 from maykinmedia/feature/check-oaf-on-pr
Coperh Oct 8, 2024
d565591
[#13] reuse open-api-workflows workflows (#447)
SonnyBA Oct 17, 2024
bd8f5a9
:arrow_up: [https://github.com/maykinmedia/open-api-framework/issues/…
annashamray Nov 25, 2024
d99401b
Add test to illustrate expected validation on object PATCH
swrichards Oct 9, 2024
7765330
:memo: [#403] Document Notificaties API retry behavior
stevenbal Oct 24, 2024
1988898
:recycle: [https://github.com/maykinmedia/open-api-framework/issues/6…
annashamray Nov 25, 2024
de30a6c
:bug: [#466] fix validation for merge PATCH
annashamray Oct 29, 2024
a194581
Merge pull request #468 from maykinmedia/issue/403-document-notificat…
stevenbal Oct 31, 2024
bd6e269
:test_tube: [#472] add regression tests if filter with icontains have…
annashamray Nov 29, 2024
2d2c797
:arrow_up: [https://github.com/maykinmedia/open-api-framework/issues/…
annashamray Nov 29, 2024
b770657
:arrow_up: update OAF to 0.9.0
Coperh Nov 15, 2024
a1bea2f
Merge pull request #469 from maykinmedia/issue/466-merge-patch
annashamray Nov 7, 2024
5bcb23a
:sparkles: [#472] add 'data_attr' query param
annashamray Dec 11, 2024
9c0f404
:ok_hand: [https://github.com/maykinmedia/open-api-framework/issues/6…
annashamray Nov 29, 2024
d0c6801
Merge pull request #476 from maykinmedia/update/oaf-0.9.0
Coperh Nov 18, 2024
ebfae92
:construction_worker: [#472] update OAS check GH workflow
annashamray Dec 12, 2024
c338307
Merge pull request #478 from maykinmedia/deps/zgw-consumers
annashamray Nov 29, 2024
e3f00f6
:memo: [#472] update OAS with 'data_attr' filter
annashamray Dec 12, 2024
dd54724
Bump open-api-framework to 0.9.1
swrichards Dec 18, 2024
5bd4a93
[#484] Notification channel setup config (#491)
SonnyBA Dec 13, 2024
4ab2875
:green_heart: [#472] fix new filter field widget
annashamray Dec 12, 2024
c2d5412
Regenerate envvar docs
swrichards Dec 18, 2024
91bb536
[#467] Setup objecttypes through django-setup-configuration (#492)
SonnyBA Dec 13, 2024
ed86dad
:sparkles: [#472] add validation for 'data_attr' filter
annashamray Dec 12, 2024
248aa21
[#495] Add envsubst to Docker deps
swrichards Dec 16, 2024
b97f3e4
[#483] add support for mozilla django OIDC db config (#490)
SonnyBA Dec 13, 2024
327735c
:white_check_mark: [#472] add more tests for 'data_attr' filter
annashamray Dec 12, 2024
8d3d5b6
Merge pull request #496 from maykinmedia/495-add-envsubst-to-docker-deps
swrichards Dec 18, 2024
030b012
:ok_hand: [#472] process PR feedback
annashamray Dec 18, 2024
e674625
[#485] tokenauth setup configuration (#494)
danielmursa-dev Dec 19, 2024
732a52a
Merge pull request #488 from maykinmedia/feature/472-data-attr-contai…
annashamray Dec 19, 2024
541a798
:construction_worker: [#501] Make sure docs are built in CI
stevenbal Dec 19, 2024
deda664
Feature/486 token permissions configuration (#497)
danielmursa-dev Dec 19, 2024
e933038
:construction_worker: [maykinmedia/open-api-framework#92] Ensure late…
stevenbal Dec 19, 2024
c7d1c73
Merge pull request #502 from maykinmedia/issue/fix-docs-build
swrichards Dec 19, 2024
1e3187d
:construction_worker: [#504] Pin to v3.0.1 of publish workflow
stevenbal Dec 20, 2024
c100246
Merge pull request #504 from maykinmedia/issue/fix-docker-latest-push
swrichards Dec 19, 2024
386dc08
:wrench: [maykinmedia/open-api-framework#81] Switch from pip-compile …
stevenbal Jan 2, 2025
e096bbf
:construction_worker: [maykinmedia/objects-api#463] Add trivy image scan
stevenbal Dec 24, 2024
78fa25c
Merge pull request #505 from maykinmedia/feature/pin-ci-job-to-version
stevenbal Dec 20, 2024
64b4a3e
:arrow_up: [maykinmedia/open-api-framework#93] Security updates
stevenbal Jan 2, 2025
12714bd
Merge pull request #506 from maykinmedia/feature/re-enable-trivy
stevenbal Dec 24, 2024
a9ca4fe
Update cryptography
SonnyBA Jan 8, 2025
9412723
:construction_worker: add OAF auto-update action
Coperh Jan 3, 2025
cac2ce2
Merge pull request #507 from maykinmedia/issue/security-updates
stevenbal Jan 3, 2025
c4c9c5b
Update NPM dependencies
SonnyBA Jan 8, 2025
5aff969
Merge pull request #511 from maykinmedia/feature/oaf-auto-update-action
Coperh Jan 6, 2025
50327f2
Merge pull request #515 from maykinmedia/security-updates
joeribekker Jan 8, 2025
ac66596
[#513] Update changelog & README
SonnyBA Jan 8, 2025
6edb01f
[#513] bump version for various files
SonnyBA Jan 8, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[bumpversion]
commit = False
tag = False
current_version = 2.4.3
current_version = 2.5.0

[bumpversion:file:README.rst]

Expand Down
161 changes: 37 additions & 124 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,26 +29,12 @@ jobs:

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- name: Set up backend environment
uses: maykinmedia/[email protected]
with:
apt-packages: 'libgdal-dev gdal-bin'
python-version: '3.11'
- uses: actions/setup-node@v4
with:
node-version: '18'

- name: Install system packages
run: |
sudo apt-get update \
&& sudo apt-get install -y --no-install-recommends \
libgdal-dev \
gdal-bin

- name: Install dependencies
run: pip install -r requirements/ci.txt codecov
- name: Build frontend
run: |
npm ci
npm run build
setup-node: true

- name: Run tests
run: |
Expand All @@ -61,27 +47,21 @@ jobs:
DB_PASSWORD: ''

- name: Publish coverage report
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4

docs:
runs-on: ubuntu-latest
name: Documentation build

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- name: Set up backend environment
uses: maykinmedia/[email protected]
with:
apt-packages: 'libgdal-dev gdal-bin'
python-version: '3.11'
cache: 'pip'
cache-dependency-path: 'requirements/*.txt'
- name: Install system packages
run: |
sudo apt-get update \
&& sudo apt-get install -y --no-install-recommends \
libgdal-dev \
gdal-bin
- name: Install dependencies
run: pip install -r requirements/ci.txt pytest
setup-node: false

- name: Generate environment variable documentation using OAf and check if it was updated
run: |
bin/generate_envvar_docs.sh
Expand All @@ -94,104 +74,37 @@ jobs:
env:
DJANGO_SETTINGS_MODULE: objects.conf.ci

docker:
needs: tests

name: Build (and push) Docker image
store-reusable-workflow-vars:
name: create values which can be passed through a reusable workflow
runs-on: ubuntu-latest
outputs:
image-name: ${{ steps.image-name.outputs.image-name }}

steps:
- uses: actions/checkout@v4

- name: Set tag
id: vars
run: |
# Strip git ref prefix from version
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
- run: echo "image-name=$IMAGE_NAME" >> $GITHUB_OUTPUT
name: 'Store the docker image name'
id: image-name

# Strip "v" prefix from tag name (if present at all)
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')

# Use Docker `latest` tag convention
[ "$VERSION" == "master" ] && VERSION=latest

echo ::set-output name=tag::${VERSION}

- name: Build the Docker image
env:
RELEASE_VERSION: ${{ steps.vars.outputs.tag }}
run: docker build . --tag $IMAGE_NAME:$RELEASE_VERSION

- run: docker image save -o image.tar $IMAGE_NAME:${{ steps.vars.outputs.tag }}

- name: Store image artifact
uses: actions/upload-artifact@v3
with:
name: docker-image
path: image.tar
retention-days: 1

image_scan:
runs-on: ubuntu-latest
name: Scan docker image
open-api-ci:
uses: maykinmedia/open-api-workflows/.github/workflows/[email protected]
needs:
- docker

steps:
- name: Download built image
uses: actions/download-artifact@v3
with:
name: docker-image
- name: Scan image with Trivy
uses: aquasecurity/trivy-action@master
with:
input: /github/workspace/image.tar # from download-artifact
format: 'sarif'
output: 'trivy-results-docker.sarif'
ignore-unfixed: true
- name: Upload results to GH Security tab
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: 'trivy-results-docker.sarif'

publish:
- store-reusable-workflow-vars
with:
main-branch: 'master'
run-docs: true
django-settings-module: objects.conf.ci
python-version: '3.11'
docker-image-name: ${{ needs.store-reusable-workflow-vars.outputs.image-name }}

open-api-publish:
uses: maykinmedia/open-api-workflows/.github/workflows/[email protected]
needs:
- store-reusable-workflow-vars
- open-api-ci
- tests
- docker

name: Push Docker image
runs-on: ubuntu-latest
if: github.event_name == 'push' # exclude PRs

steps:
- uses: actions/checkout@v4
- name: Download built image
uses: actions/download-artifact@v3
with:
name: docker-image

- name: Determine tag
id: vars
run: |
# Strip git ref prefix from version
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')

# Strip "v" prefix from tag name (if present at all)
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')

# Use Docker `latest` tag convention
[ "$VERSION" == "master" ] && VERSION=latest

echo ::set-output name=tag::${VERSION}

- name: Load image
run: |
docker image load -i image.tar

- name: Log into registry
run: echo "${{ secrets.DOCKER_TOKEN }}" | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin

- name: Push the Docker image
env:
RELEASE_VERSION: ${{ steps.vars.outputs.tag }}
run: docker push $IMAGE_NAME:$RELEASE_VERSION
with:
docker-image-name: ${{ needs.store-reusable-workflow-vars.outputs.image-name }}
repository-owner: 'maykinmedia'
secrets:
docker-username: ${{ secrets.DOCKER_USERNAME }}
docker-token: ${{ secrets.DOCKER_TOKEN }}
94 changes: 21 additions & 73 deletions .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
@@ -1,77 +1,25 @@
name: code-quality

on: [push]
on:
push:
branches:
- master
paths:
- '**.py'
- '**.yml'
pull_request:
paths:
- '**.py'
- '**.yml'
workflow_dispatch:

jobs:
isort:
name: Check import sorting
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- uses: isort/isort-action@v1
with:
requirementsFiles: requirements/dev.txt
sortPaths: "src docs"
configuration: '--check-only --diff'

black:
name: Check code formatting with black
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: |
pip install -r requirements/dev.txt
- name: Run black
run: |
black --check src docs

oas-up-to-date:
name: Check for unexepected OAS changes
runs-on: ubuntu-latest
strategy:
matrix:
version: ['v1', 'v2']
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- uses: actions/setup-node@v4
with:
node-version: '18'

- name: Install system packages
run: |
sudo apt-get update \
&& sudo apt-get install -y --no-install-recommends \
libgdal-dev \
gdal-bin

- name: Install dependencies
run: pip install -r requirements/ci.txt

- name: Generate OAS files
run: ./bin/generate_schema.sh ${{ matrix.version }} openapi-${{ matrix.version }}.yaml
env:
DJANGO_SETTINGS_MODULE: objects.conf.ci

- name: Check for OAS changes
run: |
diff openapi-${{ matrix.version }}.yaml src/objects/api/${{ matrix.version }}/openapi.yaml
- name: Write failure markdown
if: ${{ failure() }}
run: |
echo 'Run the following command locally and commit the changes' >> $GITHUB_STEP_SUMMARY
echo '' >> $GITHUB_STEP_SUMMARY
echo '```bash' >> $GITHUB_STEP_SUMMARY
echo './bin/generate_schema.sh ${{ matrix.version }}' >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
open-api-workflow-code-quality:
uses: maykinmedia/open-api-workflows/.github/workflows/code-quality.yml@v1
with:
apt-packages: 'libgdal-dev gdal-bin'
python-version: '3.11'
node-version: '18'
postgres-image: 'postgis/postgis:12-2.5'

django-settings-module: 'objects.conf.ci'
51 changes: 2 additions & 49 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,52 +21,5 @@ on:
- cron: '36 0 * * 0'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'javascript', 'python' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
- name: Checkout repository
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality


# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
open-api-workflow-code-analysis:
uses: maykinmedia/open-api-workflows/.github/workflows/code-analysis.yml@v1
26 changes: 8 additions & 18 deletions .github/workflows/generate-postman-collection.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,13 @@ on:
workflow_dispatch:

jobs:
run:
runs-on: ubuntu-latest
open-api-workflow-generate-postman-collection:
uses: maykinmedia/open-api-workflows/.github/workflows/generate-postman-collection.yml@v1
strategy:
matrix:
version: ['v1', 'v2']

name: Run with version ${{ matrix.version }}

steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
- name: Install dependencies
run: npm install -g openapi-to-postmanv2
- name: Create tests folder
run: mkdir -p ./tests/postman
- name: Generate Postman collection
run: openapi2postmanv2 -s ./src/objects/api/${{ matrix.version }}/openapi.yaml -o ./tests/postman/collection.json --pretty
version:
- v2
- v1
with:
node-version: '18'
schema-path: 'src/objects/api/${{ matrix.version }}/openapi.yaml'
Loading
Loading