terraform-linters / tflint

A Pluggable Terraform Linter
Mozilla Public License 2.0
4.88k stars 354 forks source link

Added snap installation option. #1961

Closed tingdahl closed 8 months ago

tingdahl commented 8 months ago

I've been serving tflint using a snap for about 6 months, about 400 weekly users. I can continue that (I normally update within a few days after a new upstream release), but I'm also open to merge the snap build code into the main repo if you're interested of that.

tingdahl commented 8 months ago

Thanks for your input, @bendrucker . I am not going to push this one hard. Most users that use terraform on Ubuntu install it via Canonical's snap. It has the advantage to be disconnected from the OS (deb) as the deb is typically slow-moving, while the snap can be fast moving. The analogy of Terraform is however not 100%, as Hashicorp does is a corp with its own agenda, and tflint is a community project (AFAIK). The snap has a strong benefit in that it will be updated to the latest version automatically, while the universal script takes manual effort. As said, I'm not pushing (more than this).

wata727 commented 8 months ago

Thank you for your contribution. I have no particular opinion this matter. It might make sense to add this if a lot of users ask for it, but for now I'd like to support @bendrucker's opinion.

bendrucker commented 8 months ago

The comment just raises more questions which starts to feel like bikeshedding. All the things you said about snaps being different/better need to be explained to users, not just in this thread. If it's the same story as Chocolatey (manual version updates) it's not worth it. If there's zero maintenance and you want to make the case for us to do the work to have an official distribution, we can hear that out. The middle path of advertising a third party package for a niche package manager isn't worth moving forward with right now.

tingdahl commented 8 months ago

Ben,

I understand your position. I am willing to:

  1. Create a PR to integrate the snap packaging (1 directory with a yaml file).
  2. Help you to maintain the yaml file, test new releases and promote them to the stable channel when tests are done.
  3. Invite you to be have write access on snapcraft.io, where the snap is built.

This would release every commit to the latest/edge channel for all architectures (x64, arm64, armhf, s390 and power), but manual work is needed to promote tagged releases to the stable channel.

Should you not be happy with my contribution, you can either dump the snap or maintain it yourself.

My end goal is the snap, and how that happens is secondary.

Hence, we can either go down that path, or you can reject the current PR. I agree with you that the half-baked solution is not ideal.

Cheers,

Kristofer

On Sun, Jan 28, 2024, 2:36 AM Ben Drucker @.***> wrote:

The comment just raises more questions which starts to feel like bikeshedding. All the things you said about snaps being different/better need to be explained to users, not just in this thread. If it's the same story as Chocolatey (manual version updates) it's not worth it. If there's zero maintenance and you want to make the case for us to do the work to have an official distribution, we can hear that out. The middle path of advertising a third party package for a niche package manager isn't worth moving forward with right now.

— Reply to this email directly, view it on GitHub https://github.com/terraform-linters/tflint/pull/1961#issuecomment-1913402624, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACPTD4VYUHGMTLM4LS4TG33YQWTQLAVCNFSM6AAAAABCI4V36CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJTGQYDENRSGQ . You are receiving this because you authored the thread.Message ID: @.***>

bendrucker commented 8 months ago

Can you give us some sense of what's entailed here? Code/config examples or links to docs, but also a PR is fine if that's easier. Adding a config file and/or automation is fine. Administrative work (promoting releases) is what I'm trying to avoid.

tingdahl commented 8 months ago

For now,

The easiest is to send the links to:

  1. The changes on my forked repo: https://github.com/tingdahl/tflint/blob/master/snap/snapcraft.yaml . That is the file that I would need to move into the snapcraft directory in upstream tflint. It would naturally need to be updated with your repo and a few other details.
  2. Documentation on snaps is best found here: https://snapcraft.io/docs/snapcraft . Snaps are the method to install almost all software on Ubuntu (from web-browsers to terraform to ... everything).

I do really not want to force myself upon you. One way ahead is to revisit the issue in 6 months. We can then see where my install-base is and depending on the snap's popularity, we can make a decision. That will give this some time to sink in.

Cheers,

Kristofer

Den sön 28 jan. 2024 kl 21:50 skrev Ben Drucker @.***>:

Can you give us some sense of what's entailed here? Code/config examples or links to docs, but also a PR is fine if that's easier. Adding a config file and/or automation is fine. Administrative work (promoting releases) is what I'm trying to avoid.

— Reply to this email directly, view it on GitHub https://github.com/terraform-linters/tflint/pull/1961#issuecomment-1913718128, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACPTD4X7FHPGPDYR7FOU5ITYQ22ZVAVCNFSM6AAAAABCI4V36CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJTG4YTQMJSHA . You are receiving this because you authored the thread.Message ID: @.***>

wata727 commented 8 months ago

Hmm, I don't really have an opinion on adding links with an annotation of "not directly maintained by the TFLint maintainers", but I'm not positive about adding files like snapcraft.yaml to a repository and maintaining them.

This comes from the regret of removing precommit hooks in the past because it could not be maintained.

wata727 commented 8 months ago

I'm sorry, but I'm closing this pull request. Once again, I sincerely thank you for your contributions in maintaining this snap package. If you have any other thoughts, please let us know.

tingdahl commented 8 months ago

No worries.

On Mon, Jan 29, 2024, 3:01 AM Kazuma Watanabe @.***> wrote:

I'm sorry, but I'm closing this pull request. Once again, I sincerely thank you for your contributions in maintaining this snap package. If you have any other thoughts, please let us know.

— Reply to this email directly, view it on GitHub https://github.com/terraform-linters/tflint/pull/1961#issuecomment-1913838111, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACPTD4VCJJ754QCQT2FLLSDYQ37G7AVCNFSM6AAAAABCI4V36CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJTHAZTQMJRGE . You are receiving this because you authored the thread.Message ID: @.***>