Skip to content

Commit

Permalink
Merge pull request #271 from slr71/main
Browse files Browse the repository at this point in the history
CORE-2006: update dependencies.
  • Loading branch information
slr71 authored Jul 27, 2024
2 parents 3f11af3 + 12bc67d commit 0d0fa31
Show file tree
Hide file tree
Showing 33 changed files with 489 additions and 736 deletions.
1 change: 0 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
pom.xml
pom.xml.asc
*.jar
!opentelemetry-javaagent.jar
*.class
/.lein-*
/.nrepl-port
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
pom.xml
*.jar
!opentelemetry-javaagent.jar
/lib/
/classes/
/bin
Expand Down
12 changes: 6 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM clojure:openjdk-17-lein-alpine
FROM clojure:temurin-22-lein-jammy

WORKDIR /usr/src/app

RUN apk upgrade apk-tools && \
apk upgrade && \
apk add --no-cache git
RUN apt-get update && \
apt-get install -y git && \
rm -rf /var/lib/apt/lists/*

CMD ["--help"]

Expand All @@ -14,7 +14,7 @@ RUN mkdir -p /etc/iplant/de/crypto && \
touch /etc/iplant/de/crypto/secring.gpg && \
touch /etc/iplant/de/crypto/trustdb.gpg

RUN ln -s "/opt/openjdk-17/bin/java" "/bin/apps"
RUN ln -s "/opt/java/openjdk/bin/java" "/bin/apps"

ENV OTEL_TRACES_EXPORTER none

Expand All @@ -29,7 +29,7 @@ RUN lein do clean, uberjar && \
lein clean && \
rm -r ~/.m2/repository

ENTRYPOINT ["apps", "-Dlogback.configurationFile=/etc/iplant/de/logging/apps-logging.xml", "-javaagent:/usr/src/app/opentelemetry-javaagent.jar", "-Dotel.resource.attributes=service.name=apps", "-cp", ".:apps-standalone.jar:/", "apps.core"]
ENTRYPOINT ["apps", "-Dlogback.configurationFile=/etc/iplant/de/logging/apps-logging.xml", "-cp", ".:apps-standalone.jar:/", "apps.core"]

ARG git_commit=unknown
ARG version=unknown
Expand Down
97 changes: 0 additions & 97 deletions apps.properties.tmpl

This file was deleted.

Binary file removed opentelemetry-javaagent.jar
Binary file not shown.
58 changes: 26 additions & 32 deletions project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -7,52 +7,46 @@
(string/trim (:out (sh "git" "rev-parse" "HEAD")))
""))

(defproject org.cyverse/apps "2.15.0-SNAPSHOT"
(defproject org.cyverse/apps "3.0.3-SNAPSHOT"
:description "Framework for hosting DiscoveryEnvironment metadata services."
:url "https://github.com/cyverse-de/apps"
:license {:name "BSD"
:url "http://iplantcollaborative.org/sites/default/files/iPLANT-LICENSE.txt"}
:url "https://cyverse.org/license"}
:manifest {"Git-Ref" ~(git-ref)}
:uberjar-name "apps-standalone.jar"
:dependencies [[org.clojure/clojure "1.11.1"]
[clj-http "3.12.3"]
:dependencies [[org.clojure/clojure "1.11.3"]
[clj-http "3.13.0"]
[com.cemerick/url "0.1.1" :exclusions [com.cemerick/clojurescript.test]]
[com.google.guava/guava "23.0"]
[de.ubercode.clostache/clostache "1.4.0"]
[com.github.seancorfield/honeysql "2.4.972"]
[com.github.seancorfield/honeysql "2.6.1147"]
[medley "1.4.0"]
[metosin/compojure-api "1.1.13"]
[org.cyverse/async-tasks-client "0.0.4"]
[org.cyverse/authy "2.8.0"]
[org.cyverse/clojure-commons "3.0.7"]
[org.cyverse/debug-utils "2.8.1"]
[org.cyverse/kameleon "3.0.6"]
[org.cyverse/mescal "3.1.11"]
[org.cyverse/metadata-client "3.1.1"]
[org.cyverse/common-cli "2.8.1"]
[org.cyverse/common-cfg "2.8.2"]
[org.cyverse/common-swagger-api "3.4.4"]
[org.cyverse/cyverse-groups-client "0.1.8"]
[org.cyverse/otel "0.2.5"]
[org.cyverse/permissions-client "2.8.3"]
[org.cyverse/service-logging "2.8.3"]
[org.cyverse/event-messages "0.0.1"]
[org.flatland/ordered "1.15.10"]
[com.novemberain/langohr "3.7.0"]
[metosin/compojure-api "1.1.14"]
[org.cyverse/async-tasks-client "0.0.5"]
[org.cyverse/authy "3.0.1"]
[org.cyverse/clojure-commons "3.0.8"]
[org.cyverse/debug-utils "2.9.0"]
[org.cyverse/kameleon "3.0.10"]
[org.cyverse/mescal "3.1.12"]
[org.cyverse/metadata-client "3.1.2"]
[org.cyverse/common-cli "2.8.2"]
[org.cyverse/common-cfg "2.8.3"]
[org.cyverse/common-swagger-api "3.4.5"]
[org.cyverse/cyverse-groups-client "0.1.9"]
[org.cyverse/permissions-client "2.8.4"]
[org.cyverse/service-logging "2.8.4"]
[org.flatland/ordered "1.15.12"]
[me.raynes/fs "1.4.6"]
[mvxcvi/clj-pgp "1.1.0"]
[mvxcvi/clj-pgp "1.1.1"]
[pandect "1.0.2"]
[ring/ring-jetty-adapter "1.9.6"]]
[ring/ring-jetty-adapter "1.12.2"]]
:eastwood {:exclude-namespaces [apps.protocols :test-paths]
:linters [:wrong-arity :wrong-ns-form :wrong-pre-post :wrong-tag :misplaced-docstrings]}
:plugins [[lein-ancient "0.7.0"]
[lein-cljfmt "0.9.2"]
[lein-swank "1.4.5"]
[test2junit "1.4.4"]
[jonase/eastwood "1.3.0"]]
:profiles {:dev {:plugins [[lein-ring "0.12.5"]]
:resource-paths ["conf/test"]
:jvm-opts ["-Dotel.javaagent.enabled=false"]}
[jonase/eastwood "1.4.3"]]
:profiles {:dev {:plugins [[lein-ring "0.12.6"]]
:resource-paths ["conf/test"]}
:repl {:source-paths ["repl"]}
:uberjar {:aot :all}}
:repl-options {:timeout 120000}
Expand All @@ -61,4 +55,4 @@
:init apps.core/load-config-from-file
:port 31323}
:uberjar-exclusions [#"(?i)META-INF/[^/]*[.](SF|DSA|RSA)"]
:jvm-opts ["-Dlogback.configurationFile=/etc/iplant/de/logging/apps-logging.xml" "-javaagent:./opentelemetry-javaagent.jar" "-Dotel.resource.attributes=service.name=apps"])
:jvm-opts ["-Dlogback.configurationFile=/etc/iplant/de/logging/apps-logging.xml"])
33 changes: 0 additions & 33 deletions src/apps/amqp.clj

This file was deleted.

9 changes: 2 additions & 7 deletions src/apps/clients/async_tasks.clj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
(:require [apps.util.config :as config]
[clojure.string :as string]
[clojure.tools.logging :as log]
[otel.otel :as otel]
[async-tasks-client.core :as async-tasks-client]))

(defn get-by-id
Expand Down Expand Up @@ -35,12 +34,8 @@

(defn run-async-thread
[async-task-id thread-function prefix]
(otel/with-span [outer-span ["run-async-thread" {:kind :producer :attributes {"async-task-id" (str async-task-id)}}]]
(let [^Runnable task-thread (fn []
(with-open [_ (otel/span-scope outer-span)]
(otel/with-span [s ["async thread" {:kind :consumer :attributes {"async-task-id" (str async-task-id)}}]]
(thread-function async-task-id))))]
(.start (Thread. task-thread (str prefix "-" (string/replace async-task-id #".*/tasks/" "")))))
(let [^Runnable task-thread (fn [] (thread-function async-task-id))]
(.start (Thread. task-thread (str prefix "-" (string/replace async-task-id #".*/tasks/" ""))))
async-task-id))

(defn new-task
Expand Down
4 changes: 2 additions & 2 deletions src/apps/clients/notifications.clj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
[apps.persistence.jobs :as jp]
[apps.persistence.tool-requests :as tp]
[apps.util.config :as config])
(:use [apps.service.util :only [uuid?]]
(:use [apps.service.util :only [valid-uuid?]]
[cemerick.url :only [url]]
[pandect.algo.sha256 :only [sha256]]))

Expand Down Expand Up @@ -72,7 +72,7 @@
same app, so this function arbitrarily takes the first notification type associated with the app for now.
Also, apps that do not run in the DE will always have a notification type of `analysis`."
[app-id app-version-id]
(or (when (uuid? app-id) (first (amp/get-app-notification-types app-version-id)))
(or (when (valid-uuid? app-id) (first (amp/get-app-notification-types app-version-id)))
"analysis"))

(defn- format-job-status-update
Expand Down
4 changes: 2 additions & 2 deletions src/apps/clients/notifications/common_sharing.clj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(ns apps.clients.notifications.common-sharing
(:use [clostache.parser :only [render]])
(:require [apps.clients.iplant-groups :as ipg]))
(:require [apps.clients.iplant-groups :as ipg]
[apps.util.string :refer [render]]))

(def grouping-threshold 10)

Expand Down
Loading

0 comments on commit 0d0fa31

Please sign in to comment.