snakedotdev / grafana-duckdb-datasource

Apache License 2.0
0 stars 0 forks source link

Switch off of adhoc npm repository #2

Open colearendt opened 2 weeks ago

colearendt commented 2 weeks ago

https://github.com/snakedotdev/grafana-duckdb-datasource/blob/4214589190a49d1e8ec64a6ba5dab1af4b177b73/.github/workflows/ci.yml#L58

We need to figure out what longer-term npm repository we want to use. Grafana does not publish many of their packages for the SQL building (they are considered "experimental" and published to npm, but presumably access controlled). As a result, we have published these versions manually to our own npm repo.

We should figure out what a longer term pattern looks like!

Also worth noting that we are installing pre-release versions of these packages, so we should probably keep an eye on changes and whatnot for integration!

colearendt commented 1 week ago

Plan to replace this in the short term is to build (and script) a verdaccio install that can be run during CI and used in lieu of the adhoc / stateful instance currently in use.

colearendt commented 1 week ago

Script in progress:

docker run -p 4873:4873 -it --rm -v /Users/colearendt/src/github.com/benetist/benetist-kubernetes/verd-config.yaml:/verdaccio/conf/config.yaml verdaccio/verdaccio:6.0.0
npm add-user --registry http://localhost:4873

git clone https://github.com/grafana/grafana.git # fbad76007d88490d04b1bcf087ffaa0cd0c04a23

# not necessary
# git clone https://github.com/grafana/grafana-experimental.git # 2be55e755e99e06ed7971ee792a3616859b537b3

cd grafana/packages/grafana-data && npm publish --registry http://localhost:4873
cd ../
cd grafana-ui && npm publish --registry http://localhost:4873
cd ../
cd grafana-e2e-selectors && npm publish --registry http://localhost:4873
cd ../
cd grafana-runtime && npm publish --registry http://localhost:4873
cd ../
cd grafana-schema && npm publish --registry http://localhost:4873
cd ../
cd grafana-sql/ && sed -i '' 's/"private".*,//g' package.json && npm publish --registry http://localhost:4873