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

templates in user_data always cause a rebuild #1898

Closed
jwaldrip opened this issue May 11, 2015 · 3 comments · Fixed by #1911
Closed

templates in user_data always cause a rebuild #1898

jwaldrip opened this issue May 11, 2015 · 3 comments · Fixed by #1911

Comments

@jwaldrip
Copy link
Contributor

When using templates for user-data, it seems to cause a change every time I build. Is there anyway to do a sha on the output of the template to tell the statefile that the output is unchanged?

phinze added a commit that referenced this issue May 11, 2015
This reworks the template lifecycle a bit such that we get nicer diff
behavior.

First, we tick ForceNew on for both filename and vars, so that the diff
indicates that the template will be "replaced" on change. This is mostly
cosmetic, but it also tracks conceptually with the fact that the
identifier we use is a hash of the contents, so any change essentially
makes a "new resource".

Second, we change the Exists implementation to only return `false` when
there has been a change in the rendered template. This lets descendent
resources see the computed value changing so that they'll properly
trigger in the plan.

Fixes #1898
Refs #1866 (but does not fix, there's another deeper issue there)
@phinze
Copy link
Contributor

phinze commented May 11, 2015

Hey @jwaldrip - thanks for the report. As it happens, I already had a WIP addressing this very issue. Just pushed and we'll get it reviewed and landed soon.

@phinze phinze self-assigned this May 11, 2015
@jwaldrip
Copy link
Contributor Author

@phinze thanks!

@ghost
Copy link

ghost commented May 2, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators May 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants