Skip to content

Failure in ee/api/3_create/code_suggestions_spec.rb | ModelOps Code Suggestions on the GitLab API with PAT auth returns a suggestion

Test metadata (don't modify)

Field Value
File qa/qa/specs/features/ee/api/14_model_ops/code_suggestions_spec.rb#L40
Description ModelOps Code Suggestions on the GitLab API with PAT auth returns a suggestion
Test level
Hash 6d6e335edb9f2d6e74d6cf84b9398a62e689f254867bf0ad6fc4cd1bc8cdcdf0
Duration 1.76 seconds
Expected duration < 240 seconds
Test case https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/420973

Stack trace

Failure/Error: expect(response.code).to be(200), "Request returned (#{response.code}): `#{response}`"
  Request returned (401): `{"message":"401 Unauthorized"}`

Reports (11)

  1. 2023-11-09: https://ops.gitlab.net/gitlab-org/quality/staging/-/jobs/11835202 (https://ops.gitlab.net/gitlab-org/quality/staging/-/pipelines/2504511)
  2. 2023-11-09: https://ops.gitlab.net/gitlab-org/quality/canary/-/jobs/11835456 (https://ops.gitlab.net/gitlab-org/quality/canary/-/pipelines/2504569)
  3. 2023-11-09: https://ops.gitlab.net/gitlab-org/quality/canary/-/jobs/11835694 (https://ops.gitlab.net/gitlab-org/quality/canary/-/pipelines/2504569)
  4. 2023-11-09: https://ops.gitlab.net/gitlab-org/quality/canary/-/jobs/11835726 (https://ops.gitlab.net/gitlab-org/quality/canary/-/pipelines/2504569)
  5. 2023-11-09: https://ops.gitlab.net/gitlab-org/quality/canary/-/jobs/11836898 (https://ops.gitlab.net/gitlab-org/quality/canary/-/pipelines/2504569)
  6. 2023-11-09: https://ops.gitlab.net/gitlab-org/quality/staging/-/jobs/11838077 (https://ops.gitlab.net/gitlab-org/quality/staging/-/pipelines/2505198)
  7. 2023-11-09: https://ops.gitlab.net/gitlab-org/quality/canary/-/jobs/11838511 (https://ops.gitlab.net/gitlab-org/quality/canary/-/pipelines/2504569)
  8. 2023-11-09: https://ops.gitlab.net/gitlab-org/quality/staging-canary/-/jobs/11838519 (https://ops.gitlab.net/gitlab-org/quality/staging-canary/-/pipelines/2505197)
  9. 2023-11-09: https://ops.gitlab.net/gitlab-org/quality/staging/-/jobs/11838594 (https://ops.gitlab.net/gitlab-org/quality/staging/-/pipelines/2505350)
  10. 2023-11-09: https://ops.gitlab.net/gitlab-org/quality/staging/-/jobs/11839027 (https://ops.gitlab.net/gitlab-org/quality/staging/-/pipelines/2505510)

Timeline

Data

  1. 2023-11-21: https://ops.gitlab.net/gitlab-org/quality/staging-canary/-/jobs/11982618 (https://ops.gitlab.net/gitlab-org/quality/staging-canary/-/pipelines/2551750)

Investigation summary

  • Rails rejected authentication without sending the request to the AI-gateway.
  • The API token has the api scope and hasn't changed.
  • No changes were made to the user profile or group settings.
  • The test was running successfully until I added it to the smoke test suite. No change was made to the test itself, or the pipelines that run the test.
  • There was a Ruby 3.1 test rollout around the time of the failures, but the tests passed many times in subsequent Ruby 3.1 test rollouts.
  • The test passed several hundreds of times when run every 30 minutes the same CI conditions that failed before (in staging, staging-canary, canary, and production pipelines).

I think it's reasonable to add the tests back to the smoke suite, given the inconclusive investigation above and the many successful executions since the failures.

Plus, fast quarantine works in those pipelines now so we can more easily unblock them if needed.

Edited by Mark Lapierre