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

fix(libtofs): avoid using subpath by default #156

Merged

Conversation

myii
Copy link
Member

@myii myii commented Aug 6, 2019

So there are two TOFS improvements here in two commits.

For the first one:

The second commit (refactor(libtofs): remove deprecated v1_path_prefix argument):

@myii myii requested a review from baby-gnu August 6, 2019 09:22
@myii
Copy link
Member Author

myii commented Aug 6, 2019

@baby-gnu So this is the fix alluded to in myii/ssf-formula#3 (comment).

@myii
Copy link
Member Author

myii commented Aug 6, 2019

Need #157 merged first and then this will be rebased on top.

@myii myii force-pushed the fix/opt-in-for-libtofs-subpaths branch from d4767a3 to 3a36ae7 Compare August 6, 2019 11:58
@myii myii changed the title fix(libtofs): avoid using subpaths by default fix(libtofs): avoid using subpath by default Aug 6, 2019
@myii
Copy link
Member Author

myii commented Aug 6, 2019

Need #157 merged first and then this will be rebased on top.

Done, tests passing and this is ready for review and merge again.

Copy link
Member

@aboe76 aboe76 left a comment

Choose a reason for hiding this comment

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

nice and clean solution @myii

Copy link
Contributor

@baby-gnu baby-gnu left a comment

Choose a reason for hiding this comment

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

The lookup policy is driven by the formula writer.

As I saw the different changes done to give power to users wanting thing I did not think about, do you think that it can be useful to allow user to override the policy of the formula writer by setting a config like tofs.use_subpath.<lookup key>.

In which case you could add to files_switch something like:

  {#- Does user override subpath lookup? #}
  {%- set use_subpath = salt['config.get'](
      tplroot ~ ':tofs:use_subpath:' ~ lookup,
      use_subpath
  ) %}

This can be done later without breaking API, so just merge this for now and let users surprise us with their unthinkable use cases ;-)

template/libtofs.jinja Outdated Show resolved Hide resolved
* Only the `systemd-formula` uses these, so avoid for all other formulas
* Unused throughout all SaltStack Formulas
@myii myii force-pushed the fix/opt-in-for-libtofs-subpaths branch from 3a36ae7 to ad2a965 Compare August 8, 2019 10:39
@myii
Copy link
Member Author

myii commented Aug 8, 2019

This can be done later without breaking API, so just merge this for now and let users surprise us with their unthinkable use cases ;-)

@baby-gnu Maybe it's actually the two of us, surprising users with our unthinkable use-cases! But seriously, I think TOFS has improved significantly from where it started, so thank you for your contributions and reviews. We can definitely revisit these extensions in upcoming discussions.

Thanks for putting up with us, @aboe76! Appreciate the reviews and support along the way.

@aboe76
Copy link
Member

aboe76 commented Aug 8, 2019

@myii no problem supporting this, I think you and the others are moving the formulas further and made them better, with tofs, semantic versioning, changelogs and travis testing.

@myii
Copy link
Member Author

myii commented Aug 8, 2019

@aboe76 Thanks for that. Do you mind merging this? I'd like to update myii/ssf-formula#3 and then push out those PRs.

@aboe76 aboe76 merged commit fc3a130 into saltstack-formulas:develop Aug 9, 2019
@myii myii deleted the fix/opt-in-for-libtofs-subpaths branch August 9, 2019 13:04
@saltstack-formulas-travis

🎉 This PR is included in version 3.3.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants