Terraform Plan Widget, Backend Error Messages
What does this MR do?
We have a MR Widget that displays a Terraform Report.
When the report fails, the Widget displays a flash message with a generic error.
We are in the process of adding better errors messages to this Widget. See issue: #219394 (closed)
There is also a semi-related epic about how GitLab should send better error messages to customers.
The MR will:
- Update the backend so it no longer raises a generic error message. It will instead add a custom
tf_report_error
to the JSON block. In a follow-up MR, the frontend will use thetf_report_error
field to display different content to the customer. - Attempts to always add the
job_path
,job_name
, andjob_id
. Even if there is a JSON error, we can still attempt to display theView full log
button. In follow-up MRs, we can use thejob_name
andjob_id
to display better error messages. - Updates associated tests
Screenshots
Current:
Updated with log button:
Disclaimer: The design on the frontend is also being updated: !34392 (merged). I will try to update the screenshots when the frontend MR is merged. The screenshots may be outdated at the point this reviewed.
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team