Skip to content

Terraform Plan Widget, Backend Error Messages

Emily Ring requested to merge emilyring-tf-plan-errors into master

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.

See example MR

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 the tf_report_error field to display different content to the customer.
  • Attempts to always add the job_path, job_name, and job_id. Even if there is a JSON error, we can still attempt to display the View full log button. In follow-up MRs, we can use the job_name and job_id to display better error messages.
  • Updates associated tests

Screenshots

Current:

image

Updated with log button:

image

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

Availability and Testing

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
Edited by Emily Ring

Merge request reports