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

Notify on schema push if no schema files are found #507

Merged
merged 6 commits into from
Dec 11, 2024
Merged

Notify on schema push if no schema files are found #507

merged 6 commits into from
Dec 11, 2024

Conversation

henryfauna
Copy link
Contributor

Ticket(s): FE-6218

Problem

schema push will let you nuke your schema if you accidentally specify the wrong directory with no .fsl files.

Solution

In order to run schema push you must specify a directory with .fsl files.

Result

You can't run fauna schema push --dir /wrong/dir --no-input and nuke your schema.

Testing

Added a test.

@henryfauna henryfauna requested a review from a team as a code owner December 11, 2024 17:21
Copy link
Contributor

@ecooper ecooper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we think this is a validationerror? Should we throw that?

The schema commands are interactive by design so I'm torn.

@henryfauna
Copy link
Contributor Author

Do we think this is a validationerror? Should we throw that?

The schema commands are interactive by design so I'm torn.

Yeah I think an error makes sense here. It would be nice to not fail silently if you were running schema push --no-input from a script or something.

@henryfauna henryfauna merged commit 82fd6d4 into v3 Dec 11, 2024
4 checks passed
@henryfauna henryfauna deleted the fe-6218 branch December 11, 2024 22:01
@cleve-fauna cleve-fauna mentioned this pull request Dec 13, 2024
@mwilde345 mwilde345 mentioned this pull request Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants