meltano / jaffle-shop-template

Template for a DuckDB-based, Codespace-oriented sandbox project that is also dbt Cloud compatible, and includes code-first BI tooling via Evidence.
https://meltano.github.io/jaffle-shop-template/
10 stars 15 forks source link

Chore: move project-id to client-id #9

Closed aaronsteers closed 1 year ago

aaronsteers commented 1 year ago

Some caveats I need to call out with this PR...

First, I noted that the client ID is correctly carried through into the analytics.json file, via the env var in the Codespace.

@aaronsteers ➜ /workspaces/jaffle-shop-template (chore-move-project-id-to-client-id) $ echo $MELTANO_CLIENT_ID
bd6709c7-2d8b-4aba-9697-f6cd61582e74
@aaronsteers ➜ /workspaces/jaffle-shop-template (chore-move-project-id-to-client-id) $ cat .meltano/analytics.json
{"client_id": "bd6709c7-2d8b-4aba-9697-f6cd61582e74", "project_id": "ff061732-bd27-4021-916f-e8f8b55fcf9d", "send_anonymous_usage_stats": true}%                                                                                                                          
@aaronsteers ➜ /workspaces/jaffle-shop-template (chore-move-project-id-to-client-id) 

Second, the process of running meltano install now immediately creates a git diff, as meltano.yml is immediately updated with the project_id. Since meltano install is set to run in postCreate on the container, starting with #8, this means the user immediately starts out the repo with a pending diff in git. That might not be a huge deal for a Meltano tutorial, but as we may want to include Meltano in projects that are not intended only for working on Meltano - or which are focused on the live demo experience more than the tutorial experience. For a live demo, we really don't want to start out with an immediate diff at the very outset of launching the project.

Third, the CLI changing the file creates some undesireable diffs for formatting and sorting of keys. I'll open a bug in meltano/meltano to see if we can reduce these. The best mitigation is for maintainers to periodically commit back the auto-applied changes so that future users don't see these pending diffs when they are running the tutorials or exercises.

Here's the commit containing all aspects of the file that were changed:

https://github.com/meltano/jaffle-shop-template/pull/9/commits/decbe25bc2334b1c6af974f0bedbd70c3c973aa5