Skip to content

Commit 5635d49

Browse files
committed
Upgrade chromium and Overview
Now we add overview-convert-pdf and disable OCR. See `README.md` for upgrade instructions.
1 parent 0dd72b8 commit 5635d49

File tree

6 files changed

+66
-7
lines changed

6 files changed

+66
-7
lines changed

README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,3 +198,35 @@ always be both; don't let Capybara's confusing design confuse you.
198198
http://www.rubydoc.info/github/jnicklas/capybara/Capybara/Session
199199
and other spots online. One detail sets us apart: we do _not_ use
200200
`Capybara.default_max_wait_time` because it is terrible.
201+
202+
Changelog and Update Instructions
203+
=================================
204+
205+
**2.0.0**, released 2018-04-10
206+
207+
Changes:
208+
209+
* Upgraded to Chromedriver 2.37 and Chromium 64
210+
* Switched to debian-slim for faster pull
211+
* Upgraded Overview
212+
213+
To upgrade:
214+
215+
* Change `OVERVIEW_INTEGRATION_TESTER_VERSION` to `2.0.0` and update
216+
`OVERVIEW_VERSION` to at least `ba89c4502319969f3bd9248150e8608c085d7c7e`
217+
* Add `OV_APPLICATION_SECRET` environment variable to `overview-web` with
218+
any String value
219+
* Add `overview-convert-pdf` instance, if your tests use any PDF imports
220+
* Overwrite `helpers/session_helpers/document_set_helper.rb`. (It now disables
221+
OCR when uploading PDFs: that lets you omit `overview-convert-pdfocr` from
222+
`docker-compose.yml` and speed up tests.)
223+
224+
Releasing This Framework
225+
========================
226+
227+
1. Fix a bug or add a feature, presumably by writing tests in `test/` and/or
228+
editing code in `skeleton/`.
229+
2. Pick a new version number, `X.Y.Z` (consulting `VERSION` and semver).
230+
3. `docker build docker -t overview/overview-integration-tester:X.Y.Z`
231+
4. `./test/test.sh`
232+
5. `./release X.Y.Z`

docker/Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
#
66
# Switch to alpine when it has chromium 63. Debian (Chrome 63) makes the build
77
# super-slow.
8-
FROM debian:stretch
8+
FROM debian:stretch-slim
99

