Skip to content
Snippets Groups Projects

Use more suitable completion prompt

Merged Mark Lapierre requested to merge ml-change-cs-e2e-test-prompt into master
All threads resolved!

What does this MR do and why?

This prompt is more likely to produce a valid response since it is more typical code.

Fixes #424293 (closed)

Test results

Run from my machine against gitlab.com

I cut most of the log messages so it just shows the test ran successfully

bundle exec bin/qa Test::Instance::All https://gitlab.com qa/specs/features/ee/api/14_model_ops/code_suggestions_spec.rb
      ==> Base URL: https://gitlab.com

ModelOps
  Code Suggestions
    on the GitLab API with PAT auth
      returns a suggestion

Finished in 0.98961 seconds (files took 3.83 seconds to load)
1 example, 0 failures
Run from my machine against staging.gitlab.com

I cut most of the log messages so it just shows the test ran successfully

bundle exec bin/qa Test::Instance::All https://staging.gitlab.com qa/specs/features/ee/api/14_model_ops/code_suggestions_spec.rb
      ==> Base URL: https://staging.gitlab.com

ModelOps
  Code Suggestions
    on the GitLab API with PAT auth
      returns a suggestion

Finished in 2.47 seconds (files took 2.64 seconds to load)
1 example, 0 failures 

How to set up and validate locally

You can run the tests against staging.gitlab.com using the gitlab-qa user as the tests do, or by using your own user. If you use gitlab-qa you can skip below to running the tests, otherwise enable the Code Suggestions user preference (see https://docs.gitlab.com/ee/user/project/repository/code_suggestions.html#enable-code-suggestions-for-an-individual-user)

To run the tests, from the qa directory:

export GITLAB_USERNAME=gitlab-qa # or your own username if you have Code Suggestions enabled in your preferences and via the feature flag
export GITLAB_QA_ACCESS_TOKEN=<from 1Password> # or your own access token
export GITLAB_QA_USER_AGENT=<from 1Password>
bundle install
bundle exec bin/qa Test::Instance::All https://staging.gitlab.com qa/specs/features/ee/api/14_model_ops/code_suggestions_spec.rb

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Mark Lapierre

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Author Maintainer

    @ddavison Could you please review this fix? :pray: Straight to maintainer because it's a small change that doesn't change the actual code.

  • Mark Lapierre requested review from @ddavison

    requested review from @ddavison

  • mentioned in issue #408726 (closed)

  • mentioned in issue #424979 (closed)

  • Andrejs Cunskis approved this merge request

    approved this merge request

  • Andrejs Cunskis resolved all threads

    resolved all threads

  • Andrejs Cunskis enabled an automatic merge when the pipeline for 55a318f2 succeeds

    enabled an automatic merge when the pipeline for 55a318f2 succeeds

  • Andrejs Cunskis mentioned in commit 2137bcc9

    mentioned in commit 2137bcc9

  • added workflowstaging label and removed workflowcanary label

  • Mark Lapierre mentioned in merge request !136273 (merged)

    mentioned in merge request !136273 (merged)

  • Mark Lapierre mentioned in merge request !136644 (merged)

    mentioned in merge request !136644 (merged)

  • Mark Lapierre mentioned in merge request !138004 (merged)

    mentioned in merge request !138004 (merged)

  • Please register or sign in to reply
    Loading