Compare commits

..

10 Commits

Author SHA1 Message Date
Andrey Antukh
f0a02e4734 📎 Set version to 1.8.1-alpha. 2021-09-20 13:58:49 +02:00
Andrey Antukh
59464469c2 🐛 Fix unexpected exception on audit log persistence function. 2021-09-20 11:26:02 +02:00
Andrey Antukh
4d880a0d77 🐛 Fix unexpected exception related to some potok issues. 2021-09-20 11:22:56 +02:00
Andrey Antukh
06e54a17c0 📚 Update some comments on docker config.env file. 2021-09-16 11:35:45 +02:00
Andrey Antukh
1fe23ff732 📎 Minor renaming of config variables. 2021-09-16 11:33:40 +02:00
Andrey Antukh
39278b47dd 🐛 Fix typo in prev commit. 2021-09-16 11:31:54 +02:00
Andrey Antukh
bff0030f2b 🐛 Fix frontend docker image entry point. 2021-09-16 11:28:39 +02:00
Andrey Antukh
e48b01fd18 📎 Add default env variable for browser executable path. 2021-09-15 14:28:57 +02:00
Andrey Antukh
13d83cb0d1 🐛 Fix incorrect handling of metrics on notifications module. 2021-09-14 10:45:06 +02:00
Andrey Antukh
033355395f 🐛 Fix metrics on ws connections. 2021-09-13 15:00:08 +02:00
10 changed files with 41 additions and 54 deletions

View File

@@ -9,6 +9,15 @@
### :boom: Breaking changes
### :heart: Community contributions by (Thank you!)
## 1.8.1-alpha
### :bug: Bugs fixed
- Fix project renaming issue (and some other related to the same underlying bug).
- Fix internal exception on audit log persistence layer.
- Set proper environment variable on docker images for chrome executable.
- Fix internal metrics on websocket connections.
## 1.8.0-alpha

View File

@@ -184,10 +184,11 @@
(db/tjson (:props event))
"backend"])]
(aa/with-thread executor
(db/with-atomic [conn pool]
(db/insert-multi! conn :audit-log
[:id :name :type :profile-id :tracked-at :ip-addr :props :source]
(sequence (map event->row) events))))))
(when (seq events)
(db/with-atomic [conn pool]
(db/insert-multi! conn :audit-log
[:id :name :type :profile-id :tracked-at :ip-addr :props :source]
(sequence (map event->row) events)))))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Archive Task

View File

@@ -135,7 +135,7 @@
ws-send (mtx/wrap-counter ws-send mtx-messages ["send"])]
(letfn [(on-connect [conn]
(mtx-aconn :inc)
((::mtx/fn mtx-aconn) {:cmd :inc :by 1})
;; A subscription channel should use a lossy buffer
;; because we can't penalize normal clients when one
;; slow client is connected to the room.
@@ -162,8 +162,8 @@
(a/<! (handle-connect cfg))
;; when connection is closed
(mtx-aconn :dec)
(mtx-sessions :observe (/ (inst-ms (dt/diff created-at (dt/now))) 1000.0))
((::mtx/fn mtx-aconn) {:cmd :dec :by 1})
((::mtx/fn mtx-sessions) {:val (/ (inst-ms (dt/diff created-at (dt/now))) 1000.0)})
;; close subscription
(a/close! sub-ch))))

View File

@@ -5,7 +5,8 @@ ARG DEBIAN_FRONTEND=noninteractive
ENV LANG=en_US.UTF-8 \
LC_ALL=en_US.UTF-8 \
NODE_VERSION=v14.17.5
NODE_VERSION=v14.17.5 \
PENPOT_BROWSER_EXECUTABLE_PATH=/usr/bin/chromium
RUN set -ex; \
mkdir -p /etc/resolvconf/resolv.conf.d; \

View File

@@ -35,17 +35,13 @@ PENPOT_SMTP_DEFAULT_REPLY_TO=no-reply@example.com
# PENPOT_SMTP_TLS=true
# PENPOT_SMTP_SSL=false
# Enable or disable external user registration process.
PENPOT_REGISTRATION_ENABLED=true
# Feature flags. Right now they are only affect frontend, but in
# future release they will affect to both backend and frontend.
PENPOT_FLAGS="enable-registration enable-demo-users"
# Comma separated list of allowed domains to register. Empty to allow all.
# PENPOT_REGISTRATION_DOMAIN_WHITELIST=""
# Penpot comes with the facility to create quick demo users that are
# automatically deleted after some time. This settings enables or disables the
# creation of demo users.
PENPOT_ALLOW_DEMO_USERS=true
## Authentication providers
# Google

