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

to convert one must wololo #1054

Closed
petersilva opened this issue May 17, 2024 · 2 comments · Fixed by #1055
Closed

to convert one must wololo #1054

petersilva opened this issue May 17, 2024 · 2 comments · Fixed by #1055
Assignees

Comments

@petersilva
Copy link
Contributor

started with pr #1045 ... but that was cosmetic... perhaps a joke?

anyways it was an interesting idea. Currently, sr3 convert

  • will only ever convert one configuration per invocation... which is different from most other command that accept groups.
  • will never overwrite an existing sr3 configuration.

In this issue we add:

  • ability to convert multiple configurations in one invocation.
  • ability to overwrite existing config if --wololo provided
  • ability to overwite multiple existing configurations if --dangerWillRobinson=n --wololo convert provided.
@petersilva
Copy link
Contributor Author

@MagikEh this is what I have working now...


SSC-5CD2310S60% sr3 convert cpump/pelle_dd2_f05
v2_config: ['cpump/pelle_dd2_f05']
2024-05-17 13:35:37,195 53795 [ERROR] sarracenia.sr convert1 cpump/cpump/pelle_dd2_f05 already exists in v3. To overwrite, use --wololo

SSC-5CD2310S60% sr3 --wololo convert cpump/pelle_dd2_f05
v2_config: ['cpump/pelle_dd2_f05']
2024-05-17 13:35:43,932 53826 [WARNING] sarracenia.sr convert1 Wololo!
2024-05-17 13:35:43,932 53826 [INFO] sarracenia.sr convert1 wrote conversion from v2 cpump/pelle_dd2_f05 to sr3

SSC-5CD2310S60% sr3 --wololo convert cpump/pelle_dd2_f05 cpump/pelle_dd2_f05
v2_config: ['cpump/pelle_dd2_f05', 'cpump/pelle_dd2_f05']
 will not overwrite multiple configurations unless really sure
 If you are really sure, use --dangerWillRobinson=2

SSC-5CD2310S60% sr3 --dangerWillRobinson=2 convert cpump/pelle_dd2_f05 cpump/pelle_dd2_f05
v2_config: ['cpump/pelle_dd2_f05', 'cpump/pelle_dd2_f05']
2024-05-17 13:36:12,401 53999 [ERROR] sarracenia.sr convert1 cpump/cpump/pelle_dd2_f05 already exists in v3. To overwrite, use --wololo
2024-05-17 13:36:12,402 53999 [ERROR] sarracenia.sr convert1 cpump/cpump/pelle_dd2_f05 already exists in v3. To overwrite, use --wololo

SSC-5CD2310S60% sr3 --wololo --dangerWillRobinson=2 convert cpump/pelle_dd2_f05 cpump/pelle_dd2_f05
v2_config: ['cpump/pelle_dd2_f05', 'cpump/pelle_dd2_f05']
2024-05-17 13:36:16,932 54020 [WARNING] sarracenia.sr convert1 Wololo!
2024-05-17 13:36:16,932 54020 [INFO] sarracenia.sr convert1 wrote conversion from v2 cpump/pelle_dd2_f05 to sr3
2024-05-17 13:36:16,933 54020 [WARNING] sarracenia.sr convert1 Wololo!
2024-05-17 13:36:16,955 54020 [INFO] sarracenia.sr convert1 wrote conversion from v2 cpump/pelle_dd2_f05 to sr3

@petersilva
Copy link
Contributor Author

fwiw... I have been annoyed for months about how slow the flow tests start up, because the converts only take one at a time.
This means that we fork an sr.py and read the entire config tree, process tree, state tree, and process table between each convert, which makes each one take a second or two. Once this is merged, I will update sr_insects to use multiple configs on the same line, and it will run a lot faster.

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 a pull request may close this issue.

1 participant