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

Throw on invalid .pgsync.yml #211

Closed
Garrett-R opened this issue Feb 19, 2024 · 2 comments
Closed

Throw on invalid .pgsync.yml #211

Garrett-R opened this issue Feb 19, 2024 · 2 comments

Comments

@Garrett-R
Copy link

Garrett-R commented Feb 19, 2024

It would be nice if pgsync threw when .pgsync.yml was invalid. While QAing on temporary DBs, an LLM just hallucinated that tables was a config option (made feature request in #210 BTW).

pgsync happily ran despite an unrecognized config. Indeed you can add this to your config:

foo:
  - bar

and it'll still run. I think it's more conventional and safer for tools not to run if there's hogwash in the config.

@ankane
Copy link
Owner

ankane commented Feb 28, 2024

Hi @Garrett-R, thanks for the suggestion. However, this would affect YAML aliases.

@ankane ankane closed this as completed Feb 28, 2024
@Garrett-R
Copy link
Author

Ah good to know!

It does seem though that, at least in theory, this package should be able to consume one of its config files and answer the question "is this a valid config file?" even while supporting YAML aliases. No idea how challenging that would be though.

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

No branches or pull requests

2 participants