DefangLabs / DefangLabs/samples
Test runner config values not properly detected
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 12
- Forks
- 27
- Avg merge
- 3h 30m
- Merged PRs (30d)
- 36
Description
The test runner does not properly identify config values that are used in string interpolation. For example, in the following compose file:
services:
hasura:
restart: unless-stopped
build:
dockerfile: Dockerfile
context: ./hasura
# If you want to add your own domain name in Defang BYOC, uncomment the following line and replace the domain name with your own
# domainname: hasura.mycoolapp.com
ports:
- target: 8080
published: 8080
mode: ingress
depends_on:
database:
condition: service_started
environment:
- HASURA_GRAPHQL_ADMIN_SECRET
- HASURA_GRAPHQL_DATABASE_URL=postgres://postgres:${POSTGRES_PASSWORD}@database:5432/postgres?sslmode=${SSL_MODE}
- HASURA_GRAPHQL_ENABLE_CONSOLE=true
- HASURA_GRAPHQL_UNAUTHORIZED_ROLE=public
- HASURA_GRAPHQL_EXPERIMENTAL_FEATURES=naming_convention
- HASURA_GRAPHQL_DEFAULT_NAMING_CONVENTION=graphql-default
- HASURA_GRAPHQL_MIGRATIONS_DIR=/hasura/migrations
- HASURA_GRAPHQL_METADATA_DIR=/hasura/metadata
database:
image: postgres:16
x-defang-postgres: true
ports:
- target: 5432
mode: host
environment:
- POSTGRES_PASSWORD
It does not detect SSL_MODE so tests always fail. The following is the current workaround:
- SSL_MODE
That allows it to be detected and thus load the correct secret from the test environment.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with the provided compose configuration, focusing on the interpolated POSTGRES_PASSWORD and SSL_MODE values. Trace how the test runner discovers environment references and verify that SSL_MODE is detected without adding the standalone workaround entry. Done means the affected tests load SSL_MODE from the test environment and pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker-compose
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100