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

ScriptsRun.script_name - like named scripts in subfolders causes unwanted collision/rerun #444

Closed
SlyW opened this issue Dec 10, 2021 · 3 comments

Comments

@SlyW
Copy link

SlyW commented Dec 10, 2021

When developing with sub-folders under a RH folder (e.g. /Up/tables/table_1, /Up/tables/table_2), if two scripts have the same name (e.g. /Up/tables/table_1/init.sql, /Up/tables/table_2/init.sql), RH will mistakenly overwrite the entry in ScriptsRun with the text/hash from the second file rather than creating a new entry to represent the different file.

As such, the next time RH processes the folders/files, it believes the first instance has changed and re-runs it (updating the ScriptsRun table entry) and then when it finds the second file, runs it again believing it has changed (updating the ScriptsRun table entry) ... rinse, repeat.

Any chance to add the folder structure to the script_name value?

@erikbra
Copy link
Member

erikbra commented Dec 16, 2021

Hi, @SlyW . No one is actively maintaining RoundhousE at the moment. I was the main maintainer for the last couple of years, but the codebase needed so much love to be able to meet the 2020s, that I gave up, and started anew.

You can read about the discussion leading to creating grate, inspired by RoundhousE, here: #438

grate should be a drop-in replacement for RoundhousE, you can double-check if you have any blockers here: https://erikbra.github.io/grate/migrating-from-roundhouse/

I implemented your feature request in grate, here. You can look through it if you like. I'll leave the PR open to comments a couple of days, but you can expect a new release in a few days.

erikbra/grate#151

I would really recommend moving from RoundhousE to grate, and, if you have some issues that prevent you from migrating, please create an issue in the grate repository :)

@SlyW
Copy link
Author

SlyW commented Dec 17, 2021

Thank you @erikbra - I will be researching the conversion to grate and am excited to see continued development on this efficiency creator.

@SlyW SlyW closed this as completed Dec 17, 2021
@erikbra
Copy link
Member

erikbra commented Dec 17, 2021

Lovely. Let me know if you hit any roadblocks migrating!

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