Skip to content
Snippets Groups Projects

Use primary DB when authenticating via job token in jobs API

Merged Tiger Watson requested to merge 512524-use-primary-for-jobs-api-auth into master
All threads resolved!

What does this MR do and why?

Use primary DB when authenticating via job token in jobs API

Previously these endpoints used a replica database when authenticating, which is problematic when using a job token as a new job record may not exist yet on the replica, causing a 401 error.

To solve this, the primary database will now always be used when authenticating for these endpoints.

See #512524 (closed).

Changelog: fixed

References

Please include cross links to any resources that are relevant to this MR. This will give reviewers and future readers helpful context to give an efficient review of the changes introduced.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

Related to #512524 (closed)

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
  • Reviewer roulette

    Category Reviewer Maintainer
    backend @Saahmed profile link current availability (UTC-5, 18 hours behind author) @stanhu profile link current availability (UTC-8, 21 hours behind author)
    devopsverify Reviewer review is optional for devopsverify @iamricecake profile link current availability (UTC+8, 5 hours behind author)

    Please refer to documentation page for guidance on how you can benefit from the Reviewer Roulette, or use the GitLab Review Workload Dashboard to find other available reviewers.

    If needed, you can retry the :repeat: danger-review job that generated this comment.

    Generated by :no_entry_sign: Danger

    Edited by ****
  • Tiger Watson
  • Tiger Watson
  • Tiger Watson added 1 commit

    added 1 commit

    • a44dfb88 - Apply 1 suggestion(s) to 1 file(s)

    Compare with previous version

  • Tiger Watson added 241 commits

    added 241 commits

    Compare with previous version

  • Tiger Watson changed milestone to %17.9

    changed milestone to %17.9

  • Tiger Watson requested review from @timofurrer

    requested review from @timofurrer

  • Timo Furrer marked this merge request as ready

    marked this merge request as ready

  • Timo Furrer approved this merge request

    approved this merge request

  • Timo Furrer requested review from @stanhu

    requested review from @stanhu

  • added pipelinetier-2 label and removed pipelinetier-1 label

  • Before you set this MR to auto-merge

    This merge request will progress on pipeline tiers until it reaches the last tier: pipelinetier-3. We will trigger a new pipeline for each transition to a higher tier.

    Before you set this MR to auto-merge, please check the following:

    • You are the last maintainer of this merge request
    • The latest pipeline for this merge request is pipelinetier-3 (You can find which tier it is in the pipeline name)
    • This pipeline is recent enough (created in the last 8 hours)

    If all the criteria above apply, please set auto-merge for this merge request.

    See pipeline tiers and merging a merge request for more details.

  • Stan Hu approved this merge request

    approved this merge request

  • Stan Hu resolved all threads

    resolved all threads

  • Stan Hu enabled automatic add to merge train when checks pass

    enabled automatic add to merge train when checks pass

  • E2E Test Result Summary

    allure-report-publisher generated test report!

    e2e-test-on-cng: :white_check_mark: test report for 61e5ce68

    expand test summary
    +------------------------------------------------------------------+
    |                          suites summary                          |
    +-------------+--------+--------+---------+-------+-------+--------+
    |             | passed | failed | skipped | flaky | total | result |
    +-------------+--------+--------+---------+-------+-------+--------+
    | Create      | 143    | 0      | 19      | 0     | 162   | ✅     |
    | Govern      | 84     | 0      | 10      | 0     | 94    | ✅     |
    | Plan        | 86     | 0      | 8       | 0     | 94    | ✅     |
    | Package     | 30     | 0      | 14      | 0     | 44    | ✅     |
    | Monitor     | 8      | 0      | 12      | 0     | 20    | ✅     |
    | Manage      | 1      | 0      | 9       | 0     | 10    | ✅     |
    | Verify      | 51     | 0      | 19      | 0     | 70    | ✅     |
    | Fulfillment | 2      | 0      | 7       | 0     | 9     | ✅     |
    | Configure   | 0      | 0      | 3       | 0     | 3     | ➖     |
    | Data Stores | 33     | 0      | 10      | 0     | 43    | ✅     |
    | Analytics   | 2      | 0      | 0       | 0     | 2     | ✅     |
    | Secure      | 2      | 0      | 5       | 0     | 7     | ✅     |
    | Release     | 5      | 0      | 1       | 0     | 6     | ✅     |
    | Growth      | 0      | 0      | 2       | 0     | 2     | ➖     |
    | Ai-powered  | 0      | 0      | 2       | 0     | 2     | ➖     |
    | ModelOps    | 0      | 0      | 1       | 0     | 1     | ➖     |
    +-------------+--------+--------+---------+-------+-------+--------+
    | Total       | 447    | 0      | 122     | 0     | 569   | ✅     |
    +-------------+--------+--------+---------+-------+-------+--------+

    e2e-test-on-gdk: :white_check_mark: test report for 61e5ce68

    expand test summary
    +------------------------------------------------------------------+
    |                          suites summary                          |
    +-------------+--------+--------+---------+-------+-------+--------+
    |             | passed | failed | skipped | flaky | total | result |
    +-------------+--------+--------+---------+-------+-------+--------+
    | Create      | 276    | 0      | 40      | 0     | 316   | ✅     |
    | Monitor     | 16     | 0      | 24      | 0     | 40    | ✅     |
    | Plan        | 164    | 0      | 16      | 0     | 180   | ✅     |
    | Govern      | 158    | 0      | 26      | 0     | 184   | ✅     |
    | Configure   | 0      | 0      | 6       | 0     | 6     | ➖     |
    | Verify      | 100    | 0      | 40      | 2     | 140   | ✅     |
    | Data Stores | 66     | 0      | 20      | 0     | 86    | ✅     |
    | Fulfillment | 4      | 0      | 14      | 0     | 18    | ✅     |
    | Analytics   | 4      | 0      | 0       | 0     | 4     | ✅     |
    | Package     | 50     | 0      | 26      | 0     | 76    | ✅     |
    | Secure      | 8      | 0      | 6       | 0     | 14    | ✅     |
    | Ai-powered  | 0      | 0      | 4       | 0     | 4     | ➖     |
    | Manage      | 2      | 0      | 18      | 0     | 20    | ✅     |
    | Release     | 10     | 0      | 2       | 0     | 12    | ✅     |
    | ModelOps    | 0      | 0      | 2       | 0     | 2     | ➖     |
    | Growth      | 0      | 0      | 4       | 0     | 4     | ➖     |
    +-------------+--------+--------+---------+-------+-------+--------+
    | Total       | 858    | 0      | 248     | 2     | 1106  | ✅     |
    +-------------+--------+--------+---------+-------+-------+--------+
    Edited by ****
  • merged

  • Stan Hu mentioned in commit 10535431

    mentioned in commit 10535431

  • added workflowstaging label and removed workflowcanary label

  • Tiger Watson mentioned in merge request !181872

    mentioned in merge request !181872

  • Please register or sign in to reply
    Loading