Skip to content

Commit

Permalink
Merge branch 'next' into SER-2219-name-input-improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
can-angun authored Jan 10, 2025
2 parents 25b46a2 + ddbfec6 commit a43ff7c
Show file tree
Hide file tree
Showing 28 changed files with 834 additions and 707 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/stable-je-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# This is a basic workflow to help you get started with Actions

name: Deploy Journey Engine

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ next ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
deploy:
runs-on: ubuntu-latest

steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3

- name: Deploy server
shell: bash
env:
SSH_PRIVATE_KEY: ${{ secrets.STABLE_JE_SSH_PRIVATE_KEY }}
run: bash ./bin/scripts/deploy-je.sh
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,26 @@
## Version 25.x.x
Features:
- [alerts] alerts table default order should be by creation time newest at the top

## Version 24.12.x

Fixes:
- [push] Fixed bug where IOS credentials get mixed up while sending messages from different apps at the same time
- [push] Fixed bug where it crashes in connection pool growth because of a type mismatch in an if condition

Features:
- [user-management] Global admins can now disable 2FA for individual users

Fixes:
- [gridfs] fixes for moving to Promises

Dependencies:
- Bump express from 4.21.1 to 4.21.2
- Bump mocha from 10.2.0 to 10.8.2
- Bump sass from 1.81.0 to 1.83.1
- Bump countly-sdk-nodejs from 24.10.0 to 24.10.1
- Bump express-rate-limit from 7.4.1 to 7.5.0
- Bump puppeteer from 23.10.4 to 23.11.1

## Version 24.12
Features:
Expand Down
10 changes: 5 additions & 5 deletions Dockerfile-api
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:hydrogen-bullseye-slim
FROM node:iron-bookworm-slim

ARG COUNTLY_PLUGINS=mobile,web,desktop,plugins,density,locale,browser,sources,views,logger,systemlogs,populator,reports,crashes,push,star-rating,slipping-away-users,compare,server-stats,dbviewer,times-of-day,compliance-hub,alerts,onboarding,consolidate,remote-config,hooks,dashboards,sdk,data-manager,guides
# Countly Enterprise:
Expand All @@ -25,15 +25,14 @@ COPY . .

# install required dependencies which slim image doesn't have
RUN apt-get update && \
apt-get install -y iputils-ping procps net-tools telnet apt-transport-https curl wget git python2 make gcc g++ unzip && \
ln -s /usr/bin/python2.7 /usr/bin/python
apt-get install -y iputils-ping procps net-tools telnet apt-transport-https curl wget git make gcc g++ unzip xz-utils

