diff --git a/.github/workflows/docker-image.yaml b/.github/workflows/docker-image.yaml index 76fda20..4d344a6 100644 --- a/.github/workflows/docker-image.yaml +++ b/.github/workflows/docker-image.yaml @@ -1,15 +1,11 @@ name: Docker Image -# This workflow runs automatically when -# - a commit is made to the main branch, or -# - a tag is pushed. +# This workflow runs automatically when a tag is pushed. # Alternatively, the workflow can be manually triggerred on GitHub (UI). on: workflow_dispatch: push: - branches: - - main tags: - "*" @@ -47,7 +43,7 @@ jobs: # (type=sha rule has lower priority than type=ref.) tags: | type=semver,event=tag,pattern={{version}} - type=sha,event=branch,prefix=${{ github.ref_name }}-,format=short + type=sha,event=workflow_dispatch,prefix=${{ github.ref_name }}-,format=short - name: Build and push the Docker image uses: docker/build-push-action@v6 with: diff --git a/config/beacon-aggregated.yaml b/config/beacon-aggregated.yaml index 6766041..420af09 100644 --- a/config/beacon-aggregated.yaml +++ b/config/beacon-aggregated.yaml @@ -4,7 +4,6 @@ base_path: /beacon/aggregated/v2 info: id: org.example.aggregated.beacon.v2 name: GDI Aggregated Beacon API - version: v0.9.0 environment: dev # choices: dev, test, staging, prod # The following are all OPTIONAL: diff --git a/config/beacon-sensitive.yaml b/config/beacon-sensitive.yaml index f2b7ac1..88296f0 100644 --- a/config/beacon-sensitive.yaml +++ b/config/beacon-sensitive.yaml @@ -4,7 +4,6 @@ base_path: /beacon/sensitive/v2 info: id: org.example.sensitive.beacon.v2 name: GDI Sensitive Beacon API - version: v0.9.0 environment: dev # choices: dev, test, staging, prod # The following are all OPTIONAL: diff --git a/mini_node/beacon/config.py b/mini_node/beacon/config.py index 75e52f0..8b67f61 100644 --- a/mini_node/beacon/config.py +++ b/mini_node/beacon/config.py @@ -16,7 +16,6 @@ class BeaconInfoConfig(BaseModel): model_config = ConfigDict(extra='forbid') id: str name: str - version: str environment: BeaconEnvironment description: str | None = None alternativeUrl: HttpUrl | None = None diff --git a/mini_node/beacon/setup.py b/mini_node/beacon/setup.py index bda3865..e537867 100644 --- a/mini_node/beacon/setup.py +++ b/mini_node/beacon/setup.py @@ -35,7 +35,7 @@ BeaconServiceInfoOrganization, ) from ..oidc import OidcVerifier -from ..setup import encode_basic_credential +from ..setup import app_version, encode_basic_credential """Here are the prepared responses for the Beacon Framework API.""" @@ -63,7 +63,7 @@ def create_beacon_info(context: BeaconContext, base_url: str) -> BeaconInfo: logoUrl=organisation.logoUrl, ), description=info.description, - version=info.version, + version=f"v{app_version}", welcomeUrl=base_path, alternativeUrl=info.alternativeUrl, createDateTime=info.createdAt, @@ -95,7 +95,7 @@ def create_service_info(context: BeaconContext) -> ServiceInfo: createdAt=info.createdAt, updatedAt=info.updatedAt, environment=info.environment, - version=info.version, + version=f"v{app_version}", ) diff --git a/mini_node/data/s3.py b/mini_node/data/s3.py index 2d18f05..038a953 100644 --- a/mini_node/data/s3.py +++ b/mini_node/data/s3.py @@ -215,8 +215,8 @@ def observe(self, stop_signal: threading.Event) -> None: if local_path.exists(): self._remove_file(local_path) - except S3Error as exc: + except Exception as exc: _log.error("S3 event-listener error: %s", exc) - time.sleep(2) + time.sleep(60) _log.info("S3 event observer stopped")