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

helper/resource: Clarify configuration step error messages #238

Merged
merged 3 commits into from
Dec 7, 2023

Conversation

bflad
Copy link
Contributor

@bflad bflad commented Dec 5, 2023

When using TestStep.PlanOnly, the error messaging errantly mentions:

After applying this test step, the plan was not empty.

Which is inaccurate and confusing for debugging. This also adjusts error messages to include refresh vs non-refresh wording consistently. The error messages have no compatibility promises and it would be considered an errant provider developer implementation to rely on them, rather than properly fixing the test assertions (such as using TestStep.ExpectNonEmptyPlan instead of TestCase.ErrorCheck or TestStep.ExpectError against the error messaging without compatibility promises).

When using `TestStep.PlanOnly`, the error messaging errantly mentions:

```
After applying this test step, the plan was not empty.
```

Which is inaccurate and confusing for debugging. This also adjusts error messages to include refresh vs non-refresh wording. The error messages have no compatibility promises and it would be considered an errant provider developer implementation to rely on them, rather than properly fixing the test assertions (such as using `TestStep.ExpectNonEmptyPlan` instead of `TestCase.ErrorCheck` or `TestStep.ExpectError` with the error messaging without compatibility promises).
@bflad bflad added the bug Something isn't working label Dec 5, 2023
@bflad bflad requested a review from a team as a code owner December 5, 2023 19:24
Copy link
Contributor

@bendbennett bendbennett left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

Wondering whether we might want to consider modifying the documentation to illustrate which specific terraform commands are being run when config, import, or refresh modes are being used?

@bflad
Copy link
Contributor Author

bflad commented Dec 7, 2023

Looks like you already created #240 so we can discuss that proposal over there.

@bflad bflad added this to the v1.7.0 milestone Dec 7, 2023
@bflad bflad merged commit 20d9c65 into main Dec 7, 2023
26 checks passed
@bflad bflad deleted the bflad/clarify-config-step-error-messaging branch December 7, 2023 14:20
bflad added a commit that referenced this pull request Dec 7, 2023
…tError

Reference: #238

This is a quick followup recent clarification changes in error messages to better mention intended use and message compatibility with `TestCase.ErrorCheck` and `TestStep.ExpectError`.
bflad added a commit that referenced this pull request Dec 7, 2023
…tError (#242)

Reference: #238

This is a quick followup recent clarification changes in error messages to better mention intended use and message compatibility with `TestCase.ErrorCheck` and `TestStep.ExpectError`.
Copy link

github-actions bot commented Jan 7, 2024

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants