Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix: don't attempt to insert empty terraform plans into the database #17426

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

Merged
merged 1 commit into from
Apr 16, 2025

Conversation

aslilac
Copy link
Member

@aslilac aslilac commented Apr 16, 2025

if you're using an external provisioner that doesn't provide plan information, we should just skip the insert rather than fail.

@aslilac aslilac requested a review from Emyrk April 16, 2025 15:17
@Emyrk
Copy link
Member

Emyrk commented Apr 16, 2025

If we do not insert it, does that fail a lookup query later?

Meaning, can we omit that insert? That is safe?

@aslilac
Copy link
Member Author

aslilac commented Apr 16, 2025

@Emyrk we already have to operate under the assumption that this might be missing to support template versions that were built before we added this feature, so we check for sql.ErrNoRows and ignore it, defaulting to {}.

@aslilac aslilac merged commit 2a76f50 into main Apr 16, 2025
36 checks passed
@aslilac aslilac deleted the lilac/skip-empty-plan branch April 16, 2025 16:14
@github-actions github-actions bot locked and limited conversation to collaborators Apr 16, 2025
@matifali
Copy link
Member

/cherry-pick release/2.21

@matifali
Copy link
Member

/cherry-pick release/2.20

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants