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] Automatically generate files if auto_gen_code is set to true #1716

Open
g13013 opened this issue May 15, 2024 · 2 comments
Open

[FEATURE] Automatically generate files if auto_gen_code is set to true #1716

g13013 opened this issue May 15, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@g13013
Copy link

g13013 commented May 15, 2024

Is your feature request related to a problem? Please describe.
Right now, many commands complain about obsolete code which breaks the flow of dev, I want to propose introducing a new config attribute auto_gen_code inside the terramate block that tells Terramate to automatically generate code if obsolete.

Describe alternatives you've considered
A wrapper script or shell alias that runs terramate generate before terramate commands

@g13013 g13013 added the enhancement New feature or request label May 15, 2024
@cwe1ss
Copy link

cwe1ss commented May 24, 2024

Ideally there would be an environment variable and/or CLI-flag for this as well. I would prefer to set this locally only, but not in my CI/CD workflow.

The CI/CD workflow should fail if someone did not generate the code. (We also check this via pre-commit etc, but still, I think it would be good if this were environment-specific)

@g13013
Copy link
Author

g13013 commented Jun 17, 2024

Ideally there would be an environment variable and/or CLI-flag for this as well. I would prefer to set this locally only, but not in my CI/CD workflow.

Supporting a flag in the terramate.tm.hcl would be good as well to avoid repitition.

The CI/CD workflow should fail if someone did not generate the code. (We also check this via pre-commit etc, but still, I think it would be good if this were environment-specific)

I would argue that it should work in both environments. any terramate command, especially terramate run should auto-generate files if the config/variable/CLI-flag is set to auto as most run commands depend on the generated files. After that, it's up to the engineer to decide on whether to keep control on the files generation step or make it implicit.

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