Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DO NOT MERGE] Building ruby against LTS channel for erchef. #3958

Open
wants to merge 32 commits into
base: CHEF-11677/CHEF-12498/lbaker
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
5309d6a
Update to Erlang 26.2.5.2
lbakerchef Jul 17, 2024
56a6f46
Update plan.sh files to erlang26
lbakerchef Nov 25, 2024
15d8c81
Upgrade rebar3
lbakerchef Aug 16, 2024
ff90bf2
Recompile Elvis and fix elvis complaints
lbakerchef Jul 17, 2024
d476605
Fix license scout issue (skip_transitive_dependency_licensing true)
lbakerchef Aug 21, 2024
e01d51b
Remove eper
lbakerchef Jul 19, 2024
38c10a1
Fix compilation errors in depsolver
lbakerchef Jul 22, 2024
563e825
Fix dialyzer errors
lbakerchef Jul 23, 2024
134d630
Point to fixed opscoderl_wm and webmachine
lbakerchef Jul 19, 2024
b93e5a6
Point to updated erlcloud
lbakerchef Jul 23, 2024
70f4f78
point to fixed sqerl+pooler, fix other refs
lbakerchef Jul 25, 2024
c18c0dc
point to custom mini_s3 (which points to custom erlclou)
lbakerchef Aug 16, 2024
8e15fdd
point to fixed ej and secrets
lbakerchef Aug 16, 2024
4f3fa96
point to patched deps in oc_erchef
lbakerchef Jul 27, 2024
44c228c
bifrost - patch rebar configs
lbakerchef Jul 28, 2024
801fa14
erchef - patch rebar.config (revert later)
lbakerchef Jul 28, 2024
e05211c
erchef - update bcrypt (fix compilation error)
lbakerchef Jul 22, 2024
303b01c
switch to modified epgsql-1
lbakerchef Aug 1, 2024
c756f2c
chef/erlsom -> willemdj/erlsom
lbakerchef Aug 15, 2024
88db489
change to newly-forked version of experimental version of lhttpc
lbakerchef Nov 18, 2024
b1fa2cb
data_collector pooler -> CHEF-11677/CHEF-12498/lbaker
lbakerchef Aug 5, 2024
40d12a1
pg2 -> pg
lbakerchef Aug 2, 2024
a23d56f
start -> ensure_started
lbakerchef Aug 6, 2024
5ecc9f3
Add {minor_version, 1} option to term_to_binary pursuant to Erlang 26…
lbakerchef Aug 8, 2024
6515ecf
Add [{minor_version, 1}] option to all term_to_binary function calls
lbakerchef Aug 14, 2024
dc09ebf
Fix /_stats API pedant test failure following update to erlang 26x
lbakerchef Nov 22, 2024
06b6335
Add ssl option verify_none following update to Erlang 26.
lbakerchef Nov 22, 2024
d9b96c0
Revert "Fix license scout issue (skip_transitive_dependency_licensing…
lbakerchef Nov 26, 2024
44f03f6
pointing to LTS channel for core deps
RoyShravani Oct 28, 2024
7dbeea4
Pointing LTS-2024 channel for erlang26 and ruby3.4
jashaik Nov 26, 2024
4ed964b
changes after gecode.
talktovikas Dec 12, 2024
fdd336f
gecode3 in plan.sh
talktovikas Dec 16, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .expeditor/automate_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ export HAB_STUDIO_SECRET_HAB_FEAT_IGNORE_LOCAL=false
export HAB_FEAT_IGNORE_LOCAL=false
export HAB_STUDIO_HOST_ARCH=x86_64-linux
export HAB_FEAT_OFFLINE_INSTALL=true
export HAB_BLDR_CHANNEL: "LTS-2024"
export HAB_STUDIO_SECRET_HAB_FALLBACK_CHANNEL: "LTS-2024"
export HAB_FALLBACK_CHANNEL: "LTS-2024"

curl https://raw.githubusercontent.com/habitat-sh/habitat/main/components/hab/install.sh | sudo bash

Expand Down
13 changes: 13 additions & 0 deletions .expeditor/build.habitat.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
---
env:
HAB_BLDR_CHANNEL: "LTS-2024"
HAB_STUDIO_SECRET_HAB_FALLBACK_CHANNEL: "LTS-2024"
HAB_FALLBACK_CHANNEL: "LTS-2024"

origin: chef
smart_build: false
studio_secrets:
HAB_BLDR_CHANNEL:
value: "LTS-2024"
HAB_STUDIO_SECRET_HAB_FALLBACK_CHANNEL:
value: "LTS-2024"
HAB_FALLBACK_CHANNEL:
value: "LTS-2024"


