From d551a7df3f9330678a03f2d45dfe14f1dc227923 Mon Sep 17 00:00:00 2001 From: Robert Waffen Date: Wed, 31 Jul 2024 18:34:49 +0200 Subject: [PATCH 1/8] Switch to alpine linux Signed-off-by: Robert Waffen --- Dockerfile | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1f0a19bc..beddcc26 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,21 +1,16 @@ -FROM ruby:3.3.5-slim-bookworm +FROM ruby:3.3.5-alpine3.20 -RUN apt update && apt install -y \ - g++ \ - gcc \ - make \ - libstdc++-12-dev \ - libffi-dev \ - libc-dev \ - libxml2-dev \ - libxslt-dev \ - libgcrypt-dev \ - libsqlite3-dev \ - sqlite3 \ - # not needed for gems, but for runtime - git \ - tzdata \ - && rm -rf /var/lib/apt/lists/* +RUN apk update \ + && apk upgrade \ + && apk add --no-cache --update \ + git \ + sqlite \ + alpine-sdk \ + libxml2-dev \ + libxslt-dev \ + tzdata \ + bash \ + gcompat ENV APP_HOME /hdm ENV RAILS_ENV production From 3ea7a96b0d6e74f2ea20023ea834264446e1faef Mon Sep 17 00:00:00 2001 From: Robert Waffen Date: Fri, 29 Nov 2024 11:38:05 +0100 Subject: [PATCH 2/8] fix: updat build deps to build succesfully protobuf in alpine --- .ruby-version | 2 +- Dockerfile | 2 +- Gemfile | 6 +- Gemfile.lock | 399 +++++++++++++++++++++++++++----------------------- 4 files changed, 220 insertions(+), 189 deletions(-) diff --git a/.ruby-version b/.ruby-version index f13c6f45..e391e180 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -ruby-3.3.5 +ruby-3.3.6 diff --git a/Dockerfile b/Dockerfile index beddcc26..d9743951 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ruby:3.3.5-alpine3.20 +FROM ruby:3.3.6-alpine3.20 RUN apk update \ && apk upgrade \ diff --git a/Gemfile b/Gemfile index 829288b6..98d227ce 100644 --- a/Gemfile +++ b/Gemfile @@ -78,4 +78,8 @@ gem 'git' gem 'gitable', require: "gitable/uri" # dependencies & sec fixes -gem 'mini_racer' # minimal Google V8 JS engine for execjs +gem 'mini_racer', '~> 0.16.0' # minimal Google V8 JS engine for execjs +gem 'libv8-node', '~> 18.19.0.0' # V8 JS engine + +# alpine specific +gem 'google-protobuf', force_ruby_platform: true diff --git a/Gemfile.lock b/Gemfile.lock index 72e8743a..2d4ffffc 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,39 +1,35 @@ GEM remote: https://rubygems.org/ specs: - CFPropertyList (3.0.7) - base64 - nkf - rexml - actioncable (7.1.4) - actionpack (= 7.1.4) - activesupport (= 7.1.4) + actioncable (7.1.5) + actionpack (= 7.1.5) + activesupport (= 7.1.5) nio4r (~> 2.0) websocket-driver (>= 0.6.1) zeitwerk (~> 2.6) - actionmailbox (7.1.4) - actionpack (= 7.1.4) - activejob (= 7.1.4) - activerecord (= 7.1.4) - activestorage (= 7.1.4) - activesupport (= 7.1.4) + actionmailbox (7.1.5) + actionpack (= 7.1.5) + activejob (= 7.1.5) + activerecord (= 7.1.5) + activestorage (= 7.1.5) + activesupport (= 7.1.5) mail (>= 2.7.1) net-imap net-pop net-smtp - actionmailer (7.1.4) - actionpack (= 7.1.4) - actionview (= 7.1.4) - activejob (= 7.1.4) - activesupport (= 7.1.4) + actionmailer (7.1.5) + actionpack (= 7.1.5) + actionview (= 7.1.5) + activejob (= 7.1.5) + activesupport (= 7.1.5) mail (~> 2.5, >= 2.5.4) net-imap net-pop net-smtp rails-dom-testing (~> 2.2) - actionpack (7.1.4) - actionview (= 7.1.4) - activesupport (= 7.1.4) + actionpack (7.1.5) + actionview (= 7.1.5) + activesupport (= 7.1.5) nokogiri (>= 1.8.5) racc rack (>= 2.2.4) @@ -41,71 +37,75 @@ GEM rack-test (>= 0.6.3) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) - actiontext (7.1.4) - actionpack (= 7.1.4) - activerecord (= 7.1.4) - activestorage (= 7.1.4) - activesupport (= 7.1.4) + actiontext (7.1.5) + actionpack (= 7.1.5) + activerecord (= 7.1.5) + activestorage (= 7.1.5) + activesupport (= 7.1.5) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (7.1.4) - activesupport (= 7.1.4) + actionview (7.1.5) + activesupport (= 7.1.5) builder (~> 3.1) erubi (~> 1.11) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) - activejob (7.1.4) - activesupport (= 7.1.4) + activejob (7.1.5) + activesupport (= 7.1.5) globalid (>= 0.3.6) - activemodel (7.1.4) - activesupport (= 7.1.4) - activerecord (7.1.4) - activemodel (= 7.1.4) - activesupport (= 7.1.4) + activemodel (7.1.5) + activesupport (= 7.1.5) + activerecord (7.1.5) + activemodel (= 7.1.5) + activesupport (= 7.1.5) timeout (>= 0.4.0) - activestorage (7.1.4) - actionpack (= 7.1.4) - activejob (= 7.1.4) - activerecord (= 7.1.4) - activesupport (= 7.1.4) + activestorage (7.1.5) + actionpack (= 7.1.5) + activejob (= 7.1.5) + activerecord (= 7.1.5) + activesupport (= 7.1.5) marcel (~> 1.0) - activesupport (7.1.4) + activesupport (7.1.5) base64 + benchmark (>= 0.3) bigdecimal concurrent-ruby (~> 1.0, >= 1.0.2) connection_pool (>= 2.2.5) drb i18n (>= 1.6, < 2) + logger (>= 1.4.2) minitest (>= 5.1) mutex_m + securerandom (>= 0.3) tzinfo (~> 2.0) addressable (2.8.7) public_suffix (>= 2.0.2, < 7.0) ast (2.4.2) - async (2.6.5) - console (~> 1.10) + async (2.21.1) + console (~> 1.29) fiber-annotation - io-event (~> 1.1) - timers (~> 4.1) - async-http (0.61.0) - async (>= 1.25) - async-io (>= 1.28) - async-pool (>= 0.2) - protocol-http (~> 0.25.0) - protocol-http1 (~> 0.16.0) - protocol-http2 (~> 0.15.0) - traces (>= 0.10.0) - async-http-faraday (0.12.0) + io-event (~> 1.6, >= 1.6.5) + async-http (0.85.0) + async (>= 2.10.2) + async-pool (~> 0.9) + io-endpoint (~> 0.14) + io-stream (~> 0.6) + metrics (~> 0.12) + protocol-http (~> 0.43) + protocol-http1 (>= 0.28.1) + protocol-http2 (~> 0.21) + traces (~> 0.10) + async-http-faraday (0.19.0) async-http (~> 0.42) faraday - async-io (1.36.1) - async - async-pool (0.4.0) + async-pool (0.10.2) async (>= 1.25) - autoprefixer-rails (10.4.16.0) + traces + autoprefixer-rails (10.4.19.0) execjs (~> 2) base64 (0.2.0) bcrypt (3.1.20) + benchmark (0.4.0) bigdecimal (3.1.8) bindex (0.8.1) bootstrap (5.3.3) @@ -132,10 +132,12 @@ GEM xpath (~> 3.2) concurrent-ruby (1.3.4) connection_pool (2.4.1) - console (1.23.2) + console (1.29.0) fiber-annotation - fiber-local + fiber-local (~> 1.1) + json crass (1.0.6) + csv (3.3.0) dartsass-rails (0.5.1) railties (>= 6.0.0) sass-embedded (~> 1.63) @@ -145,41 +147,53 @@ GEM sprockets (> 3.0) sprockets-rails tilt - date (3.3.4) + date (3.4.0) deep_merge (1.2.2) - diffy (3.4.2) - docile (1.4.0) + diffy (3.4.3) + docile (1.4.1) drb (2.2.1) erubi (1.13.0) - execjs (2.9.1) + execjs (2.10.0) facter (4.6.1) hocon (~> 1.3) thor (>= 1.0.1, < 2.0) - factory_bot (6.4.5) + factory_bot (6.5.0) activesupport (>= 5.0.0) - factory_bot_rails (6.4.3) - factory_bot (~> 6.4) + factory_bot_rails (6.4.4) + factory_bot (~> 6.5) railties (>= 5.0.0) - faker (3.4.2) + faker (3.5.1) i18n (>= 1.8.11, < 2) - faraday (2.9.0) - faraday-net_http (>= 2.0, < 3.2) - faraday-http-cache (2.5.0) + faraday (2.12.1) + faraday-net_http (>= 2.0, < 3.5) + json + logger + faraday-http-cache (2.5.1) faraday (>= 0.8) - faraday-net_http (3.1.0) - net-http + faraday-net_http (3.4.0) + net-http (>= 0.5.0) faraday-retry (2.2.1) faraday (~> 2.0) fast_gettext (3.1.0) prime - ffi (1.16.3) + ffi (1.17.0) + ffi (1.17.0-aarch64-linux-gnu) + ffi (1.17.0-aarch64-linux-musl) + ffi (1.17.0-arm-linux-gnu) + ffi (1.17.0-arm-linux-musl) + ffi (1.17.0-x86-linux-gnu) + ffi (1.17.0-x86-linux-musl) + ffi (1.17.0-x86_64-linux-gnu) + ffi (1.17.0-x86_64-linux-musl) fiber-annotation (0.2.0) - fiber-local (1.0.0) + fiber-local (1.1.0) + fiber-storage + fiber-storage (1.0.0) forwardable (1.3.3) friendly_id (5.5.1) activerecord (>= 4.0.0) getoptlong (0.2.1) - git (2.3.0) + git (2.3.2) activesupport (>= 5.0) addressable (~> 2.8) process_executer (~> 1.1) @@ -197,49 +211,45 @@ GEM rake (>= 10.0) globalid (1.2.1) activesupport (>= 6.1) - google-protobuf (4.27.5) - bigdecimal - rake (>= 13) - google-protobuf (4.27.5-arm64-darwin) + google-protobuf (4.29.0) bigdecimal rake (>= 13) - google-protobuf (4.27.5-x86_64-darwin) - bigdecimal - rake (>= 13) - google-protobuf (4.27.5-x86_64-linux) - bigdecimal - rake (>= 13) - hiera-eyaml (4.1.0) - highline (~> 2.1) + hiera-eyaml (4.2.0) + highline (>= 2.1, < 4) optimist (~> 3.1) - highline (2.1.0) + highline (3.1.1) + reline hocon (1.4.0) - httparty (0.21.0) + httparty (0.22.0) + csv mini_mime (>= 1.0.0) multi_xml (>= 0.5.2) i18n (1.14.6) concurrent-ruby (~> 1.0) - importmap-rails (2.0.1) + importmap-rails (2.0.3) actionpack (>= 6.0.0) activesupport (>= 6.0.0) railties (>= 6.0.0) io-console (0.7.2) - io-event (1.3.3) - irb (1.14.0) + io-endpoint (0.14.0) + io-event (1.7.4) + io-stream (0.6.1) + irb (1.14.1) rdoc (>= 4.0.0) reline (>= 0.4.2) - json (2.7.2) + json (2.8.2) language_server-protocol (3.17.0.3) libv8-node (18.19.0.0) - libv8-node (18.19.0.0-arm64-darwin) - libv8-node (18.19.0.0-x86_64-darwin) + libv8-node (18.19.0.0-aarch64-linux) + libv8-node (18.19.0.0-aarch64-linux-musl) libv8-node (18.19.0.0-x86_64-linux) + libv8-node (18.19.0.0-x86_64-linux-musl) listen (3.9.0) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) locale (2.1.4) logger (1.6.1) - loofah (2.22.0) + loofah (2.23.1) crass (~> 1.0.2) nokogiri (>= 1.12.0) mail (2.8.1) @@ -249,17 +259,19 @@ GEM net-smtp marcel (1.0.4) matrix (0.4.2) + metrics (0.12.1) mini_mime (1.1.5) - mini_portile2 (2.8.7) + mini_portile2 (2.8.8) mini_racer (0.16.0) libv8-node (~> 18.19.0.0) - minitest (5.25.1) + minitest (5.25.2) multi_json (1.15.0) - multi_xml (0.6.0) - mutex_m (0.2.0) - net-http (0.4.1) + multi_xml (0.7.1) + bigdecimal (~> 3.1) + mutex_m (0.3.0) + net-http (0.5.0) uri - net-imap (0.4.16) + net-imap (0.5.1) date net-protocol net-ldap (0.19.0) @@ -269,55 +281,44 @@ GEM timeout net-smtp (0.5.0) net-protocol - nio4r (2.7.3) - nkf (0.2.0) + nio4r (2.7.4) nokogiri (1.16.7) mini_portile2 (~> 2.8.2) racc (~> 1.4) - nokogiri (1.16.7-arm64-darwin) + nokogiri (1.16.7-aarch64-linux) + racc (~> 1.4) + nokogiri (1.16.7-arm-linux) racc (~> 1.4) - nokogiri (1.16.7-x86_64-darwin) + nokogiri (1.16.7-x86-linux) racc (~> 1.4) nokogiri (1.16.7-x86_64-linux) racc (~> 1.4) octokit (4.25.1) faraday (>= 1, < 3) sawyer (~> 0.9) - optimist (3.1.0) + optimist (3.2.0) parallel (1.26.3) - parser (3.3.5.0) + parser (3.3.6.0) ast (~> 2.4.1) racc popper_js (2.11.8) - prime (0.1.2) + prime (0.1.3) forwardable singleton - process_executer (1.1.0) - protocol-hpack (1.4.2) - protocol-http (0.25.0) - protocol-http1 (0.16.0) + process_executer (1.2.0) + protocol-hpack (1.5.1) + protocol-http (0.47.0) + protocol-http1 (0.28.1) protocol-http (~> 0.22) - protocol-http2 (0.15.1) + protocol-http2 (0.21.0) protocol-hpack (~> 1.4) protocol-http (~> 0.18) - psych (5.1.2) + psych (5.2.0) stringio public_suffix (6.0.1) - puma (6.4.3) + puma (6.5.0) nio4r (~> 2.0) - puppet (8.9.0) - concurrent-ruby (~> 1.0) - deep_merge (~> 1.0) - facter (>= 4.3.0, < 5) - fast_gettext (>= 2.1, < 4) - getoptlong (~> 0.2.0) - locale (~> 2.1) - multi_json (~> 1.13) - puppet-resource_api (~> 1.5) - scanf (~> 1.0) - semantic_puppet (~> 1.0) - puppet (8.9.0-universal-darwin) - CFPropertyList (>= 3.0.6, < 4) + puppet (8.10.0) concurrent-ruby (~> 1.0) deep_merge (~> 1.0) facter (>= 4.3.0, < 5) @@ -333,28 +334,27 @@ GEM puppetdb-ruby (1.2.0) httparty racc (1.8.1) - rack (3.1.7) + rack (3.1.8) rack-session (2.0.0) rack (>= 3.0.0) rack-test (2.1.0) rack (>= 1.3) - rackup (2.1.0) + rackup (2.2.1) rack (>= 3) - webrick (~> 1.8) - rails (7.1.4) - actioncable (= 7.1.4) - actionmailbox (= 7.1.4) - actionmailer (= 7.1.4) - actionpack (= 7.1.4) - actiontext (= 7.1.4) - actionview (= 7.1.4) - activejob (= 7.1.4) - activemodel (= 7.1.4) - activerecord (= 7.1.4) - activestorage (= 7.1.4) - activesupport (= 7.1.4) + rails (7.1.5) + actioncable (= 7.1.5) + actionmailbox (= 7.1.5) + actionmailer (= 7.1.5) + actionpack (= 7.1.5) + actiontext (= 7.1.5) + actionview (= 7.1.5) + activejob (= 7.1.5) + activemodel (= 7.1.5) + activerecord (= 7.1.5) + activestorage (= 7.1.5) + activesupport (= 7.1.5) bundler (>= 1.15.0) - railties (= 7.1.4) + railties (= 7.1.5) rails-dom-testing (2.2.0) activesupport (>= 5.0.0) minitest @@ -362,9 +362,9 @@ GEM rails-html-sanitizer (1.6.0) loofah (~> 2.21) nokogiri (~> 1.14) - railties (7.1.4) - actionpack (= 7.1.4) - activesupport (= 7.1.4) + railties (7.1.5) + actionpack (= 7.1.5) + activesupport (= 7.1.5) irb rackup (>= 1.0.0) rake (>= 12.2) @@ -373,16 +373,16 @@ GEM rainbow (3.1.1) rake (13.2.1) rb-fsevent (0.11.2) - rb-inotify (0.10.1) + rb-inotify (0.11.1) ffi (~> 1.0) rchardet (1.8.0) - rdoc (6.7.0) + rdoc (6.8.1) psych (>= 4.0.0) regexp_parser (2.9.2) - reline (0.5.10) + reline (0.5.12) io-console (~> 0.5) - rexml (3.3.7) - rspec-core (3.13.0) + rexml (3.3.9) + rspec-core (3.13.2) rspec-support (~> 3.13.0) rspec-openapi (0.18.3) actionpack (>= 5.2.0) @@ -399,7 +399,7 @@ GEM rubocop-ast (>= 1.32.2, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) - rubocop-ast (1.32.3) + rubocop-ast (1.36.2) parser (>= 3.3.1.0) rubocop-capybara (2.21.0) rubocop (~> 1.41) @@ -418,22 +418,33 @@ GEM nokogiri (>= 1.13.10) rexml rubyzip (2.3.2) - sass-embedded (1.77.8) - google-protobuf (~> 4.26) + sass-embedded (1.81.0) + google-protobuf (~> 4.28) rake (>= 13) - sass-embedded (1.77.8-arm64-darwin) - google-protobuf (~> 4.26) - sass-embedded (1.77.8-x86_64-darwin) - google-protobuf (~> 4.26) - sass-embedded (1.77.8-x86_64-linux-gnu) - google-protobuf (~> 4.26) - sassc-embedded (1.70.0) - sass-embedded (~> 1.70) + sass-embedded (1.81.0-aarch64-linux-gnu) + google-protobuf (~> 4.28) + sass-embedded (1.81.0-aarch64-linux-musl) + google-protobuf (~> 4.28) + sass-embedded (1.81.0-arm-linux-gnueabihf) + google-protobuf (~> 4.28) + sass-embedded (1.81.0-arm-linux-musleabihf) + google-protobuf (~> 4.28) + sass-embedded (1.81.0-x86-linux-gnu) + google-protobuf (~> 4.28) + sass-embedded (1.81.0-x86-linux-musl) + google-protobuf (~> 4.28) + sass-embedded (1.81.0-x86_64-linux-gnu) + google-protobuf (~> 4.28) + sass-embedded (1.81.0-x86_64-linux-musl) + google-protobuf (~> 4.28) + sassc-embedded (1.80.1) + sass-embedded (~> 1.80) sawyer (0.9.2) addressable (>= 2.3.5) faraday (>= 0.17.3, < 3) scanf (1.0.0) - selenium-webdriver (4.25.0) + securerandom (0.3.2) + selenium-webdriver (4.27.0) base64 (~> 0.2) logger (~> 1.4) rexml (~> 3.2, >= 3.2.5) @@ -444,9 +455,9 @@ GEM docile (~> 1.1) simplecov-html (~> 0.11) simplecov_json_formatter (~> 0.1) - simplecov-html (0.12.3) + simplecov-html (0.13.1) simplecov_json_formatter (0.1.4) - singleton (0.2.0) + singleton (0.3.0) sprockets (4.2.1) concurrent-ruby (~> 1.0) rack (>= 2.2.4, < 4) @@ -454,45 +465,59 @@ GEM actionpack (>= 6.1) activesupport (>= 6.1) sprockets (>= 3.0.0) - sqlite3 (2.1.0) + sqlite3 (2.3.1) mini_portile2 (~> 2.8.0) - sqlite3 (2.1.0-arm64-darwin) - sqlite3 (2.1.0-x86_64-darwin) - sqlite3 (2.1.0-x86_64-linux-gnu) + sqlite3 (2.3.1-aarch64-linux-gnu) + sqlite3 (2.3.1-aarch64-linux-musl) + sqlite3 (2.3.1-arm-linux-gnu) + sqlite3 (2.3.1-arm-linux-musl) + sqlite3 (2.3.1-x86-linux-gnu) + sqlite3 (2.3.1-x86-linux-musl) + sqlite3 (2.3.1-x86_64-linux-gnu) + sqlite3 (2.3.1-x86_64-linux-musl) stimulus-rails (1.3.4) railties (>= 6.0.0) - stringio (3.1.1) + stringio (3.1.2) thor (1.3.2) - tilt (2.3.0) - timeout (0.4.1) - timers (4.3.5) - traces (0.11.1) - turbo-rails (2.0.10) + tilt (2.4.0) + timeout (0.4.2) + traces (0.14.1) + turbo-rails (2.0.11) actionpack (>= 6.0.0) railties (>= 6.0.0) tzinfo (2.0.6) concurrent-ruby (~> 1.0) unicode-display_width (2.6.0) - uri (0.13.0) + uri (1.0.2) web-console (4.2.1) actionview (>= 6.0.0) activemodel (>= 6.0.0) bindex (>= 0.4.0) railties (>= 6.0.0) - webrick (1.8.2) websocket (1.2.11) websocket-driver (0.7.6) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) xpath (3.2.0) nokogiri (~> 1.8) - zeitwerk (2.6.18) + zeitwerk (2.7.1) PLATFORMS - arm64-darwin + aarch64-linux + aarch64-linux-gnu + aarch64-linux-musl + arm-linux + arm-linux-gnu + arm-linux-gnueabihf + arm-linux-musl + arm-linux-musleabihf ruby - x86_64-darwin + x86-linux + x86-linux-gnu + x86-linux-musl x86_64-linux + x86_64-linux-gnu + x86_64-linux-musl DEPENDENCIES bcrypt (~> 3.1.20) @@ -513,10 +538,12 @@ DEPENDENCIES git gitable github_changelog_generator (>= 1.16.1) + google-protobuf hiera-eyaml importmap-rails + libv8-node (~> 18.19.0.0) listen (~> 3.9) - mini_racer + mini_racer (~> 0.16.0) net-ldap puma (~> 6.4) puppet @@ -539,7 +566,7 @@ DEPENDENCIES web-console (>= 3.3.0) RUBY VERSION - ruby 3.3.5p100 + ruby 3.3.6p108 BUNDLED WITH - 2.5.3 + 2.5.22 From b00ed9034d99c7d21a390c19e116a8b4421f256e Mon Sep 17 00:00:00 2001 From: Robert Waffen Date: Fri, 29 Nov 2024 12:12:49 +0100 Subject: [PATCH 3/8] fix: fix broken merge, update to alpine images --- Dockerfile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5a20114e..a85c4bd8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ruby:3.3.6-alpine3.20 +FROM ruby:3.3.6-alpine3.20 AS builder RUN apk update \ && apk upgrade \ @@ -9,8 +9,7 @@ RUN apk update \ libxml2-dev \ libxslt-dev \ tzdata \ - bash \ - gcompat + bash ENV APP_HOME=/hdm WORKDIR $APP_HOME @@ -22,7 +21,7 @@ RUN bundle check || (bundle config set --local without 'development test release ############################################################################### -FROM ruby:3.3.5-slim-bookworm +FROM ruby:3.3.6-alpine3.20 AS final ENV APP_HOME=/hdm ENV RAILS_ENV=production From fc47da947c6d748f426fba61c615ab0d039f4c93 Mon Sep 17 00:00:00 2001 From: Robert Waffen Date: Fri, 29 Nov 2024 12:13:07 +0100 Subject: [PATCH 4/8] feat: update Gemfile for alpine usage --- Gemfile.lock | 162 ++++++++++++++++++++++++++------------------------- 1 file changed, 82 insertions(+), 80 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 32fb799a..661af31a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,33 +1,29 @@ GEM remote: https://rubygems.org/ specs: - CFPropertyList (3.0.7) - base64 - nkf - rexml - actioncable (7.2.1.1) - actionpack (= 7.2.1.1) - activesupport (= 7.2.1.1) + actioncable (7.2.2) + actionpack (= 7.2.2) + activesupport (= 7.2.2) nio4r (~> 2.0) websocket-driver (>= 0.6.1) zeitwerk (~> 2.6) - actionmailbox (7.2.1.1) - actionpack (= 7.2.1.1) - activejob (= 7.2.1.1) - activerecord (= 7.2.1.1) - activestorage (= 7.2.1.1) - activesupport (= 7.2.1.1) + actionmailbox (7.2.2) + actionpack (= 7.2.2) + activejob (= 7.2.2) + activerecord (= 7.2.2) + activestorage (= 7.2.2) + activesupport (= 7.2.2) mail (>= 2.8.0) - actionmailer (7.2.1.1) - actionpack (= 7.2.1.1) - actionview (= 7.2.1.1) - activejob (= 7.2.1.1) - activesupport (= 7.2.1.1) + actionmailer (7.2.2) + actionpack (= 7.2.2) + actionview (= 7.2.2) + activejob (= 7.2.2) + activesupport (= 7.2.2) mail (>= 2.8.0) rails-dom-testing (~> 2.2) - actionpack (7.2.1.1) - actionview (= 7.2.1.1) - activesupport (= 7.2.1.1) + actionpack (7.2.2) + actionview (= 7.2.2) + activesupport (= 7.2.2) nokogiri (>= 1.8.5) racc rack (>= 2.2.4, < 3.2) @@ -36,35 +32,35 @@ GEM rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) useragent (~> 0.16) - actiontext (7.2.1.1) - actionpack (= 7.2.1.1) - activerecord (= 7.2.1.1) - activestorage (= 7.2.1.1) - activesupport (= 7.2.1.1) + actiontext (7.2.2) + actionpack (= 7.2.2) + activerecord (= 7.2.2) + activestorage (= 7.2.2) + activesupport (= 7.2.2) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (7.2.1.1) - activesupport (= 7.2.1.1) + actionview (7.2.2) + activesupport (= 7.2.2) builder (~> 3.1) erubi (~> 1.11) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) - activejob (7.2.1.1) - activesupport (= 7.2.1.1) + activejob (7.2.2) + activesupport (= 7.2.2) globalid (>= 0.3.6) - activemodel (7.2.1.1) - activesupport (= 7.2.1.1) - activerecord (7.2.1.1) - activemodel (= 7.2.1.1) - activesupport (= 7.2.1.1) + activemodel (7.2.2) + activesupport (= 7.2.2) + activerecord (7.2.2) + activemodel (= 7.2.2) + activesupport (= 7.2.2) timeout (>= 0.4.0) - activestorage (7.2.1.1) - actionpack (= 7.2.1.1) - activejob (= 7.2.1.1) - activerecord (= 7.2.1.1) - activesupport (= 7.2.1.1) + activestorage (7.2.2) + actionpack (= 7.2.2) + activejob (= 7.2.2) + activerecord (= 7.2.2) + activesupport (= 7.2.2) marcel (~> 1.0) - activesupport (7.2.1.1) + activesupport (7.2.2) base64 benchmark (>= 0.3) bigdecimal @@ -148,7 +144,7 @@ GEM date (3.4.0) deep_merge (1.2.2) diffy (3.4.3) - docile (1.4.0) + docile (1.4.1) drb (2.2.1) erubi (1.13.0) execjs (2.10.0) @@ -191,7 +187,7 @@ GEM friendly_id (5.5.1) activerecord (>= 4.0.0) getoptlong (0.2.1) - git (2.3.1) + git (2.3.2) activesupport (>= 5.0) addressable (~> 2.8) process_executer (~> 1.1) @@ -229,11 +225,13 @@ GEM activesupport (>= 6.0.0) railties (>= 6.0.0) io-console (0.7.2) - io-event (1.3.3) + io-endpoint (0.14.0) + io-event (1.7.4) + io-stream (0.6.1) irb (1.14.1) rdoc (>= 4.0.0) reline (>= 0.4.2) - json (2.7.4) + json (2.8.2) language_server-protocol (3.17.0.3) libv8-node (18.19.0.0) libv8-node (18.19.0.0-aarch64-linux) @@ -262,10 +260,11 @@ GEM libv8-node (~> 18.19.0.0) minitest (5.25.2) multi_json (1.15.0) - multi_xml (0.6.0) - net-http (0.4.1) + multi_xml (0.7.1) + bigdecimal (~> 3.1) + net-http (0.5.0) uri - net-imap (0.5.0) + net-imap (0.5.1) date net-protocol net-ldap (0.19.0) @@ -300,9 +299,9 @@ GEM forwardable singleton process_executer (1.2.0) - protocol-hpack (1.4.2) - protocol-http (0.25.0) - protocol-http1 (0.16.0) + protocol-hpack (1.5.1) + protocol-http (0.47.0) + protocol-http1 (0.28.1) protocol-http (~> 0.22) protocol-http2 (0.21.0) protocol-hpack (~> 1.4) @@ -347,21 +346,20 @@ GEM rack (>= 1.3) rackup (2.2.1) rack (>= 3) - webrick (~> 1.8) - rails (7.2.1.1) - actioncable (= 7.2.1.1) - actionmailbox (= 7.2.1.1) - actionmailer (= 7.2.1.1) - actionpack (= 7.2.1.1) - actiontext (= 7.2.1.1) - actionview (= 7.2.1.1) - activejob (= 7.2.1.1) - activemodel (= 7.2.1.1) - activerecord (= 7.2.1.1) - activestorage (= 7.2.1.1) - activesupport (= 7.2.1.1) + rails (7.2.2) + actioncable (= 7.2.2) + actionmailbox (= 7.2.2) + actionmailer (= 7.2.2) + actionpack (= 7.2.2) + actiontext (= 7.2.2) + actionview (= 7.2.2) + activejob (= 7.2.2) + activemodel (= 7.2.2) + activerecord (= 7.2.2) + activestorage (= 7.2.2) + activesupport (= 7.2.2) bundler (>= 1.15.0) - railties (= 7.2.1.1) + railties (= 7.2.2) rails-dom-testing (2.2.0) activesupport (>= 5.0.0) minitest @@ -369,9 +367,9 @@ GEM rails-html-sanitizer (1.6.0) loofah (~> 2.21) nokogiri (~> 1.14) - railties (7.2.1.1) - actionpack (= 7.2.1.1) - activesupport (= 7.2.1.1) + railties (7.2.2) + actionpack (= 7.2.2) + activesupport (= 7.2.2) irb (~> 1.13) rackup (>= 1.0.0) rake (>= 12.2) @@ -389,7 +387,7 @@ GEM reline (0.5.12) io-console (~> 0.5) rexml (3.3.9) - rspec-core (3.13.0) + rspec-core (3.13.2) rspec-support (~> 3.13.0) rspec-openapi (0.18.3) actionpack (>= 5.2.0) @@ -450,8 +448,8 @@ GEM addressable (>= 2.3.5) faraday (>= 0.17.3, < 3) scanf (1.0.0) - securerandom (0.3.1) - selenium-webdriver (4.25.0) + securerandom (0.3.2) + selenium-webdriver (4.27.0) base64 (~> 0.2) logger (~> 1.4) rexml (~> 3.2, >= 3.2.5) @@ -472,26 +470,30 @@ GEM actionpack (>= 6.1) activesupport (>= 6.1) sprockets (>= 3.0.0) - sqlite3 (2.1.1) + sqlite3 (2.3.1) mini_portile2 (~> 2.8.0) - sqlite3 (2.1.1-arm64-darwin) - sqlite3 (2.1.1-x86_64-darwin) - sqlite3 (2.1.1-x86_64-linux-gnu) + sqlite3 (2.3.1-aarch64-linux-gnu) + sqlite3 (2.3.1-aarch64-linux-musl) + sqlite3 (2.3.1-arm-linux-gnu) + sqlite3 (2.3.1-arm-linux-musl) + sqlite3 (2.3.1-x86-linux-gnu) + sqlite3 (2.3.1-x86-linux-musl) + sqlite3 (2.3.1-x86_64-linux-gnu) + sqlite3 (2.3.1-x86_64-linux-musl) stimulus-rails (1.3.4) railties (>= 6.0.0) stringio (3.1.2) thor (1.3.2) - tilt (2.3.0) - timeout (0.4.1) - timers (4.3.5) - traces (0.11.1) + tilt (2.4.0) + timeout (0.4.2) + traces (0.14.1) turbo-rails (2.0.11) actionpack (>= 6.0.0) railties (>= 6.0.0) tzinfo (2.0.6) concurrent-ruby (~> 1.0) unicode-display_width (2.6.0) - uri (0.13.0) + uri (1.0.2) useragent (0.16.10) web-console (4.2.1) actionview (>= 6.0.0) From 35d7d34078b91c842f8a0a0da11c0fcc7201ad66 Mon Sep 17 00:00:00 2001 From: Robert Waffen Date: Fri, 29 Nov 2024 12:32:02 +0100 Subject: [PATCH 5/8] fix: remove apple specific puppet builds --- Gemfile.lock | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 661af31a..10a65a78 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -322,18 +322,6 @@ GEM puppet-resource_api (~> 1.5) scanf (~> 1.0) semantic_puppet (~> 1.0) - puppet (8.10.0-universal-darwin) - CFPropertyList (>= 3.0.6, < 4) - concurrent-ruby (~> 1.0) - deep_merge (~> 1.0) - facter (>= 4.3.0, < 5) - fast_gettext (>= 2.1, < 4) - getoptlong (~> 0.2.0) - locale (~> 2.1) - multi_json (~> 1.13) - puppet-resource_api (~> 1.5) - scanf (~> 1.0) - semantic_puppet (~> 1.0) puppet-resource_api (1.9.0) hocon (>= 1.0) puppetdb-ruby (1.2.0) From 4bb5b06ffb0ca445556f13d2cf709bfeb8546b2b Mon Sep 17 00:00:00 2001 From: Robert Waffen Date: Fri, 29 Nov 2024 13:46:40 +0100 Subject: [PATCH 6/8] doc: add code comment why using the force_ruby_platform parameter on protobuf --- Gemfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Gemfile b/Gemfile index 5efe07d5..b6dc9d45 100644 --- a/Gemfile +++ b/Gemfile @@ -82,4 +82,6 @@ gem 'mini_racer', '~> 0.16.0' # minimal Google V8 JS engine for execjs gem 'libv8-node', '~> 18.19.0.0' # V8 JS engine # alpine specific +# this fixes an issue with the libv8-node gem +# otherwise it will segfault when using the precompiled binary from the gem gem 'google-protobuf', force_ruby_platform: true From e45b3d755234a962e8d1f31fda02cd9b5190503d Mon Sep 17 00:00:00 2001 From: Robert Waffen Date: Tue, 3 Dec 2024 11:10:48 +0100 Subject: [PATCH 7/8] doc: make info why we force protofbuf compile more specific --- Gemfile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index b6dc9d45..ac36264d 100644 --- a/Gemfile +++ b/Gemfile @@ -81,7 +81,10 @@ gem 'gitable', require: "gitable/uri" gem 'mini_racer', '~> 0.16.0' # minimal Google V8 JS engine for execjs gem 'libv8-node', '~> 18.19.0.0' # V8 JS engine -# alpine specific -# this fixes an issue with the libv8-node gem -# otherwise it will segfault when using the precompiled binary from the gem +# Alpine specific +# +# There is an issue with rails -> sass-embedded -> libv8-node -> protobuf +# +# We have to force bundler to compile protobuf on the current platform +# and do not download precompile binary-gems, otherwise the usage of relying gems will segfault gem 'google-protobuf', force_ruby_platform: true From c26033967d5b591d30fd1eea7e05566382996bb9 Mon Sep 17 00:00:00 2001 From: Robert Waffen Date: Tue, 3 Dec 2024 11:45:26 +0100 Subject: [PATCH 8/8] Release v3.1.0 --- CHANGELOG.md | 22 ++++++++++++++++++++++ RELEASE.md | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ffb0d17e..793be0b4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,28 @@ All notable changes to this project will be documented in this file. Each new release typically also includes the latest modulesync defaults. These should not affect the functionality of the module. +## [v3.1.0](https://github.com/betadots/hdm/tree/v3.1.0) (2024-12-03) + +[Full Changelog](https://github.com/betadots/hdm/compare/v3.0.0...v3.1.0) + +**Implemented enhancements:** + +- Performance tuning PQL queries [\#366](https://github.com/betadots/hdm/issues/366) +- Upgrade to Rails 7.2 [\#463](https://github.com/betadots/hdm/pull/463) ([oneiros](https://github.com/oneiros)) +- feat: do multi stage build [\#455](https://github.com/betadots/hdm/pull/455) ([rwaffen](https://github.com/rwaffen)) +- Replace `inventory` with `nodes` endpoint [\#381](https://github.com/betadots/hdm/pull/381) ([oneiros](https://github.com/oneiros)) + +**Merged pull requests:** + +- build\(deps\): bump rexml from 3.3.8 to 3.3.9 [\#470](https://github.com/betadots/hdm/pull/470) ([dependabot[bot]](https://github.com/apps/dependabot)) +- build\(deps\): bump the ruby group across 1 directory with 3 updates [\#469](https://github.com/betadots/hdm/pull/469) ([dependabot[bot]](https://github.com/apps/dependabot)) +- build\(deps\): bump the ruby group with 2 updates [\#466](https://github.com/betadots/hdm/pull/466) ([dependabot[bot]](https://github.com/apps/dependabot)) +- build\(deps\): bump the ruby group across 1 directory with 3 updates [\#465](https://github.com/betadots/hdm/pull/465) ([dependabot[bot]](https://github.com/apps/dependabot)) +- build\(deps\): bump actiontext from 7.1.4 to 7.1.4.1 [\#460](https://github.com/betadots/hdm/pull/460) ([dependabot[bot]](https://github.com/apps/dependabot)) +- build\(deps\): bump the ruby group with 2 updates [\#459](https://github.com/betadots/hdm/pull/459) ([dependabot[bot]](https://github.com/apps/dependabot)) +- build\(deps\): bump importmap-rails from 2.0.2 to 2.0.3 in the ruby group [\#457](https://github.com/betadots/hdm/pull/457) ([dependabot[bot]](https://github.com/apps/dependabot)) +- build\(deps\): bump importmap-rails from 2.0.1 to 2.0.2 in the ruby group [\#456](https://github.com/betadots/hdm/pull/456) ([dependabot[bot]](https://github.com/apps/dependabot)) + ## [v3.0.0](https://github.com/betadots/hdm/tree/v3.0.0) (2024-09-26) [Full Changelog](https://github.com/betadots/hdm/compare/v2.1.0...v3.0.0) diff --git a/RELEASE.md b/RELEASE.md index 383420b0..2f3564fb 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -18,7 +18,7 @@ bundle config set --local with 'release' bundle install CHANGELOG_GITHUB_TOKEN="token_MC_tokenface" bundle exec rake changelog -git commit ---signoff -all --message "Release v${RELEASE_VERSION}" +git commit --all --message "Release v${RELEASE_VERSION}" git push --set-upstream origin HEAD ```