Page MenuHomePhabricator

[QB] [TECH] Local development server doesn't adhere to port configuration in `.env`
Open, Needs TriagePublic

Description

Problem

Setting a port configuration in the .env file provided with the codebase does not change in the port the development server is accessible from.

Steps to reproduce

  1. In your local query builder development environment, set the PORT value to 1234
  2. Run the development server using docker compose: docker compose dev up

Current behavior

The development server is not accessible from localhost:1234

Expected behavior

The development server is accessible from localhost:1234

Notes:

  • This seems to have occurred as a result of the migration to vite as a development task runner.
  • While adding the workaround below to the "serve" script in package.json might work as a temporary solution, we still want to make sure that test and other scripts also work as expected (especially e2e tests):
package.json
"serve": "eval $(grep '^PORT' .env) && vite --config vite.config.js --port ${PORT:-8080}"

Event Timeline

Prio Notes:

  • Does not affect end users / production
  • Does affect development efforts
  • Does not affect onboarding efforts
  • Does not affect additional stakeholders
ItamarWMDE renamed this task from [Query Builder] Local development server doesn't adhere to port configuration in `.env` to [SW] [Query Builder] Local development server doesn't adhere to port configuration in `.env`.Mar 28 2023, 1:38 PM
ItamarWMDE moved this task from [QT] By Project to [DOT] Prioritized on the wmde-wikidata-tech board.

Story Writing Notes:

  • This is orthogonal to a decision to be made regarding our development tooling for Query Builder, and whether we would like to migrate to tools that are more consistent with our other projects (mwcli / fresh node), a ticket regarding this should be created regardless.
  • We should probably specify that the aforementioned workaround cannot be accepted as the solution to the issue.
ItamarWMDE renamed this task from [SW] [Query Builder] Local development server doesn't adhere to port configuration in `.env` to [SW] [QB] [TECH] Local development server doesn't adhere to port configuration in `.env`.Sep 20 2023, 2:57 PM
ItamarWMDE renamed this task from [SW] [QB] [TECH] Local development server doesn't adhere to port configuration in `.env` to [QB] [TECH] Local development server doesn't adhere to port configuration in `.env`.Nov 8 2023, 11:07 AM
ItamarWMDE updated the task description. (Show Details)

Notes: let's park this until we have the approach for the Wikit to Codex migration @HasanAkgun_WMDE

tagging to T421428 to be reviewed and prioritized