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

chore: persist template import terraform plan in postgres#17012

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

Merged
aslilac merged 22 commits intomainfromlilac/import-graph
Mar 24, 2025

Conversation

aslilac
Copy link
Member

@aslilacaslilac commentedMar 19, 2025
edited by Emyrk
Loading

Adds plumbing to persist terraform plan data from template import provisioner builds.


After some deliberation, I went with storing what I have called thecached_plan in a separate table because these values are incredibly large, thetemplate_versions table already has a lot of columns, and a lot of queries usetemplate_version.* to get those many columns. Accidentally including thecached_plan column in those queries would be very undesirable, and this value mostly exists for future use on the backend. I don't think this is the sort of thing we would ever actually want to send to a client, except maybe a page for debugging the current state.

This also means that we can track it'supdated_at time separately quite easily, since we're planning on letting it be "refreshed".

Closes#17050

Emyrk reacted with thumbs up emoji
@aslilacaslilac changed the titlechore: persist import terraform graph in postgreschore: persist template import terraform plan in postgresMar 20, 2025
@aslilacaslilac marked this pull request as ready for reviewMarch 20, 2025 21:34
@Emyrk
Copy link
Member

Emyrk commentedMar 21, 2025
edited
Loading

The purpose of this is not widely known, so just dropping a note.

The output ofterraform plan is going to be used to support dynamic parameters. Specifically, we are keeping the raw outputs (rather than preparsing) as an input to the new parameter engine.

The phasing in of this new feature is that it will live alongside the existing flow for some time. So this new table will bewrite-only for production instances until we get a bit further with the parameter engine experiment.

Copy link
Member

@EmyrkEmyrk left a comment
edited
Loading

Choose a reason for hiding this comment

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

This is all looking good. I am wondering if in the future we will need to implement a way to garbage collect up this data.

We might be able to do some trimming in the future, but keeping the raw plans gives us the most flexibility in the future.

EDIT: We store the original TF too, so versions are already bloated

@aslilacaslilac requested a review fromEmyrkMarch 21, 2025 18:57
@aslilacaslilac merged commit5b3eda6 intomainMar 24, 2025
35 checks passed
@aslilacaslilac deleted the lilac/import-graph branchMarch 24, 2025 16:01
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsMar 24, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@EmyrkEmyrkEmyrk approved these changes

Assignees

@aslilacaslilac

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Saveterraform plan output json to database for dynamic param use
2 participants
@aslilac@Emyrk

[8]ページ先頭

©2009-2025 Movatter.jp