Commit Graph

82 Commits (jsx-conditional-rendering)

Author SHA1 Message Date
hq1 d2f2c69387
Conditionally support switching between v1 and v2 clickhouse schemas (#2780)
* Remove ClickhouseSetup module

This has been an implicit point of contact to many
tests. From now on the goal is for each test to maintain
its own, isolated setup so that no accidental clashes
and implicit assumptions are relied upon.

* Implement v2 schema check

An environment variable V2_MIGRATION_DONE acts like
a feature flag, switching plausible from using old events/sessions
schemas to v2 schemas introduced by NumericIDs migration.

* Run both test suites sequentially

While the code for v1 and v2 schemas must be kept still,
we will from now on run tests against both code paths.
Secondary test run will set V2_MIGRATION_DONE=1 variable,
thus making all `Plausible.v2?()` checks return `true'.

* Remove unused function

This is a remnant from the short period when
we would check for existing events before allowing
creating a new site.

* Update test setups/factories with v2 migration check

* Make GateKeeper return site id along with :allow

* Make Billing module check for v2 schema

* Make ingestion aware of v2 schema

* Disable site transfers for when v2 is live

In a separate changeset we will implement simplified
site transfer for when v2 migration is complete.
The new transfer will only rename the site domain in postgres
and keep track of the original site prior to the transfer
so we keep an ingestion grace period until the customers
redeploy their scripting.

* Make Stats base queries aware of v2 schema switch

* Update breakdown with v2 conditionals

* Update pageview local start with v2 check

* Update current visitoris with v2 check

* Update stats controller with v2 checks

* Update external controller with v2 checks

* Update remaining tests with proper fixtures

* Rewrite redundant assignment

* Remove unused alias

* Mute credo, this is not the right time

* Add test_helper prompt

* Fetch priv dir so it works with a release

* Fetch distinct partitions only

* Don't limit inspect output for partitions

* Ensure SQL is printed to IO

* Remove redundant domain fixture
4 years ago
Adam 4654a50365
Revert "Fail CI when tests are logging (#2748)" (#2758)
This reverts commit 05d14774be.
4 years ago
Adam 05d14774be
Fail CI when tests are logging (#2748)
A re-iteration of a miserable attempt from #2694

Hi @dgvncsz0f, how you've been ;D
4 years ago
Adam 59a76dedf1
Revert "Fail the CI if tests emit log errors/warnings (#2694)" (#2745)
* Revert "Fail the CI if tests emit log errors/warnings (#2694)"

This reverts commit ef894b0546.

* Mute a test
4 years ago
Uku Taht 43bf7dd09f
Use user-agent instead of screen_width to get device type (#2711)
* Use user-agent instead of screen_width to get device type

Co-authored-by: eriknakata <erik.nakata5@gmail.com>

* Fix credo

* Log on unhandled UAInspector device type

* Make 'browser' the default tab in devices report

* Remove device tooltip

* Remove screen_width from ingestion completely

* Remove browserstack harness, run playwright directly

* Select meta key based on OS platform

* Run CI tests in parallel

* Improve device match readability

* Add changelog

---------

Co-authored-by: eriknakata <erik.nakata5@gmail.com>
4 years ago
Adam Rutkowski ecb552479f
Upgrade erlang/elixir/alpine stack (#2695)
* Dockerfile: pin elixir-1.14.3, erlang-25.2.3, alpine-3.17.0

* asdf: pin erlang 25.2.3, elixir 1.14.3-otp-25

* Remove nonsense

* Remove erlang dupe

* Remove erlang, it's in the base image already

* Remove empty file

* Truncate seconds in NaiveDateTime instances

* Bump cache key

* Mitigate Error:error:0308010C:digital envelope routines::unsupported

See: https://www.newline.co/@kchan/how-to-fix-the-error-errorerror0308010cdigital-envelope-routinesunsupported--0f8d3f17

* Upgrade to latest alpine image and pin to an exact digest

* Revert "Upgrade to latest alpine image and pin to an exact digest"

This reverts commit cdf6624efa.

* Pin alpine image to an exact digest

---------

Co-authored-by: Cenk Kücük <c@cenk.me>
4 years ago
Adam Rutkowski ef894b0546
Fail the CI if tests emit log errors/warnings (#2694)
* Make CI fail if tests emit warning/error logs

* Swallow log output in GA test case
4 years ago
Adam Rutkowski ac1f44f89a
Bump clickhouse images to 22.8.13.20-alpine (prod/CI) (#2660)
* Bump clickhouse images to 22.8.13.20-alpine (prod/CI)

* !fixup

* Remove clickhouse-ci target
4 years ago
Uku Taht 1772ddff17
Add Checkly (#2520)
* Add Checkly Terraform config

* add deployment workflow

* use pagerduty instead of email for notifications

* use terraform cloud backend

* update variable declaration

* rename checkly check group

* update syntax

* test trigger

* Revert "test trigger"

This reverts commit 333e82beac.

* run a single job at a time

Co-authored-by: Cenk Kücük <c@cenk.me>
4 years ago
Adam Rutkowski 5de43b758d
Run tests in async mode where applicable (#2542)
* Set pg pool size for MIX_ENV=test

* Include slow tests in CI run

* Exclude slow tests by default

* Mark tests slow/async where applicable

* Restructure captcha mocks

* Revert async where env is relied upon

* Add --max-failures=1 to CI run

* Set warnings as errors

* Disable async where various mocks are used

* Revert "Disable async where various mocks are used"

This reverts commit 2446b72a29.

* Disable async for test using vcr
4 years ago
Uku Taht 8bdbabbdad
Enable Dialyzer and Credo in CI (#2315) 4 years ago
ruslandoga ad10721d46
add `v` prefix to version tags in public images (#2340) 4 years ago
Adam Rutkowski aa97e9cf89
Notify team on image build failures (#2331) 4 years ago
Uku Taht 2c2f710d24 Push public image 4 years ago
RobertJoonas c0da024b23
Remove static tracker files (#2116)
* remove tracker files from git index

* generate tracker files on npm test

* generate tracker files for elixir tests/dev/CI

* update tracker/package-lock.json

* exclude npm run deploy from mix test + some docs
4 years ago
Uku Taht eca71b9b60 Run CI against all supported PostgreSQL versions 4 years ago
FarisZR 620e29ab33
ARM64 support for docker images (#2103)
* Add ARM64 build

* Update CHANGELOG.md

* Update Docker arm PR number
4 years ago
Uku Taht df9f96970c Clear github actions cache for Elixir compilation 4 years ago
Adam Rutkowski 86b45fd52e
Add dependabot deps upgrade integration (#2187)
* Add dependabot deps upgrade integration

* Include npm/docker in dependabot config
4 years ago
Vinicius Brasil 54260c294f
Publish Elixir documentation to GitHub Pages (#2231)
* Install and setup ex_doc

* Create GitHub Action to publish docs
4 years ago
Adam Rutkowski 2692bf4e38
Build docker images with new tags (#2212)
* Build docker images with new tags

* Use single workflow to build all private images
4 years ago
Vinicius Brasil 7c24120ee1
Build Docker images for each PR (#2152)
* Create Action for building PR images

* Make master and stable private images

* Rename docker.yml to build-public-images.yml
4 years ago
Uku Taht 99fd101135
Add basic test harness for browserstack/playwright (#1961)
* Add basic test harness for browserstack/playwright

* Refactor the tests

* added the first test for outbound links

* tests for outbound-links and file-downloads

* added more browser versions to test on

* Lint tracker test files

* Update harness.js with BrowserStack example

* Fix Playwright request mocks

* Add test harness to CI

* Remove Safari on Windows from browsers list

Co-authored-by: Robert <robertjoonas16@gmail.com>
Co-authored-by: Vinicius Brasil <vini@hey.com>
4 years ago
Uku Taht 2b8e3ea62a
Use finch in sentry client (#1996)
* Introduce Finch for Sentry integration

* Make sure the DummyAgent can be started

* No need to sanitize the dsn, finch takes care of that

* Simplify the dummy child spec

* Annotate redirects clause

* Make use of new `get_int_from_path_or_env`

* Actually use finch in Sentry config

* Configure `excluded_domains` correctly for Sentry

The way sentry is configured currently, when we get an HTTP error it
will be logged twice - once from Sentry.PlugCapture and once from
Sentry.LoggerBackend. The logger backend module does the right thing
by default but for some reason we've been overriding the config
parameter that by default stops double-counting errors. This commit
returns to the default configuration which is better.

* Default to 15s timeout

* Attempt to send twice at most

* Warn in sentry client

* Use warn level in sentry client

Co-authored-by: Adam Rutkowski <hq@mtod.org>
4 years ago
Kian-Meng Ang ae61aecfd0
Use erlef/setup-beam for GitHub Actions (#1880) 5 years ago
Uku Taht b667d65d52 Move ARG to running container instead of build container 5 years ago
Uku Taht f0e0062dc1 FIx typo 5 years ago
Uku Taht 5b5c70b82d Add build metadata to build arg 5 years ago
Uku Taht afe2f6d8e1 Tag docker images during build 5 years ago
Uku Taht da93f2aa6e Remove dead code 5 years ago
Marko Saric 6a5364fa0b
Create config.yml 5 years ago
Uku Taht db27aa48bb CI BS 5 years ago
Uku Taht af4054ef84 CI BS 5 years ago
Uku Taht 28e19e9278 Print GITHUB_WORKSPACE 5 years ago
Uku Taht 7e143fc8ee Fix docker build 5 years ago
Uku Taht d100f1400d Show version number 5 years ago
Marko Saric 77b5e722e5
Update bug_report.yaml 5 years ago
Uku Taht 17eb87f827 Update issue template options 5 years ago
Uku Taht a783cb3ee9 Update issue template 5 years ago
Uku Taht 438d605429 Update issue template 5 years ago
Uku Taht 0e28101344 Issue template 5 years ago
Marko Saric 834470281d
Update bug_report.yaml 5 years ago
Uku Taht d9b4f81ef5 Add dark mode to PR template 5 years ago
Adam from Buildjet 1146ec0960
BuildJet 4vCPU (#1523) 5 years ago
Uku Taht bd64372e6b Install deps for tracker 5 years ago
Uku Taht b83e7b9dc5 Build JS before measuring it 5 years ago
Uku Taht fdac5e2be6 Add bundlemon 5 years ago
Uku Taht 05bf43c1be
City level location data (#1449)
* Merge branch 'plausible_master'

* Add City level details

* Add City level details

* Use ISO codes instead of geoname_id for subdivisions

* Add easier way to configure geolocation database

* Add workflow for dev branch

* Correct clickhouse migration

* Translate subdivision names

* Translate city names

* WIP

* Region and country filters

* Fix region filter

* Remove region_name when removing region filter

* Add modals for regions and cities

* Remove dead code

* WIP

* Revert "WIP"

This reverts commit 3202bf2fe9.

* Feature flag to hide cities when deployed

* Add changelog entry

* Remove unused code

* Remove unused variables

* Fix test

Co-authored-by: AymanTerra <aymanterra@yahoo.com>
5 years ago
Uku Taht b01b569cd5 Update clickhouse version in tests 5 years ago
Uku Taht 497824d578 Add prefix to node action 5 years ago