View File

@@ -9,26 +9,6 @@ log() {
## App Frontend config
#########################################
update_demo_warning() {
if [ -n "$PENPOT_DEMO_WARNING" ]; then
log "Updating Demo Warning: $PENPOT_DEMO_WARNING"
sed -i \
-e "s|^//var penpotDemoWarning = .*;|var penpotDemoWarning = $PENPOT_DEMO_WARNING;|g" \
"$1"
fi
}
update_allow_demo_users() {
if [ -n "$PENPOT_ALLOW_DEMO_USERS" ]; then
log "Updating Allow Demo Users: $PENPOT_ALLOW_DEMO_USERS"
sed -i \
-e "s|^//var penpotAllowDemoUsers = .*;|var penpotAllowDemoUsers = $PENPOT_ALLOW_DEMO_USERS;|g" \
"$1"
fi
}
update_google_client_id() {
if [ -n "$PENPOT_GOOGLE_CLIENT_ID" ]; then
log "Updating Google Client Id: $PENPOT_GOOGLE_CLIENT_ID"
@@ -67,6 +47,7 @@ update_oidc_client_id() {
fi
}
# DEPRECATED
update_login_with_ldap() {
if [ -n "$PENPOT_LOGIN_WITH_LDAP" ]; then
log "Updating Login with LDAP: $PENPOT_LOGIN_WITH_LDAP"
@@ -76,7 +57,7 @@ update_login_with_ldap() {
fi
}
# DEPRECATED
update_registration_enabled() {
if [ -n "$PENPOT_REGISTRATION_ENABLED" ]; then
log "Updating Registration Enabled: $PENPOT_REGISTRATION_ENABLED"
@@ -86,14 +67,6 @@ update_registration_enabled() {
fi
}
update_analytics_enabled() {
if [ -n "$PENPOT_ANALYTICS_ENABLED" ]; then
sed -i \
-e "s|^//var penpotAnalyticsEnabled = .*;|var penpotAnalyticsEnabled = $PENPOT_ANALYTICS_ENABLED;|g" \
"$1"
fi
}
update_flags() {
if [ -n "$PENPOT_FLAGS" ]; then
sed -i \
@@ -102,14 +75,11 @@ update_flags() {
fi
}
update_demo_warning /var/www/app/js/config.js
update_allow_demo_users /var/www/app/js/config.js
update_google_client_id /var/www/app/js/config.js
update_gitlab_client_id /var/www/app/js/config.js
update_github_client_id /var/www/app/js/config.js
update_oidc_client_id /var/www/app/js/config.js
update_login_with_ldap /var/www/app/js/config.js
update_registration_enabled /var/www/app/js/config.js
update_analytics_enabled /var/www/app/js/config.js
update_flags /var/www/app/js/config.js
exec "$@";

View File

@@ -7,13 +7,13 @@
(ns app.config
(:refer-clojure :exclude [get])
(:require
[app.common.data :as d]
["process" :as process]
[cljs.pprint]
[cuerdas.core :as str]
[app.common.data :as d]
[app.common.spec :as us]
[cljs.spec.alpha :as s]
[cljs.core :as c]
[cljs.pprint]
[cljs.spec.alpha :as s]
[cuerdas.core :as str]
[lambdaisland.uri :as u]))
(def defaults
@@ -22,6 +22,7 @@
:browser-concurrency 5
:browser-strategy :incognito})
(s/def ::browser-executable-path ::us/string)
(s/def ::public-uri ::us/string)
(s/def ::http-server-port ::us/integer)
(s/def ::browser-concurrency ::us/integer)
@@ -31,7 +32,8 @@
(s/keys :opt-un [::public-uri
::http-server-port
::browser-concurrency
::browser-strategy]))
::browser-strategy
::browser-executable-path]))
(defn- read-env
[prefix]
(let [env (unchecked-get process "env")

View File

@@ -8,7 +8,7 @@
funcool/beicon {:mvn/version "2021.07.05-1"}
funcool/okulary {:mvn/version "2020.04.14-0"}
funcool/potok {:mvn/version "2021.06.07-0"}
funcool/potok {:mvn/version "2021.09.20-0"}
funcool/rumext {:mvn/version "2021.05.12-1"}
funcool/tubax {:mvn/version "2021.05.20-0"}

View File

@@ -54,6 +54,14 @@
:browser
:webworker))
(def available-flags
#{:registration
:audit-log
:demo-users
:user-feedback
:demo-warning
:login-with-ldap})
(def default-flags
#{:registration :demo-users})

View File

@@ -1 +1 @@
1.8.0-alpha
1.8.1-alpha