Document procedure to run Data Browser locally (#7643)#7836
Document procedure to run Data Browser locally (#7643)#7836hannes-ucsc merged 1 commit intodevelopfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #7836 +/- ##
========================================
Coverage 84.91% 84.91%
========================================
Files 161 161
Lines 23104 23104
========================================
Hits 19619 19619
Misses 3485 3485 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
9584ac5 to
b09e10a
Compare
| and launch a local version of the Data Browser server. On macOS or Linux, a | ||
| specific Node.js version can be installed using the Node.js version management |
There was a problem hiding this comment.
| and launch a local version of the Data Browser server. On macOS or Linux, a | |
| specific Node.js version can be installed using the Node.js version management | |
| and launch a local version of the Data Browser's server. On macOS or Linux, a | |
| specific Node.js version can also be installed using the Node.js version management |
| For example, to locally run a Data Browser for the `dev` deployment and `hca` | ||
| atlas, open `.gitlab/sites/dev/hca/base.yaml` and note the variables | ||
| `data_browser_build_script` and `data_browser_build_env`. The values of these | ||
| variables, `build-ma-dev:hca-dcp` and `ma-dev` respectively, indicate that the | ||
| site config used is `.site-config/hca-dcp/ma-dev/config.ts`, and additionally | ||
| that the argument to specify in the `npm run` command is the one found in | ||
| `package.json` that references `./scripts/dev.sh hca-dcp ma-dev`. Note, it may | ||
| be possible that no such argument can be found, in which case you can | ||
| temporarily create a new argument by adding a line to `package.json` using one | ||
| of the existing lines that mentions `scripts/dev.sh` as a guide. |
There was a problem hiding this comment.
This could benefit from being broken down into enumerated, concise steps.
| Use the steps above to first locate the `base.yaml` file for a GitLab colocated | ||
| with your personal deployment, and then open the related `config.ts` site config | ||
| file. After setting `CATALOG` and `DATA_URL` to values appropriate for your | ||
| personal deployment, open `packages.json` to find (or add) the correct argument |
There was a problem hiding this comment.
| personal deployment, open `packages.json` to find (or add) the correct argument | |
| personal deployment, open `package.json` to find (or add) the correct argument |
| personal deployment, open `packages.json` to find (or add) the correct argument | ||
| to use, and then specify that argument in the `npm run` command. | ||
|
|
||
| Note that when run locally, the Data Browser might make duplicate requests to |
There was a problem hiding this comment.
| Note that when run locally, the Data Browser might make duplicate requests to | |
| Note that when run locally, the Data Browser will make duplicate requests to |
If it doesn't is because StrictMode isn't enabled, no?
b09e10a to
33e7518
Compare
| 3. If no such line can be found in `/package.json`, you can temporarily add one | ||
| using one of the existing lines that mention `dev.sh` as a guide. Be sure to | ||
| give the new line a unique key. | ||
| 4. Run `npm run KEY`, where `KEY` is the key of the line you found, or added. |
There was a problem hiding this comment.
Naming convention of variables should be consistent.
| 4. Run `npm run KEY`, where `KEY` is the key of the line you found, or added. | |
| 4. Run `npm run {key}`, where `{key}` is the key of the line you found, or added. |
| 2. Locate and open `/.site-config/FOO/BAR/config.ts`, where `FOO` is the second | ||
| part of the `data_browser_build_script` value, and `BAR` is the | ||
| `data_browser_build_env` value. |
There was a problem hiding this comment.
Consistency
| 2. Locate and open `/.site-config/FOO/BAR/config.ts`, where `FOO` is the second | |
| part of the `data_browser_build_script` value, and `BAR` is the | |
| `data_browser_build_env` value. | |
| 2. Locate and open `/.site-config/{foo}/{bar}/config.ts`, where `{foo}` is the second | |
| part of the `data_browser_build_script` value, and `{bar}` is the | |
| `data_browser_build_env` value. |
| 4. Open `/package.json`, and under the `scripts` section, find (or add) a line | ||
| that mentions `dev.sh` and the values obtained in step 1 (e.g. `hca-dcp` and | ||
| `ma-dev`). | ||
| 5. Run `npm run KEY`, where `KEY` is the key of the line you found, or added. |
There was a problem hiding this comment.
Same
| 5. Run `npm run KEY`, where `KEY` is the key of the line you found, or added. | |
| 5. Run `npm run {key}`, where `{key}` is the key of the line you found, or added. |
33e7518 to
52685d8
Compare
| (`hca-dcp`) that is needed for our purposes. | ||
| 3. Open `/package.json`, and under the `scripts` section, find the key of a | ||
| value that mentions `dev.sh hca-dcp ma-dev`, which is the script used when | ||
| running the Data Browser locally, and the two values obtained in step 1. |
There was a problem hiding this comment.
| running the Data Browser locally, and the two values obtained in step 1. | |
| running the Data Browser locally, and the two values obtained in step 2. |
52685d8 to
c7ce9c4
Compare
c7ce9c4 to
c01b929
Compare
Security design review
|
c01b929 to
93856b1
Compare

Linked issues: #7643
Checklist
Author
developissues/<GitHub handle of author>/<issue#>-<slug>1 when the issue title describes a problem, the corresponding PR
title is
Fix:followed by the issue titleAuthor (partiality)
ptag to titles of partial commitspartialor completely resolves all linked issuespartiallabelAuthor (reindex)
rtag to commit title or the changes introduced by this PR will not require reindexing of any deploymentreindex:devor the changes introduced by it will not require reindexing ofdevreindex:anvildevor the changes introduced by it will not require reindexing ofanvildevreindex:anvilprodor the changes introduced by it will not require reindexing ofanvilprodreindex:prodor the changes introduced by it will not require reindexing ofprodreindex:partialand its description documents the specific reindexing procedure fordev,anvildev,anvilprodandprodor requires a full reindex or carries none of the labelsreindex:dev,reindex:anvildev,reindex:anvilprodandreindex:prodAuthor (mirror)
mirror:devor the changes introduced by it will not require mirroring ofdevmirror:anvildevor the changes introduced by it will not require mirroring ofanvildevmirror:anvilprodor the changes introduced by it will not require mirroring ofanvilprodmirror:prodor the changes introduced by it will not require mirroring ofprodmirror:partialand its description documents the specific mirroring procedure fordev,anvildev,anvilprodandprodor requires a full mirroring or carries none of the labelsmirror:dev,mirror:anvildev,mirror:anvilprodandmirror:prodAuthor (API changes)
APIor this PR does not modify a REST APIa(A) tag to commit title for backwards (in)compatible changes or this PR does not modify a REST APIapp.pyor this PR does not modify a REST APIAuthor (upgrading deployments)
make docker_images.jsonand committed the resulting changes or this PR does not modifyazul_docker_images, or any other variables referenced in the definition of that variableutag to commit title or this PR does not require upgrading deploymentsupgradeor does not require upgrading deploymentsdeploy:sharedor does not modifydocker_images.json, and does not require deploying thesharedcomponent for any other reasondeploy:gitlabor does not require deploying thegitlabcomponentdeploy:runneror does not require deploying therunnerimageAuthor (hotfixes)
Ftag to main commit title or this PR does not include permanent fix for a temporary hotfixanvilprodandprod) have temporary hotfixes for any of the issues linked to this PRAuthor (before every review)
develop, squashed fixups from prior reviewsmake requirements_updateor this PR does not modifyDockerfile,environment,requirements*.txt,common.mk,Makefileorenvironment.bootRtag to commit title or this PR does not modifyrequirements*.txtreqsor does not modifyrequirements*.txtmake integration_testpasses in personal deployment or this PR does not modify functionality that could affect the IT outcomePeer reviewer (after approval)
Note that after requesting changes, the PR must be assigned to only the author.
System administrator (after approval)
demoorno demono demono sandboxN reviewslabel is accurateOperator
reindex:…labels andrcommit title tagmirror:…labelsno demodevelopOperator (deploy
.sharedand.gitlabcomponents)_select dev.shared && CI_COMMIT_REF_NAME=develop make -C terraform/shared apply_keep_unusedor this PR is not labeleddeploy:shared_select dev.gitlab && CI_COMMIT_REF_NAME=develop make -C terraform/gitlab applyor this PR is not labeleddeploy:gitlab_select anvildev.shared && CI_COMMIT_REF_NAME=develop make -C terraform/shared apply_keep_unusedor this PR is not labeleddeploy:shared_select anvildev.gitlab && CI_COMMIT_REF_NAME=develop make -C terraform/gitlab applyor this PR is not labeleddeploy:gitlabdeploy:gitlabdeploy:gitlabSystem administrator (post-deploy of
.gitlabcomponent)dev.gitlabare complete or this PR is not labeleddeploy:gitlabanvildev.gitlabare complete or this PR is not labeleddeploy:gitlabOperator (deploy runner image)
_select dev.gitlab && make -C terraform/gitlab/runneror this PR is not labeleddeploy:runner_select anvildev.gitlab && make -C terraform/gitlab/runneror this PR is not labeleddeploy:runnerOperator (sandbox build)
sandboxlabel or PR is labeledno sandboxdevor PR is labeledno sandboxanvildevor PR is labeledno sandboxsandboxdeployment or PR is labeledno sandboxanvilboxdeployment or PR is labeledno sandboxsandboxdeployment or PR is labeledno sandboxanvilboxdeployment or PR is labeledno sandboxsandboxor this PR does not remove catalogs or otherwise causes unreferenced indices insandboxanvilboxor this PR does not remove catalogs or otherwise causes unreferenced indices inanvilboxsandboxor this PR is not labeledreindex:devanvilboxor this PR is not labeledreindex:anvildevsandboxor this PR is not labeledreindex:devanvilboxor this PR is not labeledreindex:anvildevsandboxor this PR is not labeledmirror:devanvilboxor this PR is not labeledmirror:anvildevsandboxor this PR is not labeledmirror:devanvilboxor this PR is not labeledmirror:anvildevOperator (merge the branch)
All status checks passed andthe PR is mergeablepif the PR is also labeledpartialOperator (main build)
devanvildevdevdevanvildevanvildev_select dev.shared && make -C terraform/shared applyor this PR is not labeleddeploy:shared_select anvildev.shared && make -C terraform/shared applyor this PR is not labeleddeploy:shareddevanvildevOperator (reindex)
devor this PR is neither labeledreindex:partialnorreindex:devanvildevor this PR is neither labeledreindex:partialnorreindex:anvildevdevor this PR is neither labeledreindex:partialnorreindex:devanvildevor this PR is neither labeledreindex:partialnorreindex:anvildevdevor this PR is neither labeledreindex:partialnorreindex:devanvildevor this PR is neither labeledreindex:partialnorreindex:anvildevdevor this PR does not require reindexingdevanvildevor this PR does not require reindexinganvildevdevor this PR does not require reindexingdevanvildevor this PR does not require reindexinganvildevdevor this PR does not require reindexingdevanvildevor this PR does not require reindexinganvildevdevor this PR does not require reindexingdevdevor this PR does not require reindexingdevdeploy_browserjob in the GitLab pipeline for this PR indevor this PR does not require reindexingdevanvildevor this PR does not require reindexinganvildevdeploy_browserjob in the GitLab pipeline for this PR inanvildevor this PR does not require reindexinganvildevOperator (mirroring)
devor this PR is not labelledmirror:devanvildevor this PR is not labelledmirror:anvildevdevor this PR is not labelledmirror:devanvildevor this PR is not labelledmirror:anvildevdevor this PR is not labelledmirror:devanvildevor this PR is not labelledmirror:anvildevOperator
deploy:shared,deploy:gitlab,deploy:runner,API,reindex:partial,reindex:anvilprod,reindex:prod,mirror:partial,mirror:anvilprodandmirror:prodlabels to the next promotion PRs or this PR carries none of these labelsdeploy:shared,deploy:gitlab,deploy:runner,API,reindex:partial,reindex:anvilprod,reindex:prod,mirror:partial,mirror:anvilprodandmirror:prodlabels, from the description of this PR to that of the next promotion PRs or this PR carries none of these labelsShorthand for review comments
Lline is too longWline wrapping is wrongQbad quotesFother formatting problem