1 change: 1 addition & 0 deletions .expeditor/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,3 +129,4 @@ artifact_channels:
- unstable
- current
- stable
- LTS-2024
2 changes: 1 addition & 1 deletion .expeditor/create_manifest.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def get_latest(channel, origin, name)
def get_hab_deps_latest()
ret = {}
["hab", "hab-sup", "hab-launcher"].each do |name|
d = get_latest("stable", "core", name)
d = get_latest("LTS-2024", "core", name)
ret[name] = "#{d["origin"]}/#{d["name"]}/#{d["version"]}/#{d["release"]}"
end
ret
Expand Down
2 changes: 1 addition & 1 deletion .license_scout.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ habitat:
- origin: chef
channel: unstable
- origin: core
channel: stable
channel: LTS-2024

allowed_licenses:
- Apache-1.0
Expand Down
24 changes: 13 additions & 11 deletions oc-chef-pedant/spec/api/stats_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -88,16 +88,18 @@
"pg_stat_seq_scan" => "COUNTER",
}

MNESIA_RESPONSE_TYPE_MAP = {
"erlang_mnesia_held_locks" => "GAUGE",
"erlang_mnesia_lock_queue" => "GAUGE",
"erlang_mnesia_transaction_participants" => "GAUGE",
"erlang_mnesia_transaction_coordinators" => "GAUGE",
"erlang_mnesia_failed_transactions" => "COUNTER",
"erlang_mnesia_committed_transactions" => "GAUGE",
"erlang_mnesia_logged_transactions" => "COUNTER",
"erlang_mnesia_restarted_transactions" => "COUNTER"
}
# pedant test failures here after upgrading to erlang 26x
#
#MNESIA_RESPONSE_TYPE_MAP = {
# "erlang_mnesia_held_locks" => "GAUGE",
# "erlang_mnesia_lock_queue" => "GAUGE",
# "erlang_mnesia_transaction_participants" => "GAUGE",
# "erlang_mnesia_transaction_coordinators" => "GAUGE",
# "erlang_mnesia_failed_transactions" => "COUNTER",
# "erlang_mnesia_committed_transactions" => "GAUGE",
# "erlang_mnesia_logged_transactions" => "COUNTER",
# "erlang_mnesia_restarted_transactions" => "COUNTER"
#}

