Skip to content

Commit cc489cf

Browse files
authored
Merge pull request #706 from topcoder-platform/develop
Remove Tideways dependency
2 parents 21222b1 + 8fcbf73 commit cc489cf

File tree

10 files changed

+28
-131
lines changed

10 files changed

+28
-131
lines changed

.circleci/config.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ install_dependency: &install_dependency
1313
install_deploysuite: &install_deploysuite
1414
name: Installation of install_deploysuite.
1515
command: |
16-
git clone --branch v1.4 https://github.com/topcoder-platform/tc-deploy-scripts ../buildscript
16+
git clone --branch v1.4.14 https://github.com/topcoder-platform/tc-deploy-scripts ../buildscript
1717
cp ./../buildscript/master_deploy.sh .
1818
cp ./../buildscript/buildenv.sh .
1919
cp ./../buildscript/awsconfiguration.sh .
@@ -31,7 +31,7 @@ builddeploy_steps: &builddeploy_steps
3131
- run: *install_dependency
3232
- run: *install_deploysuite
3333
#- restore_cache: *restore_cache_settings_for_build
34-
- run: ./build.sh ${APPNAME} ${CI_DEPLOY_TOKEN} ${LOGICAL_ENV} ${BRANCH} ${TIDEWAYS_ENV}
34+
- run: ./build.sh ${APPNAME} ${CI_DEPLOY_TOKEN} ${LOGICAL_ENV} ${BRANCH}
3535
#- save_cache: *save_cache_settings
3636
- deploy:
3737
name: Running MasterScript.
@@ -54,7 +54,6 @@ jobs:
5454
APPNAME: "vanilla-forums"
5555
CI_DEPLOY_TOKEN: $CI_DEPLOY_TOKEN
5656
BRANCH: "develop"
57-
TIDEWAYS_ENV: "dev"
5857
steps: *builddeploy_steps
5958

6059
"build-prod":
@@ -65,7 +64,6 @@ jobs:
6564
APPNAME: "vanilla-forums"
6665
CI_DEPLOY_TOKEN: $CI_DEPLOY_TOKEN
6766
BRANCH: "master"
68-
TIDEWAYS_ENV: "production"
6967
steps: *builddeploy_steps
7068

7169
workflows:

Dockerfile

Lines changed: 7 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,9 @@ ARG CI_DEPLOY_TOKEN
44
ARG VANILLA_VERSION=3.3
55
ARG ENV
66
ARG BRANCH
7-
ARG TIDEWAYS_ENV
87

9-
# TIDEWAYS DAEMON
10-
ENV TIDEWAYS_SERVICE web
11-
ENV TIDEWAYS_ENVIRONMENT=$TIDEWAYS_ENV
12-
ENV TIDEWAYS_DAEMON_EXTRA="--env=$TIDEWAYS_ENVIRONMENT --debug"
13-
14-
# VANILLA
15-
ENV VANILLA_ENV=$ENV
168
ENV WEB_DOCUMENT_ROOT /vanillapp
179

18-
RUN echo "Tideways Daemon for '$TIDEWAYS_ENV' env"
19-
2010
# Get the latest release of Vanilla Forums
2111
RUN wget https://github.com/vanilla/vanilla/releases/download/Vanilla_${VANILLA_VERSION}/vanilla-${VANILLA_VERSION}.zip
2212
RUN unzip vanilla-${VANILLA_VERSION}.zip -d /tmp
@@ -45,23 +35,18 @@ RUN git clone --branch ${BRANCH} https://${CI_DEPLOY_TOKEN}@github.com/topcoder-
4535

4636
# Copy the forum-theme repository
4737
RUN git clone --branch ${BRANCH} https://${CI_DEPLOY_TOKEN}@github.com/topcoder-platform/forums-theme.git /vanillapp/themes/topcoder
48-
RUN git clone --branch mfe https://${CI_DEPLOY_TOKEN}@github.com/topcoder-platform/forums-theme.git /vanillapp/themes/mfe-topcoder
49-
50-
# Remove DebugPlugin from PROD env
51-
# RUN if [ "$ENV" = "prod" ]; \
52-
# then rm -R /tmp/forums-plugins/DebugPlugin; \
53-
# fi
5438

39+
RUN git clone --branch mfe https://${CI_DEPLOY_TOKEN}@github.com/topcoder-platform/forums-theme.git /vanillapp/themes/mfe-topcoder
5540

5641
# Copy all plugins to the Vanilla plugins folder
5742
RUN cp -r /tmp/forums-plugins/. /vanillapp/plugins
5843

59-
# Get the debug bar plugin
60-
RUN if [ "$ENV" = "dev" ]; then \
61-
wget https://us.v-cdn.net/5018160/uploads/addons/KSBIPJYMC0F2.zip; \
62-
unzip KSBIPJYMC0F2.zip; \
63-
cp -r debugbar /vanillapp/plugins; \
64-
fi
44+
#Get the debug bar plugin
45+
#RUN if [ "$ENV" = "dev" ]; then \
46+
# wget https://us.v-cdn.net/5018160/uploads/addons/KSBIPJYMC0F2.zip; \
47+
# unzip KSBIPJYMC0F2.zip; \
48+
# cp -r debugbar /vanillapp/plugins; \
49+
#fi
6550

