Fix poetry not found issue in mise in Duo Workflow service
Fix poetry not found issue in mise when setting up Duo Workflow service.
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 duo-workflow-service/poetry-install
--------------------------------------------------------------------------------
Installing mise tools from /Users/tanle/code/gitlab/gdk/duo-workflow-service/.tool-versions
--------------------------------------------------------------------------------
cd /Users/tanle/code/gitlab/gdk/duo-workflow-service && mise install -y
mise all runtimes are installed
--------------------------------------------------------------------------------
Building duo-workflow-service/poetry-install version main
--------------------------------------------------------------------------------
support/asdf-exec duo-workflow-service poetry install
support/asdf-exec: line 23: poetry: command not found
make: *** [support/makefiles/Makefile.duo-workflow-service.mk:68: duo-workflow-service/poetry-install] Error 127
How to set up and validate locally
- Ensure GitLab Duo Workflow service is enabled by adding the below configuration in
gdk.yml
:--- duo_workflow: 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 duo-workflow-service/poetry-install -------------------------------------------------------------------------------- Installing mise tools from /Users/tanle/code/gitlab/gdk/duo-workflow-service/.tool-versions -------------------------------------------------------------------------------- cd /Users/tanle/code/gitlab/gdk/duo-workflow-service && mise install -y mise all runtimes are installed -------------------------------------------------------------------------------- Building duo-workflow-service/poetry-install version main -------------------------------------------------------------------------------- support/asdf-exec duo-workflow-service mise exec -- poetry install Creating virtualenv duo-workflow-service in /Users/tanle/code/gitlab/gdk/duo-workflow-service/.venv Installing dependencies from lock file Package operations: 103 installs, 1 update, 0 removals --snip--
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