1010
RUN set -x \
1111
&& echo "force-unsafe-io" > /etc/dpkg/dpkg.cfg.d/force-unsafe-io \
1212
&& echo "Acquire::http {No-Cache=True;};" > /etc/apt/apt.conf.d/no-cache \
1313
&& apt-get update \
14-
&& apt-get install -y \
14+
&& apt-get install -y --no-install-recommends \
1515
build-essential \
1616
ca-certificates \
1717
chromium \
@@ -24,8 +24,9 @@ RUN set -x \
2424
zlib1g-dev \
2525
tigervnc-standalone-server \
2626
xvfb \
27+
&& apt-get clean -y && rm -rf /var/cache/debconf/* /var/lib/apt/lists/* /var/log/* /tmp/* /var/tmp/* \
2728
&& gem install bundler \
28-
&& (cd /tmp && curl "http://chromedriver.storage.googleapis.com/2.%3Cspan%20class="x x-first x-last">35/chromedriver_linux64.zip" -o chromedriver_linux64.zip && unzip chromedriver_linux64.zip && rm -f chromedriver_linux64.zip && mv chromedriver /usr/bin/)
29+
&& (cd /tmp && curl "http://chromedriver.storage.googleapis.com/2.%3Cspan%20class="x x-first x-last">37/chromedriver_linux64.zip" -o chromedriver_linux64.zip && unzip chromedriver_linux64.zip && rm -f chromedriver_linux64.zip && mv chromedriver /usr/bin/)
2930

3031
# Expose remote debugging port. Browse to http://docker-container-ip:9222
3132
# to see what's going on inside Chromium.

skeleton/config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ DEVELOPMENT_PROJECT_NAME=overviewserver
2020

2121
# Docker container version. We use semantic versioning; only the major version
2222
# matters, but you can be paranoid and add minor and patch versions, too.
23-
OVERVIEW_INTEGRATION_TESTER_VERSION=1.1.0
23+
OVERVIEW_INTEGRATION_TESTER_VERSION=2.0.0
2424

2525
# Version of Overview to test against in `run-in-docker-compose`. See
2626
# https://hub.docker.com/r/overview/overview-database/tags/ for options.
2727
#
2828
# Do not use `latest`. Overview changes in ways that might break your tests.
2929
# (For instance, a button might be renamed.) You should frequently update your
3030
# tests to the latest version of Overview.
31-
OVERVIEW_VERSION=b7653f60b6fdcbf45237110a6d18748a11d4e05e
31+
OVERVIEW_VERSION=ba89c4502319969f3bd9248150e8608c085d7c7e
3232

3333
# Stall `run` and `run-in-docker-compose` on startup until these URLs are
3434
# available.

skeleton/docker-compose.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ services:
66
image: overview/overview-web:${OVERVIEW_VERSION}
77
networks: [ 'default', 'database', 'redis', 'worker' ]
88
depends_on: [ 'overview-database', 'overview-redis', 'overview-worker' ]
9+
environment:
10+
OV_APPLICATION_SECRET: 'this-is-a-secret-you-must-set-in-production'
911
volumes:
1012
- blob-storage:/var/lib/overview/blob-storage
1113

@@ -29,14 +31,24 @@ services:
2931
networks: [ 'database' ]
3032
depends_on: [ 'overview-database' ]
3133

34+
# This integration-test environment only supports PDFs without OCR. To support
35+
# more input formats, add more converters to docker-compose. (See
36+
# overview-server/docker-compose.yml and overview-server/.env for a full list
37+
# of converters.)
38+
overview-convert-pdf:
39+
image: overview/overview-convert-pdf:0.0.3
40+
networks: [ 'worker' ]
41+
environment:
42+
POLL_URL: 'http://overview-worker:9032/Pdf'
43+
3244
# === Your project (e.g., your plugin): you probably _do_ want to edit this ===
3345
my-project:
3446
build: ..
3547

3648
# === The integration-test runner ===
3749
integration-test:
3850
image: overview/overview-integration-tester:${OVERVIEW_INTEGRATION_TESTER_VERSION}
39-
depends_on: [ 'overview-web', 'my-project' ]
51+
depends_on: [ 'overview-web', 'overview-convert-pdf', 'my-project' ]
4052
environment:
4153
OVERVIEW_URL: http://overview-web
4254
WAIT_FOR_URLS: ${WAIT_FOR_URLS}

skeleton/helpers/session_helpers/document_set_helper.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,12 @@ def create_document_set_from_pdfs_in_folder(folder)
1212
for path in Dir.glob(File.join(folder, '*.*'))
1313
attach_file('file', path)
1414
end
15+
1516
click_on('Done adding files')
1617
# Wait for focus: that's when the dialog is open
1718
wait_for_javascript_to_return_true('document.querySelector("#import-options-name") === document.activeElement', wait: WAIT_FAST)
1819
fill_in('Document set name', with: folder)
20+
choose('Assume documents are already text (faster import)')
1921
click_on('Import documents')
2022
assert_selector('body.document-set-show', wait: WAIT_SLOW) # wait for import to complete
2123
assert_selector('#document-list:not(.loading) li.document', wait: WAIT_LOAD) # wait for document list to load

test/files-atop-framework/docker-compose.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ services:
66
image: overview/overview-web:${OVERVIEW_VERSION}
77
networks: [ 'default', 'database', 'redis', 'worker' ]
88
depends_on: [ 'overview-database', 'overview-redis', 'overview-worker' ]
9+
environment:
10+
OV_APPLICATION_SECRET: 'this-is-a-secret-you-must-set-in-production'
911
volumes:
1012
- blob-storage:/var/lib/overview/blob-storage
1113

@@ -29,10 +31,20 @@ services:
2931
networks: [ 'database' ]
3032
depends_on: [ 'overview-database' ]
3133

34+
# This integration-test environment only supports PDFs without OCR. To support
35+
# more input formats, add more converters to docker-compose. (See
36+
# overview-server/docker-compose.yml and overview-server/.env for a full list
37+
# of converters.)
38+
overview-convert-pdf:
39+
image: overview/overview-convert-pdf:0.0.3
40+
networks: [ 'worker' ]
41+
environment:
42+
POLL_URL: 'http://overview-worker:9032/Pdf'
43+
3244
# === The integration-test runner ===
3345
integration-test:
3446
image: overview/overview-integration-tester:${OVERVIEW_INTEGRATION_TESTER_VERSION}
35-
depends_on: [ 'overview-web' ]
47+
depends_on: [ 'overview-web', 'overview-convert-pdf' ]
3648
environment:
3749
OVERVIEW_URL: http://overview-web
3850
WAIT_FOR_URLS: ${WAIT_FOR_URLS}

0 commit comments

Comments
 (0)