Skip to content

Commit 0a0ff3e

Browse files
authored
Merge pull request #294 from OpenVoxProject/java17
Drop Java 17 support
2 parents e6d6f8e + 2143b72 commit 0a0ff3e

5 files changed

Lines changed: 29 additions & 38 deletions

File tree

.github/workflows/main.yml

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ jobs:
2727
# terminus rspec tests
2828
- rspec/pup-main
2929
# agent, server, db integration tests
30-
- int/openjdk17/pup-main/srv-main/pg-16/rich
3130
- int/openjdk21/pup-main/srv-main/pg-17/rich
3231
- int/openjdk21/pup-main/srv-main/pg-18/rich
3332

@@ -42,7 +41,7 @@ jobs:
4241
# Special cases
4342
include:
4443
# lint
45-
- flavor: lint/openjdk17
44+
- flavor: lint/openjdk21
4645
os: ubuntu-24.04
4746
ruby: '3.4'
4847

@@ -57,16 +56,6 @@ jobs:
5756
- flavor: core+ext/openjdk21/pg-16
5857
os: ubuntu-24.04
5958
ruby: '3.4'
60-
# jdk 17
61-
- flavor: core+ext/openjdk17/pg-18
62-
os: ubuntu-24.04
63-
ruby: '3.4'
64-
- flavor: core+ext/openjdk17/pg-17
65-
os: ubuntu-24.04
66-
ruby: '3.4'
67-
- flavor: core+ext/openjdk17/pg-16
68-
os: ubuntu-24.04
69-
ruby: '3.4'
7059

7160
steps:
7261
- name: Compute job outputs

src/puppetlabs/puppetdb/cli/util.clj

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,18 @@
1616
[version]
1717
(cond
1818
(re-matches #"1\.[1234567]($|(\..*))" version) :unsupported
19-
(re-matches #"1\.[89]($|(\..*))" version) :deprecated
20-
(re-matches #"10($|(\..*))" version) :deprecated
21-
(re-matches #"11($|(\..*))" version) :tested
22-
(re-matches #"17($|(\..*))" version) :official
23-
(re-matches #"21($|(\..*))" version) :tested
19+
(re-matches #"1\.[89]($|(\..*))" version) :unsupported
20+
(re-matches #"10($|(\..*))" version) :unsupported
21+
(re-matches #"11($|(\..*))" version) :unsupported
22+
(re-matches #"17($|(\..*))" version) :unsupported
23+
(re-matches #"21($|(\..*))" version) :official
2424
:else :unknown))
2525

2626
(defn jdk-unsupported-msg [version]
2727
(let [status (jdk-support-status version)]
2828
(case status
29-
(:unknown) {:warn (trs "JDK {0} is neither tested nor supported. Please use JDK 11, 17 or 21" version)}
30-
(:deprecated) {:warn (trs "JDK {0} is deprecated, please upgrade to JDK 11, 17 or 21" version)}
29+
(:unknown) {:warn (trs "JDK {0} is neither tested nor supported. Please use JDK 21" version)}
30+
(:deprecated) {:warn (trs "JDK {0} is deprecated, please upgrade to JDK 21" version)}
3131
(:official :tested) nil
3232
{:error (trs "PuppetDB doesn''t support JDK {0}" version)})))
3333

src/puppetlabs/puppetdb/utils.clj

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
[clojure.walk :as walk])
1515
(:import
1616
[clojure.lang ExceptionInfo]
17-
[java.net MalformedURLException URISyntaxException URL]
17+
[java.net MalformedURLException URI URISyntaxException]
1818
[java.nio ByteBuffer CharBuffer]
1919
[java.nio.channels SocketChannel]
2020
[java.nio.charset Charset CoderResult StandardCharsets]
@@ -190,21 +190,20 @@
190190
"Converts the `base-url' map to an ASCII URL. May throw
191191
MalformedURLException or URISyntaxException."
192192
[{:keys [protocol host port prefix version] :as _base-url} :- base-url-schema]
193-
(-> (URL. protocol host port
194-
(str prefix "/" (name (or version :v4))))
195-
.toURI .toASCIIString))
193+
(-> (URI. protocol nil host port
194+
(str prefix "/" (name (or version :v4))) nil nil)
195+
.toASCIIString))
196196

197197
(pls/defn-validated base-url->str-no-path :- s/Str
198198
"Converts the `base-url' map to an ASCII URL minus the path element. This can
199199
be used to build a full URL when you have an absolute path."
200200
[{:keys [protocol host port] :as _base-url} :- base-url-schema]
201-
(-> (URL. protocol host port "")
202-
.toURI .toASCIIString))
201+
(-> (URI. protocol nil host port "" nil nil)
202+
.toASCIIString))
203203

204204
(defn base-url->str-with-prefix
205205
[{:keys [protocol host port prefix] :as _base-url}]
206-
(-> (java.net.URL. protocol host port prefix)
207-
.toURI
206+
(-> (URI. protocol nil host port prefix nil nil)
208207
.toASCIIString))
209208

210209
(defn describe-bad-base-url

test/puppetlabs/puppetdb/cli/util_test.clj

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,15 @@
1313
(is (= :unknown (jdk-support-status "huh?")))
1414
(is (= :unsupported (jdk-support-status "1.7")))
1515
(is (= :unsupported (jdk-support-status "1.7.0")))
16-
(is (= :deprecated (jdk-support-status "1.8")))
17-
(is (= :deprecated (jdk-support-status "1.8.0")))
18-
(is (= :deprecated (jdk-support-status "1.9")))
19-
(is (= :deprecated (jdk-support-status "1.9.0")))
20-
(is (= :deprecated (jdk-support-status "10")))
21-
(is (= :deprecated (jdk-support-status "10.0")))
22-
(is (= :tested (jdk-support-status "11.0")))
23-
(is (= :tested (jdk-support-status "11.0.7")))
24-
(is (= :official (jdk-support-status "17.0.4"))))
16+
(is (= :unsupported (jdk-support-status "1.8")))
17+
(is (= :unsupported (jdk-support-status "1.8.0")))
18+
(is (= :unsupported (jdk-support-status "1.9")))
19+
(is (= :unsupported (jdk-support-status "1.9.0")))
20+
(is (= :unsupported (jdk-support-status "10")))
21+
(is (= :unsupported (jdk-support-status "10.0")))
22+
(is (= :unsupported (jdk-support-status "11.0")))
23+
(is (= :unsupported (jdk-support-status "11.0.7")))
24+
(is (= :unsupported (jdk-support-status "17.0.4")))
25+
(is (= :official (jdk-support-status "21")))
26+
(is (= :official (jdk-support-status "21.0")))
27+
(is (= :official (jdk-support-status "21.0.4"))))

test/puppetlabs/puppetdb/testutils/dashboard.clj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
"Similar to puppetlabs.puppetdb.utils/base-url->str but doesn't
55
include a version as the dashboard page does not include a version"
66
[{:keys [protocol host port prefix] :as _base-url}]
7-
(-> (java.net.URL. protocol host port prefix)
8-
.toURI .toASCIIString))
7+
(-> (java.net.URI. protocol nil host port prefix nil nil)
8+
.toASCIIString))
99

1010
(defn dashboard-page? [{:keys [body] :as _req}]
1111
(.contains body "<title>OpenvoxDB: Dashboard</title>"))

0 commit comments

Comments
 (0)