CHEF_INDEX_TYPE_MAP_ES = {
"chef_elasticsearch_update_count" => "COUNTER",
Expand Down Expand Up @@ -168,7 +170,7 @@

SHARED_TYPE_MAP = ERLANG_RESPONSE_TYPE_MAP.merge(CHEF_INDEX_TYPE_MAP)
RESPONSE_TYPE_MAP = SHARED_TYPE_MAP.merge(CHEF_INDEX_JSON_TYPE_MAP)
PROMETHEUS_RESPONSE_TYPE_MAP = SHARED_TYPE_MAP.merge(MNESIA_RESPONSE_TYPE_MAP).merge(CHEF_INDEX_PROMETHEUS_TYPE_MAP)
PROMETHEUS_RESPONSE_TYPE_MAP = SHARED_TYPE_MAP.merge(CHEF_INDEX_PROMETHEUS_TYPE_MAP)

if Pedant::Config.chef_pgsql_collector
RESPONSE_TYPE_MAP = RESPONSE_TYPE_MAP.merge(PGSTATS_RESPONSE_TYPE_MAP)
Expand Down
2 changes: 1 addition & 1 deletion omnibus_overrides.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# When updating this, check doc/FrequentTasks.md for checklists to ensure all
# the various usages are updated in lockstep
#
override :erlang, version: "24.3.2"
override :erlang, version: "26.2.5.2"
override :'omnibus-ctl', version: "main"
override :chef, version: "v17.10.0"
override :ohai, version: "v16.17.0"
Expand Down
6 changes: 3 additions & 3 deletions scripts/bk_tests/bk_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ cp /workdir/scripts/bk_tests/pb_hba.conf /etc/postgresql/13/main/pg_hba.conf
# the erlang software definition lives in: /omnibus-software/config/software/erlang.rb

# this is needed until the erlang version is installed in the docker container
echo "Installing erlang 24.3.2"
asdf install erlang 24.3.2
asdf local erlang 24.3.2
echo "Installing erlang 26.2.5.2"
asdf install erlang 26.2.5.2
asdf local erlang 26.2.5.2
erl -eval 'erlang:display(erlang:system_info(otp_release)), halt().' -noshell

echo "Installing Bundler"
Expand Down
Binary file modified scripts/elvis
Binary file not shown.
4 changes: 2 additions & 2 deletions src/bookshelf/elvis.config
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
{elvis_style, no_if_expression},
{elvis_style, no_debug_call, #{ignore => [bksw_app]}},
{elvis_style, no_nested_try_catch},
{elvis_style, no_tabs},
{elvis_style, no_trailing_whitespace},
{elvis_text_style, no_tabs},
{elvis_text_style, no_trailing_whitespace},
{elvis_style, operator_spaces},
{elvis_style, used_ignored_variable},
{elvis_style, variable_naming_convention}
Expand Down
6 changes: 3 additions & 3 deletions src/bookshelf/habitat/plan.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ pkg_origin=chef
pkg_license=('Apache-2.0')
pkg_maintainer="The Chef Server Maintainers <support@chef.io>"
pkg_deps=(
core/erlang24
core/cacerts
core/erlang26
core/cacertsl
core/coreutils
core/gcc-libs
core/sqitch_pg
core/sqitch
)
pkg_build_deps=(core/make core/git core/gcc)
pkg_bin_dirs=(bin)
Expand Down
20 changes: 11 additions & 9 deletions src/bookshelf/rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
%% -*- tab-width: 4;erlang-indent-level: 4;indent-tabs-mode: nil -*-
%% ex: ts=4 sw=4 ft=erlang et

{require_otp_vsn, "24.3.2"}.
{require_otp_vsn, "26.2.5.2"}.

{erl_dep_retries, 10}.

Expand All @@ -16,30 +16,30 @@
{git, "https://github.com/chef/chef_secrets", {branch, "main"}}},
{envy, ".*",
{git, "https://github.com/markan/envy", {branch, "master"}}},
{eper, ".*",
{git, "https://github.com/massemanet/eper", {branch, "master"}}},
% {eper, ".*",
% {git, "https://github.com/massemanet/eper", {branch, "master"}}},
{erlcloud, ".*",
{git, "https://github.com/chef/erlcloud", {branch, "lbaker/presigned-headers"}}},
{git, "https://github.com/chef/erlcloud", {branch, "CHEF-11677/CHEF-12498/lbaker"}}},
{erlsom, ".*",
{git, "https://github.com/chef/erlsom", {branch, "integer_long_string_probs2"}}},
{git, "https://github.com/willemdj/erlsom", {branch, "master"}}},
{erlware_commons, ".*",
{git, "https://github.com/chef/erlware_commons", {branch, "lbaker/fix_for_ftmap"}}},
{iso8601, ".*",
{git, "https://github.com/erlsci/iso8601", {tag, "1.2.3"}}},
{meck, ".*",
{git, "https://github.com/eproxus/meck", {branch, "master"}}},
{mini_s3, ".*",
{git, "https://github.com/chef/mini_s3", {branch, "main"}}},
{git, "https://github.com/chef/mini_s3", {branch, "CHEF-11677/CHEF-12498/lbaker"}}},
{mixer, ".*",
{git, "https://github.com/inaka/mixer", {branch, "master"}}},
{mochiweb, ".*",
{git, "https://github.com/mochi/mochiweb", {branch, "main"}}},
{observer_cli, ".*",
{git, "https://github.com/zhongwencool/observer_cli", {branch, "master"}}},
{opscoderl_wm, ".*",
{git, "https://github.com/chef/opscoderl_wm", {branch, "main"}}},
{git, "https://github.com/chef/opscoderl_wm", {branch, "CHEF-11677/CHEF-12498/lbaker"}}},
{sqerl, ".*",
{git, "https://github.com/chef/sqerl", {branch, "main"}}},
{git, "https://github.com/chef/sqerl", {branch, "CHEF-11677/CHEF-12498/lbaker"}}},
{sync, ".*",
{git, "https://github.com/rustyio/sync", {branch, "master"}}}
]}.
Expand All @@ -56,6 +56,8 @@

{plugins, [pc]}.

{dialyzer, [{warnings, [no_unknown]}]}.

