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

[FEATURE] decouple git from non-git features #1953

Open
Indigenuity opened this issue Nov 15, 2024 · 1 comment
Open

[FEATURE] decouple git from non-git features #1953

Indigenuity opened this issue Nov 15, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@Indigenuity
Copy link

Is your feature request related to a problem? Please describe.
It looks like terramate has several great features, but it's pretty difficult to evaluate them individually when they are tightly coupled by default. For example, a default install of terramate can't perform run commands or codegen without also configuring change detection.

I just attempted to use a few of the basic features I saw from a reddit post, but on my own repo with working terraform. It started fine. This all worked:

$ brew install terramate
$ terramate create --name app-db --description "Postgres DB for the app" live/app-db
Created stack /live/app-db
$ terramate create --name redis-cache --description "redis server for the app" live/redis-cache
Created stack /live/redis-cache
$ terramate list
app-db
redis-cache

So far, so great. But when I tried the basic feature of "run this terraform command for each stack", I ran into an unexpected git failure:

$ terramate run terraform version
Error: unable to fetch remote commit
> fetching remote commit of origin/main: Git.FetchRemoteRev: git ls-remote "origin" "main" can't parse:

This is a pretty surprising error for several reasons

  • my attempted operation has nothing to do with git
  • my attempted operation should require zero network calls
  • Whose git settings are being used? I have no "main", and I have no remote

At this point, I didn't even know Change Detection was a feature of terramate, so I was quite confused. Even after discovering it in the docs, I'm still confused at why I can't use a terramate run command without overriding a bunch of incorrect default settings for an unrelated feature.

Describe the solution you'd like
Features other than Change Detection shouldn't require the user to configure Change Detection. Personally, I'd like to use terramate features like terramate run without git being involved at all. It's not immediately clear from the documentation whether that's even possible.

@Indigenuity Indigenuity added the enhancement New feature or request label Nov 15, 2024
@soerenmartius
Copy link
Contributor

Hey @Indigenuity,

Thanks for the feedback, I get your point and we had some users being confused in the past about the default behavior of Terramate / tight integration with Git per default. What you are describing here is yet another feature in Terramate called safeguards that are meant to prevent you from running into scenarios that aren't favorable (e.g., to apply changes locally without going through a review and CI/CD run).

Those safeguards can be configured/disabled on a per-check basis in your Terramate project. For details, please see https://terramate.io/docs/cli/orchestration/safeguards#safeguards. To disable all safeguards, you can use the -X flag when using terramate run, e.g., terramate run -X -- pwd.

Again, thanks for the constructive feedback. I'll take some time to open up a wider discussion with the team to see how we can perhaps incorporate your feedback and make Terramate more intuitive to use!

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

No branches or pull requests

2 participants