Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Analytics: update for v2.0.0 compatibility #47

Merged
merged 9 commits into from
Jan 10, 2024
Merged

Conversation

jthrilly
Copy link
Member

@jthrilly jthrilly commented Jan 10, 2024

This PR updates Fresco to take advantage of the changes in complexdatacollective/network-canvas-monorepo#14

Specifically:

  • Updates the route handler to no longer pass in environment variables and instead create
  • Updates the getInstallationId functionality: installationId is now awaited within the route handler and passed in to the creator function.
  • Removes incorrect use of process.env and replaces with env shim from t3-oss. Renames env variable to DISABLE_ANALYTICS so that it defaults to false.

Note: The above caused issues with the github actions implementation for testing building. Basically, because the new implementation invokes getInstallationId in the route handler, and because that function uses a database call, we were ending up with the action failing because the database wasn't available.

Rather than add the database environment variable to the github actions environment, I instead created a new env variable, INSTALLATION_ID, which when present short circuits the database call. This is actually pretty useful, because it will enable us to filter out our dev environment events from the analytics. I added this variable to the vercel environment, as well as to my local environment.

Copy link

vercel bot commented Jan 10, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
fresco ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 10, 2024 2:33pm

@jthrilly jthrilly changed the title update for v2.0.0 compatibility Analytics: update for v2.0.0 compatibility Jan 10, 2024
@buckhalt buckhalt merged commit a0e4720 into main Jan 10, 2024
3 checks passed
@jthrilly jthrilly deleted the fix/analytics-changes branch April 5, 2024 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants