livecycle / livecycle/preevy

[Bug]: Running `preevy up` with services fails

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

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
2.2k
Forks
91
PR merge metrics
No merged PRs in 30d

Description

### What happened?

Running `preevy up` with SERVICES arg fails.

### Add screenshots

### Docker Compose file

Screenshot 2024-08-05 at 10 13 39 PM

### Running `preevy up`

Screenshot 2024-08-05 at 10 12 15 PM

Passing the service `wordpress` fails with error:

```
Error: command `docker compose --project-directory /Users/nicolas/Workspace/awesome-compose/wordpress-mysql -f compose.yaml convert wordpress preevy_proxy` exited with code 1: no such service: preevy_proxy
```

### Steps to reproduce the behavior

Copy the following docker compose file:

```yaml
services:
db:
# We use a mariadb image which supports both amd64 & arm64 architecture
image: mariadb:10.6.4-focal
# If you really want to use MySQL, uncomment the following line
#image: mysql:8.0.27
command: '--default-authentication-plugin=mysql_native_password'
volumes:
- db_data:/var/lib/mysql
restart: always
environment:
- MYSQL_ROOT_PASSWORD=somewordpress
- MYSQL_DATABASE=wordpress
- MYSQL_USER=wordpress
- MYSQL_PASSWORD=wordpress
expose:
- 3306
- 33060

wordpress:
image: wordpress:latest
ports:
- 80:80
restart: always
environment:
- WORDPRESS_DB_HOST=${PREEVY_BASE_URI_DB_3306:-db}
- WORDPRESS_DB_USER=wordpress
- WORDPRESS_DB_PASSWORD=wordpress
- WORDPRESS_DB_NAME=wordpress

volumes:
db_data:
```

Run `preevy up wordpress`

### Expected behavior

Specifying service(s) should deploy a preview environment with only these service(s) (and dependencies)

### What OS are you seeing the problem on?

MacOS

### Additional context

Preevy Version: 0.0.64
Deployed on Kubernetes

### Record

- [X] I agree to follow this project's Code of Conduct

Contributor guide

Open the contributing guide

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 by reproducing the failure with the provided Docker Compose file and `preevy up wordpress` on macOS. Inspect the `preevy up` handling of service arguments and the Docker Compose command that reports `no such service: preevy_proxy`; done means deploying only the requested service and its dependencies without that error.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, docker-compose, kubernetes
Domain
cli, devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.