Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
20 changes: 19 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,26 @@ jobs:
- name: setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2'
ruby-version: '4.0'
bundler-cache: true
- id: docker-cache
uses: actions/cache/restore@v4
with:
path: /tmp/ezbake-builder.tar
key: docker-ezbake-${{ hashFiles('Dockerfile') }}
- name: load or build docker image
run: |
if [[ -f /tmp/ezbake-builder.tar ]]; then
docker load -i /tmp/ezbake-builder.tar
else
docker build -t ezbake-builder .
docker save ezbake-builder -o /tmp/ezbake-builder.tar
fi
- uses: actions/cache/save@v4
if: always() && steps.docker-cache.outputs.cache-hit != 'true'
with:
path: /tmp/ezbake-builder.tar
key: docker-ezbake-${{ hashFiles('Dockerfile') }}
- name: build it
run: bundle exec rake vox:build
- name: get version
Expand Down
26 changes: 13 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
FROM almalinux:9
FROM ruby:4.0-bookworm

WORKDIR /
RUN apt-get update && \
apt-get install -y --no-install-recommends \
openjdk-17-jdk-headless \
rpm \
&& rm -rf /var/lib/apt/lists/*

RUN dnf install -y --enablerepo=crb vim wget git rpm-build java-17-openjdk java-17-openjdk-devel libyaml-devel zlib zlib-devel gcc-c++ patch readline readline-devel libffi-devel openssl-devel make bzip2 autoconf automake libtool bison sqlite-devel
RUN wget https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein
RUN chmod a+x lein
RUN mv lein /usr/local/bin
RUN wget -q https://github.com/rbenv/rbenv-installer/raw/HEAD/bin/rbenv-installer -O- | bash
RUN /bin/bash --login -c 'rbenv install 3.2.9'
RUN /bin/bash --login -c 'rbenv global 3.2.9'
RUN git config --global user.email "openvox@voxpupuli.org"
RUN git config --global user.name "Vox Pupuli"
RUN git config --global --add safe.directory /code
RUN wget -q https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein -O /usr/local/bin/lein && \
chmod a+x /usr/local/bin/lein

CMD ["tail -f /dev/null"]
RUN git config --global user.email "openvox@voxpupuli.org" && \
git config --global user.name "Vox Pupuli" && \
git config --global --add safe.directory /code

CMD ["tail", "-f", "/dev/null"]
36 changes: 18 additions & 18 deletions project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@

(def i18n-version "1.0.4")
(def jackson-version "2.21.3")
(def slf4j-version "2.0.17")
(def slf4j-version "2.0.18")

;; If you modify the version manually, run release_scripts/sync_ezbake_dep.rb to keep
;; the ezbake dependency in sync.
Expand All @@ -110,7 +110,7 @@

:url "https://github.com/openvoxproject/openvoxdb/"

:min-lein-version "2.7.1"
:min-lein-version "2.12.0"

;; Abort when version ranges or version conflicts are detected in
;; dependencies. Also supports :warn to simply emit warnings.
Expand All @@ -121,7 +121,7 @@
;; and to avoid having to define versions in multiple places. If a component
;; defined under :dependencies ends up causing an error due to :pedantic? :abort,
;; because it is a dep of a dep with a different version, move it here.
:managed-dependencies [[org.clojure/clojure "1.12.4"]
:managed-dependencies [[org.clojure/clojure "1.12.5"]
[org.clojure/core.async "1.9.865"]
[org.clojure/core.match "1.1.1"]
[org.clojure/core.memoize "1.2.281"]
Expand Down Expand Up @@ -163,7 +163,7 @@
[instaparse "1.5.0"]
[metrics-clojure "2.10.0"]
[murphy "0.5.3"]
[net.logstash.logback/logstash-logback-encoder "7.4"]
[net.logstash.logback/logstash-logback-encoder "9.0"]
[org.apache.commons/commons-lang3 "3.20.0"]
[org.bouncycastle/bcpkix-jdk18on "1.84"]
[org.bouncycastle/bcpkix-fips "1.0.8"]
Expand All @@ -183,23 +183,23 @@
[org.openvoxproject/ssl-utils "3.6.4"]
[org.openvoxproject/stockpile "1.0.1"]
[org.openvoxproject/structured-logging "1.0.1"]
[org.openvoxproject/trapperkeeper "4.3.5"]
[org.openvoxproject/trapperkeeper "4.3.5" :classifier "test"]
[org.openvoxproject/trapperkeeper-authorization "2.2.0"]
[org.openvoxproject/trapperkeeper-authorization "2.2.0" :exclusions [io.dropwizard.metrics/metrics-core]]
[org.openvoxproject/trapperkeeper-filesystem-watcher "1.5.2"]
[org.openvoxproject/trapperkeeper-metrics "2.2.0"]
[org.openvoxproject/trapperkeeper-metrics "2.2.0" :exclusions [io.dropwizard.metrics/metrics-core]]
[org.openvoxproject/trapperkeeper-status "1.4.0"]
[org.openvoxproject/trapperkeeper-status "1.4.0" :exclusions [io.dropwizard.metrics/metrics-core]]
[org.openvoxproject/trapperkeeper-webserver "10.0.0"]
[org.openvoxproject/trapperkeeper-webserver "10.0.0" :classifier "test"]
[org.openvoxproject/trapperkeeper "5.0.0"]
[org.openvoxproject/trapperkeeper "5.0.0" :classifier "test"]
[org.openvoxproject/trapperkeeper-authorization "2.3.0"]
[org.openvoxproject/trapperkeeper-authorization "2.3.0" :exclusions [io.dropwizard.metrics/metrics-core]]
[org.openvoxproject/trapperkeeper-filesystem-watcher "1.6.0"]
[org.openvoxproject/trapperkeeper-metrics "2.3.0"]
[org.openvoxproject/trapperkeeper-metrics "2.3.0" :exclusions [io.dropwizard.metrics/metrics-core]]
[org.openvoxproject/trapperkeeper-status "1.5.0"]
[org.openvoxproject/trapperkeeper-status "1.5.0" :exclusions [io.dropwizard.metrics/metrics-core]]
[org.openvoxproject/trapperkeeper-webserver "12.0.2"]
[org.openvoxproject/trapperkeeper-webserver "12.0.2" :classifier "test"]
[org.postgresql/postgresql "42.7.11"]
[org.yaml/snakeyaml "2.6"]
[prismatic/schema "1.4.1"]
[riddley "0.2.2"]
[ring/ring-codec "1.3.0"]
[ring/ring-core "1.14.2"]
[ring/ring-core "1.15.4"]
[ring/ring-mock "0.6.2"]
[robert/hooke "1.3.0"]
[timofreiberg/bultitude "0.3.1"]
Expand Down Expand Up @@ -371,7 +371,7 @@
;; via the release_scripts/sync_ezbake_dep.rb script.
[org.openvoxproject/puppetdb "8.14.0-SNAPSHOT"]]
:name "puppetdb"
:plugins [[org.openvoxproject/lein-ezbake ~(or (System/getenv "EZBAKE_VERSION") "2.7.4")]]}
:plugins [[org.openvoxproject/lein-ezbake ~(or (System/getenv "EZBAKE_VERSION") "2.7.7")]]}
:ezbake-fips {:dependencies ^:replace [[org.bouncycastle/bcpkix-fips]
[org.bouncycastle/bc-fips]
[org.bouncycastle/bctls-fips]
Expand All @@ -381,7 +381,7 @@
[org.openvoxproject/puppetdb "8.14.0-SNAPSHOT"]]
:name "puppetdb"
:uberjar-exclusions [#"^org/bouncycastle/.*"]
:plugins [[org.openvoxproject/lein-ezbake ~(or (System/getenv "EZBAKE_VERSION") "2.7.4")]]}
:plugins [[org.openvoxproject/lein-ezbake ~(or (System/getenv "EZBAKE_VERSION") "2.7.7")]]}
:testutils {:source-paths ^:replace ["test"]
:resource-paths ^:replace []
;; Something else may need adjustment, but
Expand Down
2 changes: 1 addition & 1 deletion rakelib/build.rake
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ module Vox
ezbake_version_var = ENV['EZBAKE_VERSION'] ? "EZBAKE_VERSION=#{ENV['EZBAKE_VERSION']}" : ""

puts 'Building openvoxdb'
@runner.exec('cd /code && rm -rf ruby output && bundle install --without test && lein install')
@runner.exec('cd /code && rm -rf ruby output && bundle config set without test && bundle install && lein install')

unless @debs.empty? && @nonfips_rpms.empty?
@runner.exec(
Expand Down
15 changes: 2 additions & 13 deletions src/puppetlabs/puppetdb/utils.clj
Original file line number Diff line number Diff line change
Expand Up @@ -582,17 +582,6 @@
(on-timeout)
(time-limited-seq (rest s) deadline-ns on-timeout))))))))

(defn- last-interceptor [interceptor]
;; See the jetty org.eclipse.jetty.server.HttpOutput javadocs:
;;
;; The HttpChannel is an Interceptor and is always the
;; last link in any Interceptor chain.
;;
;; ...and it ends up being something that is or has a SocketChannel.
(->> (iterate #(.getNextInterceptor %) interceptor)
(take-while identity)
last))

(defprotocol HasSocketChannel
(get-socket-channel [this] "Returns the associated socket channel."))

Expand All @@ -604,7 +593,7 @@
"Returns the socket channel (i.e. something that can be registered
with a Selector) associated with a jetty response object."
[response]
;; In Jetty 12, access the EndPoint through ServletChannel directly.
;; Sometimes the transport is a SocketChannel, and sometimes it's an
;; EndPoint.
(-> response .getHttpOutput .getInterceptor last-interceptor
.getEndPoint .getTransport get-socket-channel))
(-> response .getServletChannel .getEndPoint .getTransport get-socket-channel))