release-hatch is deployed on L4 under /d/release-hatch-2/
.
It runs on python3.9 because that's what TPP have installed for us. To upgrade this we need to either ask TPP to install a different version or decommission os-release so this can run on L3.
It is running in a terminal under @ghickman's account via ./run.sh
.
Should it break any other user should be able to run the same command from the same directory.
If ./run.sh
prints nothing back and exits with 1
then it's likely something is up with the virtualenv and recreating is likely the easiest first step:
cd /d/release-hatch-2/
rm -rf venv
python -m venv venv
venv/Scripts/pip install -r requirements.prod.txt --no-index -f /d/windows-wheels/
This will remove the current virtualenv, create a new one, and install the requirements from the directory of wheels.
# macOS
brew install just
# Linux
# Install from https://github.com/casey/just/releases
# Add completion for your shell. E.g. for bash:
source <(just --completions bash)
# Show all available commands
just # shortcut for just --list
Set up a local development environment with:
just devenv
Run the tests via pytest with:
just test <args>
Config is loaded via env vars from .env:
cp dotenv-sample .env
The default dev config will run this service on http://127.0.0.1:8001
, and
assume a local job-runner is running on http://127.0.0.8:8000
This will run the server on the port configured
just run
You can now go to http://127.0.0:8001/docs
do examine and try the API.
The test client is a developer tool to test a locally running release-hatch server, and uses the same configuration as the running service. It can be used to exercise the APIs release-hatch provides. It automatically generates the appropriate auth tokens using the service config.
This can be useful if you are manually testing urls with curl, for example.
just client token -w WORKSPACE
Get the index API response for a workspace or release.
just client index -w WORKSPACE [-r RELEASE_ID]
Download a specific file from a workspace or release.
just client file -w WORKSPACE [-r RELEASE_ID] -f file/name.txt
This creates some files in a temporary workspace which is deleted after the test run. It creates a release for that workspace, and checks the the index and files APIs work correctly for both the workspace and the release. It is run by default as a part of the test suite, as well as used as part of our deployment tooling testing.
just client test
Note: it does not test the release creation or file upload APIs, currently, but may do in future.
You will need to set your JOB_SERVER_TOKEN
value in .env to match the token value in
job-server and restart.