Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: template version replacement & metadata updates#58

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

ethanndickson
Copy link
Member

@ethanndicksonethanndickson commentedAug 1, 2024
edited
Loading

To avoid spurious template version diffs, the template resource will only create a new template version under specific circumstances.

  1. When creating the resource, a template version will be created for each in the list.
  2. Subsequentterraform applys will hash the contents of the given directories. The provider will then check if the hash belongs to a template version known of in the previous apply.
    • If the hash doesn't belong to any, a new template version will be created
    • If the hash belongs to a previous template version, but the names are different, the name will be updated.
    • If the hash belongs to a previous template version, and the name is the same (or both auto-generated names), no update will happen.

Therefore, theversionname field should only be set when it's guaranteed that it will be updated whenever the contents of the supplied directory change (such as setting it to the current git commit short-hash). Most users will likely want to use the auto-generated names anyway.

Of note, is that we can determine whether or not a new template version will be created duringterraform plan.

Duringplan, we only compare against the last known versions to handle the case where a user reverts the template to one used multipleapplys prior (such when as undoing a change).
If we stored all the hashes of all previous versions, undoing a change like this would not create a new template version in the list, and would instead be a no-op, or only update the name of an older version, which is likely confusing behaviour.

@ethanndicksonGraphite App
Copy link
MemberAuthor

ethanndickson commentedAug 1, 2024
edited
Loading

@ethanndicksonethanndicksonforce-pushed the08-01-fix_template_version_replacement_metadata_updates branch fromb194be2 to6f8b09fCompareAugust 1, 2024 10:59
@ethanndicksonethanndickson marked this pull request as ready for reviewAugust 1, 2024 10:59
@ethanndicksonethanndicksonforce-pushed the08-01-fix_template_version_replacement_metadata_updates branch from6f8b09f toef6b800CompareAugust 1, 2024 11:08
@ethanndicksonethanndickson self-assigned thisAug 1, 2024
@ethanndicksonethanndicksonforce-pushed the07-30-feat_add_all_settings_for_template_resources branch from5c29d3c tobf81000CompareAugust 1, 2024 11:30
@ethanndicksonethanndicksonforce-pushed the08-01-fix_template_version_replacement_metadata_updates branch fromef6b800 toffd33bbCompareAugust 1, 2024 11:30
@ethanndicksonethanndicksonforce-pushed the08-01-fix_template_version_replacement_metadata_updates branch 2 times, most recently fromef8d298 toe54b6f5CompareAugust 1, 2024 14:21
@ethanndicksonethanndicksonforce-pushed the07-30-feat_add_all_settings_for_template_resources branch frombf81000 toc0950ecCompareAugust 2, 2024 03:03
@ethanndicksonethanndicksonforce-pushed the08-01-fix_template_version_replacement_metadata_updates branch 5 times, most recently fromed761c2 to1a54748CompareAugust 2, 2024 13:25
@ethanndicksonethanndicksonforce-pushed the08-01-fix_template_version_replacement_metadata_updates branch from1a54748 tod930a29CompareAugust 6, 2024 03:45
@ethanndicksonethanndickson changed the base branch from07-30-feat_add_all_settings_for_template_resources tomainAugust 6, 2024 03:45
@ethanndicksonethanndicksonforce-pushed the08-01-fix_template_version_replacement_metadata_updates branch fromd930a29 toef38461CompareAugust 6, 2024 05:46
@ethanndicksonethanndicksonforce-pushed the08-01-fix_template_version_replacement_metadata_updates branch fromef38461 tob02f6a8CompareAugust 6, 2024 13:59
Copy link

@spikecurtisspikecurtis left a comment

Choose a reason for hiding this comment

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

LGTM!

ethanndickson reacted with hooray emoji
@ethanndicksonethanndicksonforce-pushed the08-01-fix_template_version_replacement_metadata_updates branch fromb02f6a8 toeaab432CompareAugust 7, 2024 05:54
@ethanndicksonethanndicksonforce-pushed the08-01-fix_template_version_replacement_metadata_updates branch fromeaab432 tocd6a681CompareAugust 7, 2024 05:56
@ethanndicksonGraphite App
Copy link
MemberAuthor

ethanndickson commentedAug 7, 2024
edited
Loading

Merge activity

@ethanndicksonethanndickson merged commit5c965e8 intomainAug 7, 2024
@ethanndicksonethanndickson deleted the 08-01-fix_template_version_replacement_metadata_updates branchAugust 7, 2024 06:00
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@spikecurtisspikecurtisspikecurtis approved these changes

@deansheatherdeansheatherAwaiting requested review from deansheather

Assignees

@ethanndicksonethanndickson

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@ethanndickson@spikecurtis@deansheather

[8]ページ先頭

©2009-2025 Movatter.jp