MetaCell / MetaCell/geppetto-meta

Remove/separate build-time configuration

Open
#189 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement geppetto-client high priority
Dominant language
JavaScript
Stars
6
Forks
4
PR merge metrics
No merged PRs in 30d

Description

The GEPPETTO_CONFIGURATION file contains a mix of build-time, backend and runtime configuration.
This limits the reusage of prebuilt images: the full image needs to be rebuilt to set it as embeddable or to set the ssl websocket communication.

The way we load the GEPPETTO_CONFIGURATION atm is not really a library issue, but rather a webpack configuration of the application using it: https://github.com/openworm/geppetto-application/blob/master/GeppettoConfiguration.json

I propose to move the loading of the variables needed ar runtime to a json loading from a subfolder of the main js folder (build), so that we can eventually load that json file as a ConfigMap on Kubernetes.

The variables that I'm aware having some usage in the client are `useSsl`, `contextPath`, `embedded`, `embedderURL`. The loading of this json file to create the GEPPETTO_CONFIGURATION can be moved in the geppetto-client init https://github.com/MetaCell/geppetto-meta/blob/feature/175/geppetto.js/geppetto-client/src/GEPPETTO.js#L134

The rest is mostly related to the main html page functionality, which can be revised as a separate issue.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the GEPPETTO_CONFIGURATION loading in geppetto-client/src/GEPPETTO.js around line 134 and compare it with the application webpack configuration in GeppettoConfiguration.json. Trace the uses of useSsl, contextPath, embedded, and embedderURL. Done means runtime values load from a JSON file under the built JavaScript folder while build-time configuration remains separate.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, webpack
Domain
build-system, frontend
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.