6651
# Install Topcoder dependencies
6752
RUN composer install --working-dir /vanillapp/plugins/Topcoder
@@ -78,24 +63,3 @@ COPY ./vanilla/. /vanillapp/.
7863
# Set permissions on config file
7964
RUN chown application:application /vanillapp/conf/config.php
8065
RUN chmod ug=rwx,o=rx /vanillapp/conf/config.php
81-
82-
# Tideways
83-
RUN apt-get update && apt-get install -yq --no-install-recommends gnupg2;
84-
RUN echo 'deb https://packages.tideways.com/apt-packages-main any-version main' > /etc/apt/sources.list.d/tideways.list && \
85-
curl -L -sS 'https://packages.tideways.com/key.gpg' | apt-key add - && \
86-
apt-get update && \
87-
DEBIAN_FRONTEND=noninteractive apt-get -yq install tideways-php tideways-daemon && \
88-
apt-get autoremove --assume-yes && \
89-
apt-get clean && \
90-
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*; \
91-
echo 'extension=tideways.so\ntideways.enable_cli=0\ntideways.sample_rate=25' >> opt/docker/etc/php/php.ini;
92-
93-
# Copy custom supervisor's configs and scripts
94-
# Netcat is used to connect to a memcached server
95-
RUN apt-get update && apt-get install -y netcat
96-
COPY ./services/*.conf /opt/docker/etc/supervisor.d/
97-
COPY ./services/*.sh /opt/docker/bin/service.d/
98-
99-
# Ensure the service files are already executable
100-
RUN chmod +x /opt/docker/bin/service.d/flush_cache.sh
101-
RUN chmod +x /opt/docker/bin/service.d/tideways.sh

build.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ APP_NAME=$1
44
CI_DEPLOY_TOKEN=$2
55
ENV=$3
66
BRANCH=$4
7-
TIDEWAYS_ENV=$5
87
UPDATE_CACHE=""
98
echo "" > vanilla.env
10-
ENV=$ENV CI_DEPLOY_TOKEN=$CI_DEPLOY_TOKEN BRANCH=$BRANCH TIDEWAYS_ENV=$TIDEWAYS_ENV docker-compose -f docker-compose.yml build $APP_NAME
9+
ENV=$ENV CI_DEPLOY_TOKEN=$CI_DEPLOY_TOKEN BRANCH=$BRANCH docker-compose -f docker-compose.yml -f docker-compose.dev.yml build $APP_NAME
1110
#docker create --name app $APP_NAME:latest

docker-compose.dev.yml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,3 @@
11
version: '3'
22
services:
33
vanilla-forums:
4-
links:
5-
- tideways-daemon
6-
tideways-daemon:
7-
container_name: tideways-daemon
8-
build:
9-
context: ./tideways-daemon
10-
args:
11-
- TIDEWAYS_ENV
12-
ports:
13-
- 9135:9135

docker-compose.yml

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
1-
version: '3'
2-
services:
3-
vanilla-forums:
4-
image: vanilla-forums:latest
5-
container_name: vanilla-forums
6-
env_file:
7-
- ./vanilla.env
8-
build:
9-
context: .
10-
args:
11-
- ENV='dev'
12-
- VANILLA_VERSION=3.3
13-
- CI_DEPLOY_TOKEN
14-
- BRANCH
15-
- TIDEWAYS_ENV
16-
ports:
17-
- 80:80
1+
version: '3'
2+
services:
3+
vanilla-forums:
4+
image: vanilla-forums:latest
5+
container_name: vanilla-forums
6+
env_file:
7+
- ./vanilla.env
8+
build:
9+
context: .
10+
args:
11+
- ENV
12+
- VANILLA_VERSION=3.3
13+
- CI_DEPLOY_TOKEN
14+
- BRANCH
15+
ports:
16+
- 80:80
1817
- 443:443

services/tideways.conf

Lines changed: 0 additions & 15 deletions
This file was deleted.

services/tideways.sh

Lines changed: 0 additions & 9 deletions
This file was deleted.

tideways-daemon/Dockerfile

Lines changed: 0 additions & 21 deletions
This file was deleted.

vanilla/applications/vanilla/views/categories/helper_functions.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,8 @@ function writeListItem($category, $depth) {
204204
<?php } else { ?>
205205
<span class="MItem"></span>
206206
<?php };
207-
if ($writeChildren === 'list'): ?>
207+
$show = false;
208+
if ($show && $writeChildren === 'list'): ?>
208209
<div class="ChildCategories">
209210
<?php echo wrap(t('Child Categories').': ', 'b'); ?>
210211
<?php echo categoryString($children, $depth + 1); ?>

vanilla/library/core/class.controller.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1733,10 +1733,6 @@ protected function _renderXml($data, $node = 'Data', $indent = '') {
17331733
* @param Exception $ex The exception to render.
17341734
*/
17351735
public function renderException($ex) {
1736-
// FIX: https://github.com/topcoder-platform/forums/issues/570
1737-
if (class_exists('Tideways\Profiler')) {
1738-
\Tideways\Profiler::logException($ex);
1739-
}
17401736
if ($this->deliveryMethod() == DELIVERY_METHOD_XHTML) {
17411737
try {
17421738
// Pick our route.
@@ -2116,11 +2112,6 @@ public function sendHeaders() {
21162112
\Vanilla\Web\CacheControlMiddleware::sendCacheControlHeaders($this->_Headers['Cache-Control']);
21172113
}
21182114

2119-
// FIX: https://github.com/topcoder-platform/forums/issues/381
2120-
if (class_exists('Tideways\Profiler')) {
2121-
safeHeader("Server-Timing: ".\Tideways\Profiler::generateServerTimingHeaderValue(), true);
2122-
}
2123-
21242115
// Empty the collection after sending
21252116
$this->_Headers = [];
21262117
}

0 commit comments

Comments
 (0)