Skip to content

Commit ae7fc11

Browse files
authored
Upgrades to Erlang/OTP 27 (#39)
* Upgrades to Erlang/OTP 27 * Temporarily disables codecov report upload * Bumps deps * Bumps CI * Bumps prometheus and opentelemetry; cleans up rebar config deps list
1 parent ddfd9ab commit ae7fc11

File tree

9 files changed

+129
-85
lines changed

9 files changed

+129
-85
lines changed

.env

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
# You SHOULD specify point releases here so that build time and run time Erlang/OTPs
33
# are the same. See: https://github.com/erlware/relx/pull/902
44
SERVICE_NAME=token-keeper
5-
OTP_VERSION=24
6-
REBAR_VERSION=3.18
5+
OTP_VERSION=27.1.2
6+
REBAR_VERSION=3.24
77
THRIFT_VERSION=0.14.2.3

.github/workflows/erlang-checks.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
thrift-version: ${{ steps.thrift-version.outputs.version }}
1919
steps:
2020
- name: Checkout repository
21-
uses: actions/checkout@v2
21+
uses: actions/checkout@v4
2222
- run: grep -v '^#' .env >> $GITHUB_ENV
2323
- id: otp-version
2424
run: echo "::set-output name=version::$OTP_VERSION"
@@ -30,11 +30,12 @@ jobs:
3030
run:
3131
name: Run checks
3232
needs: setup
33-
uses: valitydev/erlang-workflows/.github/workflows/[email protected].12
33+
uses: valitydev/erlang-workflows/.github/workflows/[email protected].17
3434
with:
3535
otp-version: ${{ needs.setup.outputs.otp-version }}
3636
rebar-version: ${{ needs.setup.outputs.rebar-version }}
3737
use-thrift: true
3838
thrift-version: ${{ needs.setup.outputs.thrift-version }}
3939
run-ct-with-compose: true
4040
cache-version: v2
41+
upload-coverage: false

elvis.config

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@
1919
]
2020
}},
2121
% Too opionated
22-
{elvis_style, state_record_and_type, disable}
22+
{elvis_style, state_record_and_type, disable},
23+
{elvis_style, export_used_types, disable},
24+
{elvis_style, no_single_clause_case, disable},
25+
{elvis_style, no_throw, disable}
2326
]
2427
},
2528
#{
@@ -41,7 +44,11 @@
4144
{elvis_style, dont_repeat_yourself, #{min_complexity => 30}},
4245
% Too opionated
4346
{elvis_style, state_record_and_type, disable},
44-
{elvis_style, god_modules, disable}
47+
{elvis_style, god_modules, disable},
48+
{elvis_style, export_used_types, disable},
49+
{elvis_style, no_single_clause_case, disable},
50+
{elvis_style, no_throw, disable},
51+
{elvis_style, consistent_variable_casing, disable}
4552
]
4653
},
4754
#{
@@ -63,7 +70,8 @@
6370
{elvis_text_style, no_tabs},
6471
{elvis_text_style, no_trailing_whitespace},
6572
%% Temporarily disabled till regex pattern is available
66-
{elvis_project, no_deps_master_rebar, disable}
73+
{elvis_project, no_deps_master_rebar, disable},
74+
{elvis_project, no_branch_deps, disable}
6775
]
6876
},
6977
#{

rebar.config