{xref_checks,
[undefined_function_calls,
undefined_functions,
Expand Down Expand Up @@ -132,7 +134,7 @@
{mixer, load},
syntax_tools,
compiler,
eper,
%eper,
observer_cli,
{pooler, load},
{sqerl, load}
Expand Down
32 changes: 14 additions & 18 deletions src/bookshelf/rebar.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8,35 +8,31 @@
0},
{<<"chef_secrets">>,
{git,"https://github.com/chef/chef_secrets",
{ref,"6fa36689fd599602e5985587a1497282df2d907a"}},
{branch,"CHEF-11677/CHEF-12498/lbaker"}},
0},
{<<"eini">>,
{git,"https://github.com/erlcloud/eini",
{ref,"511a94254d6eecc9331da31cd4fa08ff64b4d2e2"}},
{branch,"master"}},
1},
{<<"ej">>,
{git,"https://github.com/chef/ej",
{ref,"f843f4da1cb7d8d2414adccc37fe523e3f92d789"}},
{branch,"CHEF-11677/CHEF-12498/lbaker"}},
1},
{<<"envy">>,
{git,"https://github.com/markan/envy",
{ref,"0148fb4b7ed0e188511578e98b42d6e7dde0ebd1"}},
0},
{<<"eper">>,
{git,"https://github.com/massemanet/eper",
{ref,"17b0f97ea8287b72e8ebbe7132214db182ff1a1d"}},
0},
{<<"epgsql">>,
{git,"https://github.com/chef/epgsql-1.git",
{ref,"34b4182f0e21f9189ddd7b2e290f01a9e7d93bf1"}},
{branch,"CHEF-11677/CHEF-12498/lbaker"}},
1},
{<<"erlcloud">>,
{git,"https://github.com/chef/erlcloud",
{ref,"27724cc615bb71595e88665ffd3ea083bf51ecb3"}},
{branch,"CHEF-11677/CHEF-12498/lbaker"}},
0},
{<<"erlsom">>,
{git,"https://github.com/chef/erlsom",
{ref,"131e660ee39254a58b75075e07dfd742f445bfce"}},
{git,"https://github.com/willemdj/erlsom",
{branch,"master"}},
0},
{<<"erlware_commons">>,
{git,"https://github.com/chef/erlware_commons",
Expand Down Expand Up @@ -67,16 +63,16 @@
{ref,"a140ea935eae9149bb35234bb40f6acf1c69caa1"}},
0},
{<<"lhttpc">>,
{git,"https://github.com/erlcloud/lhttpc",
{ref,"8e34985a3cd0ac2a7fc2a88a041554c64d33e74b"}},
{git,"https://github.com/chef/lhttpc",
{branch,"CHEF-11677/CHEF-12498/lbaker"}},
1},
{<<"meck">>,
{git,"https://github.com/eproxus/meck",
{ref,"e48641a20a605174e640ac91a528d443be11c9b9"}},
0},
{<<"mini_s3">>,
{git,"https://github.com/chef/mini_s3",
{ref,"4dd584fce031d35bbe5c4b72a04660b75673ca21"}},
{branch,"CHEF-11677/CHEF-12498/lbaker"}},
0},
{<<"mixer">>,
{git,"https://github.com/inaka/mixer",
Expand All @@ -92,25 +88,25 @@
0},
{<<"opscoderl_wm">>,
{git,"https://github.com/chef/opscoderl_wm",
{ref,"5436cc600db462226a5d2f3ed585ab39eaf20ee5"}},
{branch,"CHEF-11677/CHEF-12498/lbaker"}},
0},
{<<"pooler">>,
{git,"https://github.com/chef/pooler.git",
{ref,"681c355abaacc5487ddf41a84b9ed53151a765fe"}},
{branch,"CHEF-11677/CHEF-12498/lbaker"}},
1},
{<<"recon">>,
{git,"https://github.com/ferd/recon/",
{ref,"f7b6c08e6e9e2219db58bfb012c58c178822e01e"}},
1},
{<<"sqerl">>,
{git,"https://github.com/chef/sqerl",
{ref,"ebbe4c20ab5cd21041229d22dd60a6b38aa2930c"}},
{branch,"CHEF-11677/CHEF-12498/lbaker"}},
0},
{<<"sync">>,
{git,"https://github.com/rustyio/sync",
{ref,"7c9367e73b7dbb01a788f8d0120d747330112f6f"}},
0},
{<<"webmachine">>,
{git,"https://github.com/chef/webmachine",
{ref,"1389b01a9fbc25d36aad8956e08d2d0db242625f"}},
{branch,"CHEF-11677/CHEF-12498/lbaker"}},
1}].
Binary file modified src/bookshelf/rebar3
Binary file not shown.
2 changes: 1 addition & 1 deletion src/bookshelf/src/bksw_app.erl
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ start(_StartType, _StartArgs) ->
SrcDir = filename:join([Dir, "../../../../../..", "external-deps"]),
EbinDir = filename:join([Dir, "../../../../../..", "external-deps/ebin"]),
application:set_env(sync, src_dirs, {add, [{SrcDir,
[{outdir,EbinDir}]}]}),
[{outdir, EbinDir}]}]}),
application:set_env(sync, sync_method, scanner),
application:start(sync);
_ -> ok
Expand Down
4 changes: 2 additions & 2 deletions src/bookshelf/src/bksw_cleanup_task.erl
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ force_upload_cleanup() ->