RUN apt-get update && \
apt-get upgrade -y && \
cd /usr/src && \
wget https://www.python.org/ftp/python/3.8.12/Python-3.8.12.tar.xz && \
tar -xf Python-3.8.12.tar.xz && \
apt-get install -y build-essential sudo zlib1g-dev libssl1.1 libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libsqlite3-dev libreadline-dev libffi-dev curl libbz2-dev && \
apt-get install -y build-essential sudo zlib1g-dev libssl3 libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libsqlite3-dev libreadline-dev libffi-dev curl libbz2-dev && \
cd Python-3.8.12 && \
./configure --enable-optimizations --enable-shared && \
make && \
Expand All @@ -51,14 +50,15 @@ RUN curl -s -L -o /tmp/tini.deb "https://github.com/krallin/tini/releases/downlo
# preinstall
cp -n ./api/config.sample.js ./api/config.js && \
cp -n ./frontend/express/config.sample.js ./frontend/express/config.js && \
HOME=/tmp npm install -g npm@latest && \
HOME=/tmp npm install --unsafe-perm=true --allow-root && \
HOME=/tmp npm install argon2 --build-from-source --unsafe-perm=true --allow-root && \
./bin/docker/preinstall.sh && \
bash /opt/countly/bin/scripts/detect.init.sh && \
\
# cleanup & chown
npm remove -y --no-save mocha nyc should supertest && \
apt-get remove -y git gcc g++ make automake autoconf libtool pkg-config unzip sqlite3 && \
apt-get remove -y git gcc g++ make automake autoconf libtool pkg-config unzip sqlite3 wget && \
apt-get install -y libgbm-dev libgbm1 gconf-service libasound2 libatk1.0-0 libatk-bridge2.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils && \
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
rm -rf test /tmp/* /tmp/.??* /var/tmp/* /var/tmp/.??* /var/log/* /root/.npm && \
Expand Down
3 changes: 2 additions & 1 deletion Dockerfile-centos-api
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ RUN yum update -y
RUN curl -s -L -o /tmp/tini.rpm "https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini_${TINI_VERSION}.rpm" && \
rpm -i /tmp/tini.rpm && \
\
curl -sL https://rpm.nodesource.com/setup_18.x | bash - && \
curl -sL https://rpm.nodesource.com/setup_20.x | bash - && \
yum install -y nodejs python3.8 python2 python38-libs python38-devel python38-pip nss libdrm libgbm cyrus-sasl* && \
ln -s /usr/bin/node /usr/bin/nodejs && \
unlink /usr/bin/python3 && \
Expand All @@ -53,6 +53,7 @@ RUN curl -s -L -o /tmp/tini.rpm "https://github.com/krallin/tini/releases/downlo
# preinstall
cp -n ./api/config.sample.js ./api/config.js && \
cp -n ./frontend/express/config.sample.js ./frontend/express/config.js && \
HOME=/tmp npm install -g npm@latest && \
HOME=/tmp npm install --unsafe-perm=true --allow-root && \
HOME=/tmp npm install argon2 --build-from-source --unsafe-perm=true --allow-root && \
./bin/docker/preinstall.sh && \
Expand Down
3 changes: 2 additions & 1 deletion Dockerfile-centos-frontend
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ RUN yum update -y
RUN curl -s -L -o /tmp/tini.rpm "https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini_${TINI_VERSION}.rpm" && \
rpm -i /tmp/tini.rpm && \
\
curl -sL https://rpm.nodesource.com/setup_18.x | bash - && \
curl -sL https://rpm.nodesource.com/setup_20.x | bash - && \
yum install -y nodejs python3.8 python2 python38-libs python38-devel python38-pip nss libdrm libgbm cyrus-sasl* && \
ln -s /usr/bin/node /usr/bin/nodejs && \
unlink /usr/bin/python3 && \
Expand All @@ -52,6 +52,7 @@ RUN curl -s -L -o /tmp/tini.rpm "https://github.com/krallin/tini/releases/downlo
cp -n ./frontend/express/public/javascripts/countly/countly.config.sample.js ./frontend/express/public/javascripts/countly/countly.config.js && \
cp -n ./frontend/express/config.sample.js ./frontend/express/config.js && \
cp -n ./api/config.sample.js ./api/config.js && \
HOME=/tmp npm install -g npm@latest && \
HOME=/tmp npm install --unsafe-perm=true --allow-root && \
HOME=/tmp npm install argon2 --build-from-source --unsafe-perm=true --allow-root && \
./bin/docker/preinstall.sh && \
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile-core
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ RUN useradd -r -M -U -d /opt/countly -s /bin/false countly && \
gcc g++ make binutils autoconf automake autotools-dev libtool pkg-config zlib1g-dev libcunit1-dev libssl-dev libxml2-dev libev-dev \
libevent-dev libjansson-dev libjemalloc-dev cython python3-dev python-setuptools && \
# node
wget -qO- https://deb.nodesource.com/setup_18.x | bash - && \
wget -qO- https://deb.nodesource.com/setup_20.x | bash - && \
# data_migration (mongo clients)
wget -qO - https://www.mongodb.org/static/pgp/server-6.0.asc | sudo apt-key add - && \
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/6.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-6.0.list && \
Expand Down
10 changes: 5 additions & 5 deletions Dockerfile-frontend
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:hydrogen-bullseye-slim
FROM node:iron-bookworm-slim

ARG COUNTLY_PLUGINS=mobile,web,desktop,plugins,density,locale,browser,sources,views,logger,systemlogs,populator,reports,crashes,push,star-rating,slipping-away-users,compare,server-stats,dbviewer,times-of-day,compliance-hub,alerts,onboarding,consolidate,remote-config,hooks,dashboards,sdk,data-manager,guides
# Countly Enterprise:
Expand All @@ -21,15 +21,14 @@ WORKDIR /opt/countly
COPY . .
# install required dependencies which slim image doesn't have
RUN apt-get update && \
apt-get install -y iputils-ping net-tools telnet apt-transport-https procps curl wget git python2 make gcc g++ unzip && \
ln -s /usr/bin/python2.7 /usr/bin/python
apt-get install -y iputils-ping net-tools telnet apt-transport-https procps curl wget git make gcc g++ unzip xz-utils

RUN apt-get update && \
apt-get upgrade -y && \
cd /usr/src && \
wget https://www.python.org/ftp/python/3.8.12/Python-3.8.12.tar.xz && \
tar -xf Python-3.8.12.tar.xz && \
apt-get install -y build-essential sudo zlib1g-dev libssl1.1 libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libsqlite3-dev libreadline-dev libffi-dev curl libbz2-dev && \
apt-get install -y build-essential sudo zlib1g-dev libssl3 libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libsqlite3-dev libreadline-dev libffi-dev curl libbz2-dev && \
cd Python-3.8.12 && \
./configure --enable-optimizations --enable-shared && \
make && \
Expand All @@ -48,6 +47,7 @@ RUN curl -s -L -o /tmp/tini.deb "https://github.com/krallin/tini/releases/downlo
cp -n ./api/config.sample.js ./api/config.js && \
cp -n ./frontend/express/config.sample.js ./frontend/express/config.js && \
cp -n ./frontend/express/public/javascripts/countly/countly.config.sample.js ./frontend/express/public/javascripts/countly/countly.config.js && \
HOME=/tmp npm install -g npm@latest && \
HOME=/tmp npm install --unsafe-perm=true --allow-root && \
HOME=/tmp npm install argon2 --build-from-source --unsafe-perm=true --allow-root && \
./bin/docker/preinstall.sh && \
Expand All @@ -56,7 +56,7 @@ RUN curl -s -L -o /tmp/tini.deb "https://github.com/krallin/tini/releases/downlo
\
# cleanup & chown
npm remove -y --no-save mocha nyc should supertest puppeteer && \
apt-get remove -y git gcc g++ make automake autoconf libtool pkg-config unzip sqlite3 && \
apt-get remove -y git gcc g++ make automake autoconf libtool pkg-config unzip sqlite3 wget && \
apt-get autoremove -y && \
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
rm -rf test /tmp/* /tmp/.??* /var/tmp/* /var/tmp/.??* /var/log/* /root/.npm && \
Expand Down
8 changes: 7 additions & 1 deletion api/utils/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,13 @@ common.getDate = function(timestamp, timezone) {
* @returns {number} current day of the year
*/
common.getDOY = function(timestamp, timezone) {
var endDate = (timestamp) ? moment.unix(timestamp * 1000) : moment();
var endDate;
if (timestamp && timestamp.toString().length === 13) {
endDate = (timestamp) ? moment.unix(timestamp / 1000) : moment();
}
else {
endDate = (timestamp) ? moment.unix(timestamp) : moment();
}

if (timezone) {
endDate.tz(timezone);
Expand Down
Loading

0 comments on commit a43ff7c

Please sign in to comment.