Skip to content

Commit e313fc3

Browse files
committed
chore: forward-port release-1.3
Signed-off-by: Francesco Noacco <francesco.noacco@secomind.com>
2 parents 98a0284 + ff816f3 commit e313fc3

File tree

115 files changed

+6283
-257
lines changed

Some content is hidden

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

115 files changed

+6283
-257
lines changed

.github/codecov.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ coverage:
2020
- astarte_data_access
2121
- astarte_events
2222
- astarte_generators
23+
- astarte_data_access_generators
2324
- astarte_rpc
2425
- astarte_fdo
2526
- astarte_fdo_core
@@ -82,6 +83,10 @@ flags:
8283
carryforward: true
8384
paths:
8485
- libs/astarte_generators
86+
astarte_data_access_generators:
87+
carryforward: true
88+
paths:
89+
- libs/astarte_data_access_generators
8590
astarte_rpc:
8691
carryforward: true
8792
paths:

.github/workflows/astarte-end-to-end-test-workflow.yaml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,6 @@
11
name: Astarte end-to-end test
22

33
on:
4-
# Run when pushing to stable branches
5-
push:
6-
paths:
7-
- "apps/**"
8-
- "tools/astarte_e2e/**"
9-
- ".github/workflows/astarte-end-to-end-test-workflow.yaml"
10-
- ".github/workflows/astarte-build-workflow.yaml"
11-
branches:
12-
- "master"
13-
- "release-*"
144
# Run on branch/tag creation
155
create:
166
# Run on pull requests matching apps

.github/workflows/astarte-libs-workflow.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ jobs:
4242
with:
4343
lib: "astarte_generators"
4444
secrets: inherit
45+
astarte_data_access_generators:
46+
uses: ./.github/workflows/astarte-libs-build-workflow.yaml
47+
with:
48+
lib: "astarte_data_access_generators"
49+
secrets: inherit
4550
astarte_fdo:
4651
uses: ./.github/workflows/astarte-libs-build-workflow.yaml
4752
with:

.github/workflows/docs-workflow.yaml

Lines changed: 56 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,11 @@ on:
55
paths:
66
# Documentation pages
77
- "doc/**"
8-
# Swagger files
9-
- "apps/*/priv/static/*.yaml"
8+
# API sources used to generate OpenAPI specs
9+
- "apps/astarte_appengine_api/**"
10+
- "apps/astarte_housekeeping/**"
11+
- "apps/astarte_pairing/**"
12+
- "apps/astarte_realm_management/**"
1013
# The action itself
1114
- ".github/workflows/docs-workflow.yaml"
1215
branches:
@@ -17,13 +20,63 @@ on:
1720
create:
1821

