Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ftl schema diff - diff local schema against a cluster #1989

Closed
alecthomas opened this issue Jul 5, 2024 · 0 comments · Fixed by #2043
Closed

ftl schema diff - diff local schema against a cluster #1989

alecthomas opened this issue Jul 5, 2024 · 0 comments · Fixed by #2043
Assignees
Labels

Comments

@alecthomas
Copy link
Collaborator

This will be necessary for production.

@alecthomas alecthomas added the P1 label Jul 5, 2024
@github-actions github-actions bot added the triage Issue needs triaging label Jul 5, 2024
@ftl-robot ftl-robot mentioned this issue Jul 5, 2024
@bradleydwyer bradleydwyer added the next Work that will be be picked up next label Jul 8, 2024
@github-actions github-actions bot removed the triage Issue needs triaging label Jul 8, 2024
@github-actions github-actions bot removed the next Work that will be be picked up next label Jul 8, 2024
@gak gak assigned gak and unassigned safeer Jul 10, 2024
@gak gak closed this as completed in #2043 Jul 11, 2024
gak added a commit that referenced this issue Jul 11, 2024
Fixes #1989

```
ftl schema diff --help
Usage: ftl schema diff <other-endpoint> [flags]

Print any schema differences between this cluster and another cluster. Returns
an exit code of 1 if there are differences.

Arguments:
  <other-endpoint>    Other endpoint URL to compare against.

  --endpoint=http://127.0.0.1:8892     FTL endpoint to bind/connect to ($FTL_ENDPOINT).
  --color    Enable colored output regardless of TTY.
```

- Compares `<other-endpoint>` vs `--endpoint` into a unified diff with
color.
- Exits with 1 if there is a difference.
- Detects tty and will not emit ANSI unless `--color` is passed in.

<img width="1104" alt="image"
src="https://github.com/TBD54566975/ftl/assets/31338/7aa704ae-9df0-48c7-90d5-56f97f4d556c">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants