You need to sign in or sign up before continuing.
Fix poetry not found issue in mise in AI Gateway setup
What does this merge request do and why?
Fix poetry not found issue in mise
. Running cd
in non-interactive mode doesn't call the required mise
shell hooks. This results in poetry
command which is managed by mise
to fail.
$ make gitlab-ai-gateway-update
--snip--
--------------------------------------------------------------------------------
Performing poetry steps for /Users/tanle/code/gitlab/gdk/gitlab-ai-gateway
--------------------------------------------------------------------------------
# Set Python version for poetry to fix Python upgrades.
cd /Users/tanle/code/gitlab/gdk/gitlab-ai-gateway && egrep '^python ' .tool-versions | awk '{ print $2 }' | xargs -L 1 poetry env use
egrep: warning: egrep is obsolescent; using ggrep -E
xargs: poetry: No such file or directory
make[1]: *** [support/makefiles/Makefile.gitlab-ai-gateway.mk:28: gitlab-ai-gateway-poetry-install] Error 127
How to set up and validate locally
- Ensure GitLab AI Gateway is enabled by adding the below configuration in
gdk.yml
:--- gitlab_ai_gateway: enabled: true mise: enabled: true
- Check out to this merge request's branch.
- Run
gdk reconfigure
to check if regenerating all configuration is successful. - Run the following command to update
gitlab-ai-gateway
and confirm the error no longer shows.$ make gitlab-ai-gateway-update --snip-- -------------------------------------------------------------------------------- Performing poetry steps for /Users/tanle/code/gitlab/gdk/gitlab-ai-gateway -------------------------------------------------------------------------------- # Set Python version for poetry to fix Python upgrades. cd /Users/tanle/code/gitlab/gdk/gitlab-ai-gateway && egrep '^python ' .tool-versions | awk '{ print $2 }' | xargs -L 1 mise exec -- poetry env use egrep: warning: egrep is obsolescent; using ggrep -E Using virtualenv: /Users/tanle/code/gitlab/gdk/gitlab-ai-gateway/.venv cd /Users/tanle/code/gitlab/gdk/gitlab-ai-gateway && mise exec -- poetry install Installing dependencies from lock file No dependencies to install or update Installing the current project: ai_gateway (0.1.0)
Impacted categories
The following categories relate to this merge request:
-
gdk-reliability - e.g. When a GDK action fails to complete. -
gdk-usability - e.g. Improvements or suggestions around how the GDK functions. -
gdk-performance - e.g. When a GDK action is slow or times out.
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 theCHANGELOG.md
.
Edited by Tan Le