Lines changed: 15 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -31,27 +31,29 @@
3131
%% Pinning to version "1.11.2" from hex here causes constant upgrading and recompilation of the entire project
3232
{jose, {git, "https://github.com/potatosalad/erlang-jose.git", {tag, "1.11.2"}}},
3333
{yamerl, "0.8.1"},
34-
{thrift, {git, "https://github.com/valitydev/thrift_erlang.git", {branch, "master"}}},
35-
{genlib, {git, "https://github.com/valitydev/genlib.git", {branch, "master"}}},
34+
{thrift, {git, "https://github.com/valitydev/thrift_erlang.git", {tag, "v1.0.0"}}},
35+
{genlib, {git, "https://github.com/valitydev/genlib.git", {tag, "v1.1.0"}}},
3636
{snowflake, {git, "https://github.com/valitydev/snowflake.git", {branch, "master"}}},
37-
{woody, {git, "https://github.com/valitydev/woody_erlang.git", {branch, "master"}}},
37+
{woody, {git, "https://github.com/valitydev/woody_erlang.git", {tag, "v1.1.0"}}},
3838
{token_keeper_proto, {git, "https://github.com/valitydev/token-keeper-proto.git", {branch, "master"}}},
39-
{scoper, {git, "https://github.com/valitydev/scoper.git", {branch, "master"}}},
39+
{scoper, {git, "https://github.com/valitydev/scoper.git", {tag, "v1.1.0"}}},
4040
{erl_health, {git, "https://github.com/valitydev/erlang-health.git", {branch, "master"}}},
4141
%% Only needed for some utility functions
42-
{bouncer_client, {git, "https://github.com/valitydev/bouncer-client-erlang.git", {branch, "master"}}},
43-
{machinery, {git, "https://github.com/valitydev/machinery-erlang.git", {branch, "master"}}},
42+
{bouncer_client, {git, "https://github.com/valitydev/bouncer-client-erlang.git", {tag, "v1.1.0"}}},
43+
{machinery, {git, "https://github.com/valitydev/machinery-erlang.git", {tag, "v1.1.1"}}},
44+
{prometheus, "4.11.0"},
45+
{prometheus_cowboy, "0.1.9"},
4446
%% OpenTelemetry deps
45-
{opentelemetry_api, "1.2.1"},
46-
{opentelemetry, "1.3.0"},
47-
{opentelemetry_exporter, "1.3.0"}
47+
{opentelemetry_api, "1.4.0"},
48+
{opentelemetry, "1.5.0"},
49+
{opentelemetry_exporter, "1.8.0"}
4850
]}.
4951

5052
%% Helpful plugins.
5153
{plugins, [
52-
{rebar3_lint, "1.0.1"},
53-
{erlfmt, "1.0.0"},
54-
{covertool, "2.0.4"},
54+
{rebar3_lint, "3.2.6"},
55+
{erlfmt, "1.5.0"},
56+
{covertool, "2.0.7"},
5557
{rebar3_thrift_compiler, {git, "https://github.com/valitydev/rebar3-thrift-compiler.git", {tag, "0.4"}}}
5658
]}.
5759

@@ -77,7 +79,6 @@
7779
% mandatory
7880
unmatched_returns,
7981
error_handling,
80-
race_conditions,
8182
unknown
8283
]},
8384
{plt_apps, all_deps}
@@ -86,22 +87,14 @@
8687
{profiles, [
8788
{prod, [
8889
{deps, [
89-
%% NOTE
90-
%% Because of a dependency conflict, prometheus libs are only included in production build for now
91-
%% https://github.com/project-fifo/rebar3_lint/issues/42
92-
%% https://github.com/valitydev/hellgate/pull/2/commits/884724c1799703cee4d1033850fe32c17f986d9e
93-
{prometheus, "4.8.1"},
94-
{prometheus_cowboy, "0.1.8"},
9590
% Introspect a node running in production
9691
{recon, "2.5.2"},
9792
{logger_logstash_formatter,
98-
{git, "https://github.com/valitydev/logger_logstash_formatter.git", {ref, "08a66a6"}}},
99-
{iosetopts, {git, "https://github.com/valitydev/iosetopts.git", {ref, "edb445c"}}}
93+
{git, "https://github.com/valitydev/logger_logstash_formatter.git", {ref, "08a66a6"}}}
10094
]},
10195
%% Relx configuration
10296
{relx, [
10397
{release, {'token-keeper', "0.1.0"}, [
104-
iosetopts,
10598
% tools for introspection
10699
{recon, load},
107100
% debugger
@@ -111,8 +104,6 @@
111104
{opentelemetry, temporary},
112105
% logger formatter
113106
{logger_logstash_formatter, load},
114-
prometheus,
115-
prometheus_cowboy,
116107
token_keeper
117108
]},
118109
{sys_config, "./config/sys.config"},

0 commit comments

Comments
 (0)