mistercrunch opened a new pull request, #31796:
URL: https://github.com/apache/superset/pull/31796

   Running Cypress tests as depicted in docs is difficult and error-prone. Some 
of the challenges include:
   - having a reproducible deterministic setup (version of python that matches 
CI)
   - switching to a different `superset_config`
   - requires a local postgres
   - database state from previous branch can interfere in and out of a cypress 
setup (different set of examples, database migrations might be in a different 
checkpoint, ...)
   - switching to a different port
   - having celery workers working
   - caching is nice to have to accelerate tests, which may or may not be set up
   - ...
   
   Given this, I thought I'd just make it such that you can just 
`CYPRESS_CONFIG=true docker compose up` to fire up a backend against which you 
can run cypress tests locally. Given the reference to `CYPRESS_CONFIG` in our 
docker-compose.yml and in various `docker/`-related scripts, it looks like 
either it was supported in the past, or someone tried to do work in this 
direction, but clearly isn't working today as is.
   
   To get this working here I'm:
   - setting up `CYPRESS_CONFIG=true` to point to a dedicated database schema 
`superset_cypress`, this gets created on Postgres first-boot, and currently 
will require deleting the docker volume for Postgres to take effect
   - starting up superset app to run on `8081`, which seems to be the default 
port assumption for Cypress runs
   - pointing to the config file at 
`tests/integration_tests/superset_test_config.py`, which is need for tests, 
eventually might want to merge this into `docker/pythonpath/superset_config.py` 
for simplicity. For now I conditionally import it
   - removing duplicate docs entry existing in both 
`docs/docs/contributing/development.mdx` and `docs/docs/contributing/howtos.mdx`
   - adjusting docs
   
   As of current commit, tests don't seem to pass, so there's probably some 
things I'm missing, have to dig deeper
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to