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

Target DB placeholder not available during singledb mode parsing #97

Closed
AndreiTapai opened this issue Apr 11, 2024 · 2 comments
Closed

Comments

@AndreiTapai
Copy link

AndreiTapai commented Apr 11, 2024

Describe the bug
While parsing a function (yaml with !include, sql file in sql/my_file.sql) i get back an error ValueError: Unknown placeholder [TARGET_DB]

Expected behavior
According to the docs, this placeholder should always be available when the parameter --target-db is passed.

Can't attach log or yaml config sadly - however I was able to pinpoint the issue:

In singledb init_config the call config=super().init_config() happens before the target_db placeholder is set. Then, in super.init_config, the attempt to parse blueprints happens at line 281-282. This fails because of the missing target db placeholder.

Hopefully that is enough context. Let me know. I will try passing in the placeholder explicitly via command line until this is fixed.

@littleK0i
Copy link
Owner

@AndreiTapai , should be fixed in 0.25.3.

Placeholder TARGET_DB is now set earlier, so it can take effect before parsing of YAML configs. But argument --target-db must be set explicitly for this placeholder to work.

Thank you for pointing this out. We do not use SingleDB mode internally, so some issues might be present. I'll see if I can add more tests regarding to SingleDB mode specifically.

@AndreiTapai
Copy link
Author

This worked. Thank you for the update.

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