init(_Args) ->
UploadInterval = envy:get(bookshelf, abandoned_upload_cleanup_interval, 19 * ?MIN_IN_MS, positive_integer),
CleanupInterval = envy:get(bookshelf,deleted_data_cleanup_interval, 7 * ?MIN_IN_MS, positive_integer),
State = #state{upload_cleanup_interval = UploadInterval, deleted_cleanup_interval = CleanupInterval} ,
CleanupInterval = envy:get(bookshelf, deleted_data_cleanup_interval, 7 * ?MIN_IN_MS, positive_integer),
State = #state{upload_cleanup_interval = UploadInterval, deleted_cleanup_interval = CleanupInterval},
spawn_timers(State),
{ok, State}.

Expand Down
8 changes: 4 additions & 4 deletions src/bookshelf/src/bksw_io.erl
Original file line number Diff line number Diff line change
Expand Up @@ -272,12 +272,12 @@ filter_entries(Bucket, Entries) ->

filter_entries(_Bucket, [], _Ex, Accum) ->
lists:reverse(Accum);
filter_entries(Bucket, [Entry|T], Ex, Accum) ->
filter_entries(Bucket, [Entry | T], Ex, Accum) ->
case re:run(Entry, Ex, [{capture, none}]) of
nomatch ->
case entry_md(Bucket, filename:basename(Entry)) of
{ok, Obj} ->
filter_entries(Bucket, T, Ex, [Obj|Accum]);
filter_entries(Bucket, T, Ex, [Obj | Accum]);
_Error ->
filter_entries(Bucket, T, Ex, Accum)
end;
Expand All @@ -301,13 +301,13 @@ make_buckets(Root, BucketDirs) ->

make_buckets(_Root, [], Buckets) ->
lists:reverse(Buckets);
make_buckets(Root, [BucketDir|T], Buckets) ->
make_buckets(Root, [BucketDir | T], Buckets) ->
Buckets1 = case file:read_file_info(filename:join([Root, BucketDir])) of
{ok, #file_info{mtime=Date}} ->
[UTC | _] = %% FIXME This is a hack until R15B
calendar:local_time_to_universal_time_dst(Date),
[#bucket{name=bksw_io_names:decode(BucketDir),
date=UTC}|Buckets];
date=UTC} | Buckets];
_Error ->
Buckets
end,
Expand Down
14 changes: 7 additions & 7 deletions src/bookshelf/src/bksw_io_names.erl
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
-include_lib("eunit/include/eunit.hrl").
-endif.

hex2dec(X) when (X>=$0) andalso (X=<$9) -> X-$0;
hex2dec(X) when (X>=$A) andalso (X=<$F) -> X-$A+10;
hex2dec(X) when (X>=$a) andalso (X=<$f) -> X-$a+10.
hex2dec(X) when (X>=$0) andalso (X=<$9) -> X - $0;
hex2dec(X) when (X>=$A) andalso (X=<$F) -> X - $A + 10;
hex2dec(X) when (X>=$a) andalso (X=<$f) -> X - $a + 10.

-type uri() :: string() | binary().
-type hex_uri() :: string() | binary(). %% Hexadecimal encoded URI.
Expand All @@ -40,10 +40,10 @@ hex2dec(X) when (X>=$a) andalso (X=<$f) -> X-$a+10.
http_uri_decode(String) when is_list(String) ->
do_decode(String).

do_decode([$%,Hex1,Hex2|Rest]) ->
[hex2dec(Hex1)*16+hex2dec(Hex2)|do_decode(Rest)];
do_decode([First|Rest]) ->
[First|do_decode(Rest)];
do_decode([$%, Hex1, Hex2 | Rest]) ->
[hex2dec(Hex1) * 16 + hex2dec(Hex2) | do_decode(Rest)];
do_decode([First | Rest]) ->
[First | do_decode(Rest)];
do_decode([]) ->
[].

Expand Down
2 changes: 1 addition & 1 deletion src/bookshelf/src/bksw_req.erl
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,5 @@ generate_id() ->
%% it reset on node restarts -- thus we add os:timestamp/0
%% We can't use os:timestamp/0 only, since it's not guaranteed to be unique
%% in multiple invocations.
Id = term_to_binary({node(), os:timestamp(), erlang:unique_integer([positive])}),
Id = term_to_binary({node(), os:timestamp(), erlang:unique_integer([positive])}, [{minor_version, 1}]),
bksw_format:to_base64(Id).
Loading
Loading