From b3eb6104e4c401332248323b81c108ce0b3ef833 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bendeg=C3=BAz=20Csirmaz?= Date: Wed, 15 Apr 2026 13:15:30 +0200 Subject: [PATCH] chore(dir-sdk-python): pin version to 1.2.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Bendegúz Csirmaz --- .github/ISSUE_TEMPLATE/bug_report.yml | 2 +- .github/workflows/ci.yaml | 20 ++++++++---- .github/workflows/reusable-release-sdk.yaml | 1 + .github/workflows/reusable-test-sdk.yaml | 12 +++---- CHANGELOG.md | 2 +- RELEASE.md | 35 +++++++++++++++++++++ Taskfile.deps.yml | 4 +-- Taskfile.test-env.yml | 4 +-- Taskfile.vars.yml | 4 +-- Taskfile.yml | 4 +-- examples/uv.lock | 2 +- pyproject.toml | 6 ++-- uv.lock | 14 ++++----- 13 files changed, 76 insertions(+), 34 deletions(-) create mode 100644 RELEASE.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index e85146e..0ef349f 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -30,7 +30,7 @@ body: If applicable, provide the version number or release tag where this issue was encountered options: - - v1.1.1 + - v1.2.1 default: 0 validations: required: false diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 403a918..14c381d 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -37,14 +37,14 @@ jobs: with: filters: | code: - - '!docs/**' - - '!README.md' - '!CHANGELOG.md' - - '!CONTRIBUTING.md' - '!CODE_OF_CONDUCT.md' - - '!SECURITY.md' + - '!CONTRIBUTING.md' - '!LICENSE.md' - '!MAINTAINERS.md' + - '!README.md' + - '!RELEASE.md' + - '!SECURITY.md' - '!.gitignore' - name: Determine result @@ -63,8 +63,15 @@ jobs: - changes uses: ./.github/workflows/reusable-test-sdk.yaml with: - image_repo: ghcr.io/agntcy - image_tag: ${{ github.sha }} + dir_chart_version: v1.2.0 + dirctl_image_tag: v1.2.0 + + release: + name: Release + if: ${{ startsWith(github.ref, 'refs/tags/') }} + needs: + - test + uses: ./.github/workflows/reusable-release-sdk.yaml success: name: Success @@ -72,6 +79,7 @@ jobs: needs: - changes - test + - release runs-on: ubuntu-latest steps: - name: Echo Success diff --git a/.github/workflows/reusable-release-sdk.yaml b/.github/workflows/reusable-release-sdk.yaml index 7243ab0..7ac4e29 100644 --- a/.github/workflows/reusable-release-sdk.yaml +++ b/.github/workflows/reusable-release-sdk.yaml @@ -4,6 +4,7 @@ name: Release SDK on: + workflow_call: workflow_dispatch: permissions: diff --git a/.github/workflows/reusable-test-sdk.yaml b/.github/workflows/reusable-test-sdk.yaml index 4a1db0e..cc1e3d4 100644 --- a/.github/workflows/reusable-test-sdk.yaml +++ b/.github/workflows/reusable-test-sdk.yaml @@ -6,14 +6,14 @@ name: Test SDK on: workflow_call: inputs: - image_repo: + dir_chart_version: required: true type: string - description: "Image repo to use." - image_tag: + description: "The version of the dir Helm chart to install for the tests." + dirctl_image_tag: required: true type: string - description: "Image tag to use." + description: "The tag of the dir-ctl Docker image to use in the tests." permissions: id-token: write @@ -47,7 +47,7 @@ jobs: - name: Test Python SDK env: - CHART_VERSION: "0.0.0-latest" - IMAGE_TAG: latest + DIR_CHART_VERSION: ${{ inputs.dir_chart_version }} + DIRCTL_IMAGE_TAG: ${{ inputs.dirctl_image_tag }} run: | task sdk:test:python diff --git a/CHANGELOG.md b/CHANGELOG.md index 37d3a6a..152ec28 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ [agntcy/dir]: https://github.com/agntcy/dir [agntcy/dir-sdk-python]: https://github.com/agntcy/dir-sdk-python -## 1.1.1 (2026-04-02) +## 1.2.1 (2026-04-15) ### Added diff --git a/RELEASE.md b/RELEASE.md new file mode 100644 index 0000000..add3080 --- /dev/null +++ b/RELEASE.md @@ -0,0 +1,35 @@ +# Release + +This document outlines the process of creating a new release +for the Directory Python SDK. + +## 1. Create a release branch + +Create a branch for the new release: + +1. Update the SDK version in: + - `pyproject.toml` + - `examples/pyproject.toml` + - `.github/ISSUE_TEMPLATE/bug_report.yml` +2. Update the dependencies if necessary: + - [agntcy-dir-grpc-python](https://buf.build/agntcy/dir/sdks/v1.2.0%3Agrpc/python?version=v1.78.0) (Buf SDK) + - [agntcy-dir-protocolbuffers-python](https://buf.build/agntcy/dir/sdks/v1.2.0%3Aprotocolbuffers/python?version=v34.0) (Buf SDK) + - `.github/workflows/ci.yaml` (dir & dir-ctl version) +3. Add an entry to `CHANGELOG.md` + +## 2. Create and push tags + +After the release branch is merged, update your main branch: + +```sh +git checkout main +git pull origin main +``` + +To trigger the release workflow, create and push the release tag +for the last commit: + +```sh +git tag -a v1.2.1 +git push origin v1.2.1 +``` diff --git a/Taskfile.deps.yml b/Taskfile.deps.yml index 358532a..602de86 100644 --- a/Taskfile.deps.yml +++ b/Taskfile.deps.yml @@ -88,8 +88,8 @@ tasks: internal: true run: once vars: - IMAGE_TAG: "{{ .IMAGE_TAG }}" + DIRCTL_IMAGE_TAG: "{{ .DIRCTL_IMAGE_TAG }}" preconditions: - which docker cmds: - - docker image pull ghcr.io/agntcy/dir-ctl:{{.IMAGE_TAG}} + - docker image pull ghcr.io/agntcy/dir-ctl:{{ .DIRCTL_IMAGE_TAG }} diff --git a/Taskfile.test-env.yml b/Taskfile.test-env.yml index 6fdde36..a0754d8 100644 --- a/Taskfile.test-env.yml +++ b/Taskfile.test-env.yml @@ -79,8 +79,7 @@ tasks: source /tmp/dir-htpasswd-creds.env {{ .HELM_BIN }} install dir oci://ghcr.io/agntcy/dir/helm-charts/dir \ - --version="{{ .CHART_VERSION }}" \ - --set apiserver.image.tag="{{ .IMAGE_TAG }}" \ + --version="{{ .DIR_CHART_VERSION }}" \ --set apiserver.image.pullSecrets="" \ --set apiserver.service.type="NodePort" \ --set apiserver.service.nodePort="{{.API_NODEPORT}}" \ @@ -100,7 +99,6 @@ tasks: {{ if .DIRECTORY_SERVER_RATELIMIT_PER_CLIENT_RPS }}--set apiserver.config.ratelimit.per_client_rps="{{ .DIRECTORY_SERVER_RATELIMIT_PER_CLIENT_RPS }}"{{ end }} \ {{ if .DIRECTORY_SERVER_RATELIMIT_PER_CLIENT_BURST }}--set apiserver.config.ratelimit.per_client_burst="{{ .DIRECTORY_SERVER_RATELIMIT_PER_CLIENT_BURST }}"{{ end }} \ {{ if .DIRECTORY_SERVER_OASF_API_VALIDATION_SCHEMA_URL }}--set apiserver.config.oasf_api_validation.schema_url="{{ .DIRECTORY_SERVER_OASF_API_VALIDATION_SCHEMA_URL }}"{{ end }} \ - --set apiserver.reconciler.image.tag="{{ .IMAGE_TAG }}" \ --set apiserver.reconciler.config.regsync.interval="10s" \ --set apiserver.reconciler.config.indexer.interval="10s" \ --set apiserver.reconciler.config.name.interval="5s" \ diff --git a/Taskfile.vars.yml b/Taskfile.vars.yml index 1fe5d0c..df54cb5 100644 --- a/Taskfile.vars.yml +++ b/Taskfile.vars.yml @@ -4,8 +4,8 @@ version: "3" vars: - CHART_VERSION: '{{ .CHART_VERSION | default "0.0.0-latest" }}' - IMAGE_TAG: '{{ .IMAGE_TAG | default "latest" }}' + DIR_CHART_VERSION: '{{ .DIR_CHART_VERSION | default "0.0.0-latest" }}' + DIRCTL_IMAGE_TAG: '{{ .DIRCTL_IMAGE_TAG | default "latest" }}' BIN_DIR: "{{ .ROOT_DIR }}/.bin" HELM_VERSION: "4.1.3" HELM_BIN: "{{ .BIN_DIR }}/helm-{{.HELM_VERSION}}" diff --git a/Taskfile.yml b/Taskfile.yml index 3a0be74..2f80d11 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -65,11 +65,11 @@ tasks: - defer: { task: sdk:test-env:delete } - task: sdk:test-env:create - | - export DIRCTL_IMAGE_TAG="{{ .IMAGE_TAG }}" + export DIRCTL_IMAGE_TAG="{{ .DIRCTL_IMAGE_TAG }}" export COSIGN_PATH="$(printf "%s" "${COSIGN_PATH:-{{ .COSIGN_BIN }}}")" # Run SDK tests - '{{.UV_BIN}}' run pytest + '{{ .UV_BIN }}' run pytest # Run SDK example to verify it works cd {{ .ROOT_DIR }}/examples diff --git a/examples/uv.lock b/examples/uv.lock index ba6e687..dbb7bb7 100644 --- a/examples/uv.lock +++ b/examples/uv.lock @@ -4,7 +4,7 @@ requires-python = ">=3.10" [[package]] name = "agntcy-dir" -version = "1.1.1" +version = "1.2.1" source = { editable = "../" } dependencies = [ { name = "agntcy-dir-grpc-python" }, diff --git a/pyproject.toml b/pyproject.toml index e5ee090..63de866 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,12 +1,12 @@ [project] name = "agntcy-dir" -version = "1.1.1" +version = "1.2.1" description = "Directory SDK" readme = "README.md" requires-python = ">=3.10" dependencies = [ - "agntcy-dir-grpc-python==1.78.0.1.20260319131759+f3a65f0dc151", - "agntcy-dir-protocolbuffers-python==34.0.0.1.20260319131759+f3a65f0dc151", + "agntcy-dir-grpc-python==1.78.0.1.20260413212701+cb1fb6353ac1", # v1.2.0 + "agntcy-dir-protocolbuffers-python==34.0.0.1.20260413212701+cb1fb6353ac1", # v1.2.0 "authlib>=1.6.9", "httpx>=0.28.1", "grpcio>=1.78.0", diff --git a/uv.lock b/uv.lock index 389ff6a..c37e8a2 100644 --- a/uv.lock +++ b/uv.lock @@ -4,7 +4,7 @@ requires-python = ">=3.10" [[package]] name = "agntcy-dir" -version = "1.1.1" +version = "1.2.1" source = { editable = "." } dependencies = [ { name = "agntcy-dir-grpc-python" }, @@ -25,8 +25,8 @@ dev = [ [package.metadata] requires-dist = [ - { name = "agntcy-dir-grpc-python", specifier = "==1.78.0.1.20260319131759+f3a65f0dc151" }, - { name = "agntcy-dir-protocolbuffers-python", specifier = "==34.0.0.1.20260319131759+f3a65f0dc151" }, + { name = "agntcy-dir-grpc-python", specifier = "==1.78.0.1.20260413212701+cb1fb6353ac1" }, + { name = "agntcy-dir-protocolbuffers-python", specifier = "==34.0.0.1.20260413212701+cb1fb6353ac1" }, { name = "authlib", specifier = ">=1.6.9" }, { name = "grpcio", specifier = ">=1.78.0" }, { name = "httpx", specifier = ">=0.28.1" }, @@ -43,7 +43,7 @@ dev = [ [[package]] name = "agntcy-dir-grpc-python" -version = "1.78.0.1.20260319131759+f3a65f0dc151" +version = "1.78.0.1.20260413212701+cb1fb6353ac1" source = { registry = "https://buf.build/gen/python" } dependencies = [ { name = "agntcy-dir-protocolbuffers-python" }, @@ -51,7 +51,7 @@ dependencies = [ { name = "grpcio" }, ] wheels = [ - { url = "https://buf.build/gen/python/agntcy-dir-grpc-python/agntcy_dir_grpc_python-1.78.0.1.20260319131759+f3a65f0dc151-py3-none-any.whl", upload-time = "2026-03-19T13:17:59Z" }, + { url = "https://buf.build/gen/python/agntcy-dir-grpc-python/agntcy_dir_grpc_python-1.78.0.1.20260413212701+cb1fb6353ac1-py3-none-any.whl", upload-time = "2026-04-13T21:27:01Z" }, ] [[package]] @@ -69,7 +69,7 @@ wheels = [ [[package]] name = "agntcy-dir-protocolbuffers-python" -version = "34.0.0.1.20260319131759+f3a65f0dc151" +version = "34.0.0.1.20260413212701+cb1fb6353ac1" source = { registry = "https://buf.build/gen/python" } dependencies = [ { name = "agntcy-dir-protocolbuffers-pyi" }, @@ -77,7 +77,7 @@ dependencies = [ { name = "protobuf" }, ] wheels = [ - { url = "https://buf.build/gen/python/agntcy-dir-protocolbuffers-python/agntcy_dir_protocolbuffers_python-34.0.0.1.20260319131759+f3a65f0dc151-py3-none-any.whl", upload-time = "2026-03-19T13:17:59Z" }, + { url = "https://buf.build/gen/python/agntcy-dir-protocolbuffers-python/agntcy_dir_protocolbuffers_python-34.0.0.1.20260413212701+cb1fb6353ac1-py3-none-any.whl", upload-time = "2026-04-13T21:27:01Z" }, ] [[package]]