1922
jobs:
23+
generate_openapi_specs:
24+
runs-on: ubuntu-22.04
25+
strategy:
26+
fail-fast: false
27+
matrix:
28+
app:
29+
- name: astarte_appengine_api
30+
spec: Astarte.AppEngine.APIWeb.ApiSpec
31+
filename: astarte_appengine_api.yaml
32+
- name: astarte_housekeeping
33+
spec: Astarte.HousekeepingWeb.ApiSpec
34+
filename: astarte_housekeeping_api.yaml
35+
- name: astarte_pairing
36+
spec: Astarte.PairingWeb.ApiSpec
37+
filename: astarte_pairing.yaml
38+
- name: astarte_realm_management
39+
spec: Astarte.RealmManagementWeb.ApiSpec
40+
filename: astarte_realm_management.yaml
41+
42+
steps:
43+
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2
44+
- name: Generate ${{ matrix.app.name }} OpenAPI spec
45+
uses: team-alembic/staple-actions/actions/mix-task@a74b3b61209d35d45526df174766632f8aee03ed
46+
with:
47+
working-directory: apps/${{ matrix.app.name }}
48+
mix-env: test
49+
task: >-
50+
openapi.spec.yaml
51+
--spec ${{ matrix.app.spec }}
52+
--start-app=false
53+
--vendor-extensions=false
54+
${{ matrix.app.filename }}
55+
- name: Upload ${{ matrix.app.name }} artifact
56+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
57+
with:
58+
name: ${{ matrix.app.name }}-openapi-spec
59+
path: apps/${{ matrix.app.name }}/${{ matrix.app.filename }}
60+
if-no-files-found: error
61+
retention-days: 1
62+
2063
docs:
64+
needs:
65+
- generate_openapi_specs
2166
runs-on: ubuntu-22.04
2267
steps:
2368
# Checkout the source
2469
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2
2570
with:
2671
path: astarte
72+
- name: Make .tool-versions available for staple-actions
73+
run: cp astarte/.tool-versions .
74+
- name: Download OpenAPI specs
75+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
76+
with:
77+
path: ./astarte/generated-openapi
78+
pattern: "*-openapi-spec"
79+
merge-multiple: true
2780
# Checkout the docs repository
2881
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2
2982
with:
@@ -51,6 +104,7 @@ jobs:
51104
export DOCS_DIRNAME="astarte/$(echo ${{ github.ref }} | sed 's,refs/heads/,,' | sed 's/master/snapshot/g' | sed 's/release-//g')"
52105
mkdir docs/$DOCS_DIRNAME/api
53106
cp swagger-ui/dist/* docs/$DOCS_DIRNAME/api
107+
cp astarte/generated-openapi/*.yaml docs/$DOCS_DIRNAME/api/
54108
rm docs/$DOCS_DIRNAME/api/index.html
55109
cp astarte/doc/swagger-ui-index.html docs/$DOCS_DIRNAME/api/index.html
56110
- name: Commit files

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
77

88
## Unreleased
99

10+
## [1.3.0-rc.2] - 2026-04-08
11+
12+
### Added
13+
14+
- [astarte_realm_management] realm migrations now create vhost for amqp triggers
15+
1016
### Changed
1117

1218
- [astarte_pairing] FDO feature is enabled for all installations, removed environment variable `PAIRING_ENABLE_FDO`.
@@ -131,6 +137,14 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
131137
- [astarte_data_updater_plant] Correctly encode values when sending properties to device on connection
132138
- [astarte_realm_management] Allow to delete long-disconnected devices. For this to work, Realm Management needs `CLUSTERING_STRATEGY`, `CLUSTERING_KUBERNETES_NAMESPACE` and `DATA_UPDATER_PLANT_CLUSTERING_KUBERNETES_SELECTOR` to be set, just like AppEngine and DUP. Refer to 1.2.1-rc.0 for additional information on the variables.
133139

140+
## [1.2.2-rc.0] - 2026-04-08
141+
142+
### Fixed
143+
144+
- [astarte_data_updater_plant] Increase device process resiliency: avoid restarting the whole supervision tree when one device/amqp connection crashes
145+
- [astarte_housekeeping] Fix crashes in migrator
146+
- [astarte_realm_management] Fix corner case during for the installation of interfaces without data retention ttl
147+
134148
## [1.2.1] - 2026-03-12
135149

136150
### Fixed

Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,6 @@ COPY --from=builder --chown=nobody:nogroup /app/_build/$BUILD_ENV/rel/$SERVICE .
7575
# Change to non-root user
7676
USER nobody
7777

78+
HEALTHCHECK CMD "./bin/healthcheck"
79+
7880
CMD $SERVICE_CMD
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[
2-
import_deps: [:phoenix, :ecto, :skogsra, :stream_data, :astarte_generators],
2+
import_deps: [:phoenix, :ecto, :skogsra, :stream_data, :astarte_generators, :open_api_spex],
33
inputs: ["{mix,.formatter}.exs", "{config,lib,test}/**/*.{ex,exs}"]
44
]

apps/astarte_appengine_api/lib/astarte_appengine_api/health.ex

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,29 @@ defmodule Astarte.AppEngine.API.Health do
2121
Health check module for Data Updater Plant service
2222
"""
2323

24-
alias Astarte.DataAccess.Health.Health, as: DatabaseHealth
24+
alias Astarte.AppEngine.API.Health
25+
alias Astarte.DataAccess.Health, as: DatabaseHealth
2526

2627
require Logger
2728

29+
@doc """
30+
Gets the backend health, and raises if it's not healthy.
31+
"""
32+
def rpc_healthcheck do
33+
case Health.get_health() do
34+
:ready -> :ok
35+
:degraded -> :ok
36+
other -> raise RuntimeError, to_string(other)
37+
end
38+
end
39+
2840
@doc """
2941
Gets the backend health.
3042
"""
3143
def get_health do
32-
with :ready <- database_health(),
44+
with :ready <- dup_health(),
3345
:ready <- vernemq_health() do
34-
dup_health()
46+
database_health()
3547
end
3648
end
3749

0 commit comments

Comments
 (0)