Skip to content

Fix: resolve backtick error with `setup_ai_gateway` rake task

Nathan Weinshenker requested to merge 479895-fix-backtick into main

What does this merge request do and why?

A bug was introduced in the following GDK gitlab_ai_gateway setup_gateway rake task due to looking at a backtick command instead of a literal string. Here's the MR I'm referring to as well.

The issue is that the env_content won't match a backtick string instead of a literal string. The rake task wouldn't fail but would silently not add the required ENV_VARS to the env.runit file.

The following fix this to ensure that correct environment variables are saved to the env.runit file.

How to set up and validate locally

  1. Run the following rake setup_ai_gateway
  2. Make sure to comment out the following
  GDK::Output.puts 'Updating GDK...'
  GDK::Command::Update.new.run
  1. Ensure at the end of the process that the correct env.runit variables are added accordingly
Bad run of rake task Fix
Screenshot_2024-09-26_at_6.19.46_PM Screenshot_2024-09-26_at_6.50.14_PM

Impacted categories

The following categories relate to this merge request:

Merge request checklist

  • This change is backward compatible. If not, please include steps to communicate to our users.
  • Tests added for new functionality. If not, please raise an issue to follow-up.
  • Documentation added/updated, if needed.
  • Announcement added, if change is notable.
  • [] gdk doctor test added, if needed.
  • Add the ~highlight label if this MR should be included in the CHANGELOG.md.
Edited by Nathan Weinshenker

Merge request reports

Loading