-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into dw-virtual-data-warehouse-table-breakdowns
- Loading branch information
Showing
15 changed files
with
328 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -236,7 +236,7 @@ jobs: | |
needs: changes | ||
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 }}) | ||
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 | ||
|
||
strategy: | ||
|
@@ -371,3 +371,37 @@ jobs: | |
- name: Run async migrations tests | ||
run: | | ||
pytest -m "async_migrations" | ||
calculate-running-time: | ||
name: Calculate running time | ||
needs: [django, async-migrations] | ||
runs-on: ubuntu-latest | ||
if: needs.changes.outputs.backend == 'true' | ||
steps: | ||
- name: Calculate running time | ||
run: | | ||
echo "${{ secrets.GITHUB_TOKEN }}" | gh auth login --with-token | ||
run_id=${GITHUB_RUN_ID} | ||
repo=${GITHUB_REPOSITORY} | ||
run_info=$(gh api repos/${repo}/actions/runs/${run_id}) | ||
echo run_info: ${run_info} | ||
# name is the name of the workflow file | ||
# run_started_at is the start time of the workflow | ||
# we want to get the number of seconds between the start time and now | ||
name=$(echo ${run_info} | jq -r '.name') | ||
run_url=$(echo ${run_info} | jq -r '.url') | ||
run_started_at=$(echo ${run_info} | jq -r '.run_started_at') | ||
run_attempt=$(echo ${run_info} | jq -r '.run_attempt') | ||
start_seconds=$(date -d "${run_started_at}" +%s) | ||
now_seconds=$(date +%s) | ||
duration=$((now_seconds-start_seconds)) | ||
echo running_time_duration_seconds=${duration} >> $GITHUB_ENV | ||
echo running_time_run_url=${run_url} >> $GITHUB_ENV | ||
echo running_time_run_attempt=${run_attempt} >> $GITHUB_ENV | ||
echo running_time_run_id=${run_id} >> $GITHUB_ENV | ||
echo running_time_run_started_at=${run_started_at} >> $GITHUB_ENV | ||
- name: Capture running time to PostHog | ||
uses: PostHog/[email protected] | ||
with: | ||
posthog-token: ${{secrets.POSTHOG_API_TOKEN}} | ||
event: 'posthog-ci-running-time' | ||
properties: '{"duration_seconds": ${{ env.running_time_duration_seconds }}, "run_url": "${{ env.running_time_run_url }}", "run_attempt": "${{ env.running_time_run_attempt }}", "run_id": "${{ env.running_time_run_id }}", "run_started_at": "${{ env.running_time_run_started_at }}"}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -371,3 +371,38 @@ jobs: | |
- name: Run async migrations tests | ||
run: | | ||
pytest -m "async_migrations" | ||
calculate-running-time: | ||
name: Calculate running time | ||
needs: [django, async-migrations] | ||
runs-on: ubuntu-latest | ||
if: needs.changes.outputs.backend == 'true' | ||
steps: | ||
- name: Calculate running time | ||
run: | | ||
echo "${{ secrets.GITHUB_TOKEN }}" | gh auth login --with-token | ||
run_id=${GITHUB_RUN_ID} | ||
repo=${GITHUB_REPOSITORY} | ||
run_info=$(gh api repos/${repo}/actions/runs/${run_id}) | ||
echo run_info: ${run_info} | ||
# name is the name of the workflow file | ||
# run_started_at is the start time of the workflow | ||
# we want to get the number of seconds between the start time and now | ||
name=$(echo ${run_info} | jq -r '.name') | ||
run_url=$(echo ${run_info} | jq -r '.url') | ||
run_started_at=$(echo ${run_info} | jq -r '.run_started_at') | ||
run_attempt=$(echo ${run_info} | jq -r '.run_attempt') | ||
start_seconds=$(date -d "${run_started_at}" +%s) | ||
now_seconds=$(date +%s) | ||
duration=$((now_seconds-start_seconds)) | ||
echo running_time_duration_seconds=${duration} >> $GITHUB_ENV | ||
echo running_time_run_url=${run_url} >> $GITHUB_ENV | ||
echo running_time_run_attempt=${run_attempt} >> $GITHUB_ENV | ||
echo running_time_run_id=${run_id} >> $GITHUB_ENV | ||
echo running_time_run_started_at=${run_started_at} >> $GITHUB_ENV | ||
- name: Capture running time to PostHog | ||
uses: PostHog/[email protected] | ||
with: | ||
posthog-token: ${{secrets.POSTHOG_API_TOKEN}} | ||
event: 'posthog-ci-running-time' | ||
properties: '{"duration_seconds": ${{ env.running_time_duration_seconds }}, "run_url": "${{ env.running_time_run_url }}", "run_attempt": "${{ env.running_time_run_attempt }}", "run_id": "${{ env.running_time_run_id }}", "run_started_at": "${{ env.running_time_run_started_at }}"}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
import { LemonDivider, Link } from '@posthog/lemon-ui' | ||
|
||
import { InviteMembersButton } from '~/layout/navigation/TopBar/AccountPopover' | ||
|
||
import { OnboardingStepKey } from './onboardingLogic' | ||
import { OnboardingStep } from './OnboardingStep' | ||
|
||
const proxyDocs = [ | ||
{ | ||
title: 'AWS CloudFront', | ||
link: 'https://posthog.com/docs/advanced/proxy/cloudfront', | ||
}, | ||
{ | ||
title: 'Caddy', | ||
link: 'https://posthog.com/docs/advanced/proxy/caddy', | ||
}, | ||
{ | ||
title: 'Cloudflare', | ||
link: 'https://posthog.com/docs/advanced/proxy/cloudflare', | ||
}, | ||
{ | ||
title: 'Kubernetes Ingress Controller', | ||
link: 'https://posthog.com/docs/advanced/proxy/kubernetes-ingress-controller', | ||
}, | ||
{ | ||
title: 'Netlify', | ||
link: 'https://posthog.com/docs/advanced/proxy/netlify', | ||
}, | ||
{ | ||
title: 'Next.js rewrites', | ||
link: 'https://posthog.com/docs/advanced/proxy/nextjs', | ||
}, | ||
{ | ||
title: 'Next.js middleware', | ||
link: 'https://posthog.com/docs/advanced/proxy/nextjs-middleware', | ||
}, | ||
{ | ||
title: 'Vercel', | ||
link: 'https://posthog.com/docs/advanced/proxy/vercel', | ||
}, | ||
{ | ||
title: 'Nuxt', | ||
link: 'https://posthog.com/docs/advanced/proxy/nuxt', | ||
}, | ||
] | ||
|
||
export const OnboardingReverseProxy = ({ stepKey }: { stepKey: OnboardingStepKey }): JSX.Element => { | ||
return ( | ||
<OnboardingStep | ||
title="Reverse proxy (optional)" | ||
stepKey={stepKey} | ||
continueText="I've already done this" | ||
showSkip | ||
> | ||
<div className="mb-6 mt-6"> | ||
<p>A reverse proxy allows you to send events to PostHog Cloud using your own domain.</p> | ||
<p> | ||
This means that events are sent from your own domain and are less likely to be intercepted by | ||
tracking blockers. You'll be able to capture more usage data without having to self-host PostHog. | ||
</p> | ||
<p> | ||
Setting up a reverse proxy means setting up a service to redirect requests from a subdomain you | ||
choose (like <span className="font-mono break-keep">e.yourdomain.com</span>) to PostHog. It is best | ||
practice to use a subdomain that does not include posthog, analytics, tracking, or other similar | ||
words. | ||
</p> | ||
<h3>Documentation</h3> | ||
<p>Here are some popular reverse proxy options:</p> | ||
<ul className="list-disc list-inside ml-2"> | ||
{proxyDocs.map(({ title, link }) => ( | ||
<li key={title}> | ||
<Link to={link} target="_blank"> | ||
{title} | ||
</Link> | ||
</li> | ||
))} | ||
</ul> | ||
<LemonDivider className="my-6" /> | ||
<h3>Need help with this step?</h3> | ||
<p>Invite a team member to help you get set up.</p> | ||
<div className="mt-3 w-40"> | ||
<InviteMembersButton type="secondary" /> | ||
</div> | ||
</div> | ||
</OnboardingStep> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.