'/tests' in Duo Chat does not complete the output on C file
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Summary
When using the /tests
prompt in Duo Chat to generate tests for a highlighted C code the output starts but stops before it finishes.
Steps to reproduce
- open the attached C project in VSCode
- open the file
main.c
in the IDE and select the content (CTRL/CMD+A) - in Duo Chat execute the
/tests
command - alternatively, right-click on the selected code > GitLab Duo Chat > Generate tests
- watch the output where the test code is generated
Example Project
This can be reproduced in VSCode as well as the Web IDE using the above steps using the following project
What is the current bug behavior?
The output stops before the test code is complete.
What is the expected correct behavior?
Tests should be generated completely
Relevant logs and/or screenshots
Additional details including a recording can be seen in this issue (internal)
Output of checks
This can be reproduced against gitlab.com (18.4) but also older versions for example in the customer's case against a 17.11.7 self-managed instance.
VSCode version: 1.104.2
Duo Workflow extension version: 6.49.2
Results of GitLab environment info
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of: `sudo gitlab-rake gitlab:env:info`) (For installations from source run and paste the output of: `sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true
)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true
)(we will only investigate if the tests are passing)
Possible fixes
Using a prompt like
generate tests for main.c
Works correctly and generates the complete tests code.
Patch release information for backports
If the bug fix needs to be backported in a patch release to a version under the maintenance policy, please follow the steps on the patch release runbook for GitLab engineers.
Refer to the internal "Release Information" dashboard for information about the next patch release, including the targeted versions, expected release date, and current status.
High-severity bug remediation
To remediate high-severity issues requiring an internal release for single-tenant SaaS instances, refer to the internal release process for engineers.