Skip to content

Commit

Permalink
Merge branch 'master' into chore/support-form-language
Browse files Browse the repository at this point in the history
  • Loading branch information
raquelmsmith committed Mar 27, 2024
2 parents a5f8d67 + 205376b commit 9a1aea1
Show file tree
Hide file tree
Showing 546 changed files with 11,091 additions and 5,496 deletions.
18 changes: 5 additions & 13 deletions .github/workflows/ci-backend-depot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,7 @@
name: Backend CI (depot)

on:
push:
branches:
- master
pull_request:
workflow_dispatch:
inputs:
clickhouseServerVersion:
description: ClickHouse server version. Leave blank for default
type: string

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand All @@ -39,7 +31,7 @@ jobs:
# Job to decide if we should run backend ci
# See https://github.com/dorny/paths-filter#conditional-execution for more details
changes:
runs-on: depot-ubuntu-latest
runs-on: depot-ubuntu-latest-4
timeout-minutes: 5
if: github.repository == 'PostHog/posthog'
name: Determine need to run backend checks
Expand Down Expand Up @@ -90,7 +82,7 @@ jobs:
timeout-minutes: 30

name: Python code quality checks
runs-on: depot-ubuntu-latest
runs-on: depot-ubuntu-latest-4

steps:
# If this run wasn't initiated by the bot (meaning: snapshot update) and we've determined
Expand Down Expand Up @@ -174,7 +166,7 @@ jobs:
timeout-minutes: 10

name: Validate Django migrations
runs-on: depot-ubuntu-latest
runs-on: depot-ubuntu-latest-4

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -237,7 +229,7 @@ jobs:
timeout-minutes: 30

name: Django tests – ${{ matrix.segment }} (persons-on-events ${{ matrix.person-on-events && 'on' || 'off' }}), Py ${{ matrix.python-version }}, ${{ matrix.clickhouse-server-image }} (${{matrix.group}}/${{ matrix.concurrency }}) (depot)
runs-on: depot-ubuntu-latest
runs-on: depot-ubuntu-latest-4

strategy:
fail-fast: false
Expand Down Expand Up @@ -318,7 +310,7 @@ jobs:
matrix:
clickhouse-server-image: ['clickhouse/clickhouse-server:23.11.2.11-alpine']
if: needs.changes.outputs.backend == 'true'
runs-on: depot-ubuntu-latest
runs-on: depot-ubuntu-latest-4
steps:
- name: 'Checkout repo'
uses: actions/checkout@v3
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ci-e2e-depot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ concurrency:

jobs:
changes:
runs-on: depot-ubuntu-latest
runs-on: depot-ubuntu-latest-4
timeout-minutes: 5
if: github.repository == 'PostHog/posthog'
name: Determine need to run E2E checks
Expand Down Expand Up @@ -55,7 +55,7 @@ jobs:
chunks:
needs: changes
name: Cypress preparation
runs-on: depot-ubuntu-latest
runs-on: depot-ubuntu-latest-4
timeout-minutes: 5
outputs:
chunks: ${{ steps.chunk.outputs.chunks }}
Expand All @@ -70,7 +70,7 @@ jobs:

container:
name: Build and cache container image
runs-on: depot-ubuntu-latest
runs-on: depot-ubuntu-latest-4
timeout-minutes: 60
needs: [changes]
permissions:
Expand All @@ -94,7 +94,7 @@ jobs:

cypress:
name: Cypress E2E tests (${{ strategy.job-index }}) (depot)
runs-on: depot-ubuntu-latest
runs-on: depot-ubuntu-latest-4
timeout-minutes: 60
needs: [chunks, changes, container]
permissions:
Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/ci-hobby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,16 @@ jobs:
token: ${{ secrets.POSTHOG_BOT_GITHUB_TOKEN }}
- name: Get python deps
run: pip install python-digitalocean==1.17.0 requests==2.28.1
- name: Setup DO Hobby Instance
run: python3 bin/hobby-ci.py create
env:
DIGITALOCEAN_TOKEN: ${{ secrets.DIGITALOCEAN_TOKEN }}
- name: Run smoke tests on DO
run: python3 bin/hobby-ci.py $GITHUB_HEAD_REF
run: python3 bin/hobby-ci.py test $GITHUB_HEAD_REF
env:
DIGITALOCEAN_TOKEN: ${{ secrets.DIGITALOCEAN_TOKEN }}
- name: Post-cleanup step
if: always()
run: python3 bin/hobby-ci.py destroy
env:
DIGITALOCEAN_TOKEN: ${{ secrets.DIGITALOCEAN_TOKEN }}
4 changes: 4 additions & 0 deletions bin/docker-worker-celery
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ FLAGS+=("-n node@%h")
# On Heroku $WEB_CONCURRENCY contains suggested number of forks per dyno type
# https://github.com/heroku/heroku-buildpack-python/blob/main/vendor/WEB_CONCURRENCY.sh
[[ -n "${WEB_CONCURRENCY}" ]] && FLAGS+=" --concurrency $WEB_CONCURRENCY"
# Restart worker process after it processes this many tasks (to mitigate memory leaks)
[[ -n "${CELERY_MAX_TASKS_PER_CHILD}" ]] && FLAGS+=" --max-tasks-per-child $CELERY_MAX_TASKS_PER_CHILD"
# Restart worker process after it exceeds this much memory usage (to mitigate memory leaks)
[[ -n "${CELERY_MAX_MEMORY_PER_CHILD}" ]] && FLAGS+=" --max-memory-per-child $CELERY_MAX_MEMORY_PER_CHILD"

if [[ -z "${CELERY_WORKER_QUEUES}" ]]; then
source ./bin/celery-queues.env
Expand Down
Loading

0 comments on commit 9a1aea1

Please sign in to comment.