Skip to content

Commit b14477f

Browse files
authored
ci: renovate for dependency management (#1311)
Progressive update of dependencies to allow renovate to work effectively. This commit is necessary because dependency `prom_ex` cannot be upgraded to a non-major newer version, without upgrading the major version of `telemetry_metrics` required in our project. Run `mix deps.update telemetry_metrics prom_ex` to update `mix.lock`, as these two dependencies are intertwined and the current version of `prom_ex` in our project requires `~> 0.6`. Starting from 1.9.0, `ash_graphql` more properly displays paths when an error occurs in a mutation/query with input, so some tests need to be updated accordingly. Removed unused GraphQL pagination on relationships that are not public, thus not reachable through the API. Swap dependabot for Mend Renovate. Init Renovate app by including its configuration file, and by updating CI workflows to run on pushes to renovate branches. Signed-off-by: Damiano Mason <damiano.mason@secomind.com>
1 parent ec8a843 commit b14477f

19 files changed

Lines changed: 267 additions & 138 deletions

File tree

.github/dependabot.yml

Lines changed: 0 additions & 48 deletions
This file was deleted.

.github/workflows/backend-ci.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ on:
2828
branches:
2929
- "main"
3030
- "release-*"
31+
- "renovate/backend-*"
3132
# Run on pull requests matching apps
3233
pull_request:
3334
paths:

.github/workflows/frontend-ci.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ on:
3030
branches:
3131
- "main"
3232
- "release-*"
33+
- "renovate/frontend-*"
3334
# Run on pull requests matching apps
3435
pull_request:
3536
paths:

REUSE.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,3 +86,9 @@ path = ".github/CODEOWNERS"
8686
precedence = "aggregate"
8787
SPDX-FileCopyrightText = "2026 Seco Mind Srl"
8888
SPDX-License-Identifier = "Apache-2.0"
89+
90+
[[annotations]]
91+
path = "renovate.json"
92+
precedence = "aggregate"
93+
SPDX-FileCopyrightText = "2026 Seco Mind Srl"
94+
SPDX-License-Identifier = "Apache-2.0"

backend/lib/edgehog/campaigns/campaign_target/campaign_target.ex

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,10 +158,8 @@ defmodule Edgehog.Campaigns.CampaignTarget do
158158
filter expr(device.online == true)
159159

160160
filter expr(
161-
exists(
162-
device.application_deployments,
163-
release.application_id == ^arg(:application_id)
164-
)
161+
exists device.application_deployments,
162+
release.application_id == ^arg(:application_id)
165163
)
166164
end
167165

backend/lib/edgehog/containers/container/container.ex

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ defmodule Edgehog.Containers.Container do
4848

4949
paginate_relationship_with networks: :relay,
5050
devices: :relay,
51-
volumes: :relay,
5251
releases: :relay,
5352
container_volumes: :relay,
5453
device_mappings: :relay

backend/lib/edgehog/devices/system_model_part_number.ex

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ defmodule Edgehog.Devices.SystemModelPartNumber do
3434
action_types [:create, :update, :destroy]
3535
end
3636
end
37-
38-
paginate_relationship_with devices: :relay
3937
end
4038

4139
actions do

backend/lib/edgehog/forwarder/session/manual_actions/request_session.ex

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
#
21
# This file is part of Edgehog.
32
#
4-
# Copyright 2024 SECO Mind Srl
3+
# Copyright 2024 - 2026 SECO Mind Srl
54
#
65
# Licensed under the Apache License, Version 2.0 (the "License");
76
# you may not use this file except in compliance with the License.
@@ -16,13 +15,12 @@
1615
# limitations under the License.
1716
#
1817
# SPDX-License-Identifier: Apache-2.0
19-
#
2018

2119
defmodule Edgehog.Forwarder.Session.ManualActions.RequestSession do
2220
@moduledoc false
2321
use Ash.Resource.Actions.Implementation
2422

25-
alias Ash.Error.Changes.InvalidArgument
23+
alias Ash.Error.Action.InvalidArgument
2624
alias Edgehog.Devices.Device
2725
alias Edgehog.Forwarder
2826

backend/lib/edgehog/labeling/tag.ex

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
#
21
# This file is part of Edgehog.
32
#
4-
# Copyright 2022 - 2025 SECO Mind Srl
3+
# Copyright 2022 - 2026 SECO Mind Srl
54
#
65
# Licensed under the Apache License, Version 2.0 (the "License");
76
# you may not use this file except in compliance with the License.
@@ -16,7 +15,6 @@
1615
# limitations under the License.
1716
#
1817
# SPDX-License-Identifier: Apache-2.0
19-
#
2018

2119
defmodule Edgehog.Labeling.Tag do
2220
@moduledoc false
@@ -36,8 +34,6 @@ defmodule Edgehog.Labeling.Tag do
3634

3735
graphql do
3836
type :tag
39-
40-
paginate_relationship_with device_tags: :relay
4137
end
4238

4339
actions do
@@ -53,7 +49,7 @@ defmodule Edgehog.Labeling.Tag do
5349

5450
read :read_assigned_to_devices do
5551
description "Returns Tags currently assigned to some device."
56-
prepare build(filter: expr(exists(device_tags, true)))
52+
prepare build(filter: expr(exists device_tags, true))
5753

5854
pagination do
5955
required? false

backend/mix.exs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ defmodule Edgehog.MixProject do
8686
{:ecto_sql, "~> 3.6"},
8787
{:postgrex, "~> 0.16"},
8888
{:swoosh, "~> 1.3"},
89-
{:telemetry_metrics, "~> 0.6"},
89+
{:telemetry_metrics, "~> 1.0"},
9090
{:telemetry_poller, "~> 1.0"},
9191
{:gettext, "~> 1.0"},
9292
{:jason, "~> 1.2"},
@@ -124,7 +124,7 @@ defmodule Edgehog.MixProject do
124124
{:credo, "~> 1.6", only: [:dev, :test], runtime: false},
125125
{:ash, "~> 3.0"},
126126
{:ash_postgres, "~> 2.0"},
127-
{:ash_graphql, "~> 1.0"},
127+
{:ash_graphql, "~> 1.9"},
128128
{:ash_json_api, "~> 1.3"},
129129
{:igniter, "~> 0.7", only: [:dev, :test]},
130130
{:picosat_elixir, "~> 0.2"},

0 commit comments

Comments
 (0)