Skip to content

Remove the liquid gem and use gsub instead

Reuben Pereira requested to merge 216618-remove-liquid into master

What does this MR do?

Since we're only using the Liquid gem (introduced in 12.7) to perform variable substitution in the Prometheus proxy API, we've decided to remove the Liquid gem and perform variable substitution using gsub instead.

Reasons for removing Liquid:

  1. Liquid has a lot of capabilities. This introduces added complexity to custom dashboards and to our codebase. We're not sure that we currently need the scripting capabilities provided by Liquid. By removing it, we have one less gem to support.
  2. We can remove support in 13.0 since it is a major release. We can always add Liquid back in any release, but removing it should only be done in a major release.
  3. We never officially announced that we would be supporting Liquid scripting. The announcement was only for the new variable interpolation syntax ({{}}). The interpolation syntax will remain the same. This MR only changes the method we use to substitute the variables with their values.
  4. Like any other gem, Liquid can also have security issues.

Issue: #216618 (closed)

Screenshots

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 🤖 GitLab Bot 🤖

Merge request reports