Skip to content
Snippets Groups Projects

Pass down resource_id for AI features

Merged Nicolas Dular requested to merge nd/chat-resource-id into master

What does this MR do and why?

Pass down resource_id for AI features

To get more knowledge about the current resource the chat is acting on, we inject the resource_id from the backend. For now we only pass it down for issues issues and will extend the resource types later.

Screenshots or screen recordings

Screenshot_2023-06-14_at_13.55.03

Screenshot_2023-06-14_at_13.56.32

How to set up and validate locally

  1. Set up AI features locally https://docs.gitlab.com/ee/development/ai_features.html#test-ai-features-locally
  2. Enable Feature.enable(:gitlab_duo)
  3. Go to a any page that is not an issue -> the resource_id will fallback to user_id
  4. Go to an issue page -> the resource_id will be the global ID from the issue
  5. You can either verify by checking the aiSubscriptionResponse in the Network -> WS (Websockets) tab, or when performing a chat request with something like "Summarize this issue" and check the GraphQL mutation for the resourceId

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 Nicolas Dular

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
  • A deleted user added backend frontend labels

    added backend frontend labels

  • Contributor
    1 Warning
    :warning: d80d3afc: Commits that change 30 or more lines across at least 3 files should describe these changes in the commit body. For more information, take a look at our Commit message guidelines.

    Reviewer roulette

    Changes that require review have been detected!

    Please refer to the table below for assigning reviewers and maintainers suggested by Danger in the specified category:

    Category Reviewer Maintainer
    backend Hinam Mehra current availability (@hmehra) (UTC+10, 8 hours ahead of @nicolasdular) Jarka Košanová current availability (@jarka) (UTC+2, same timezone as @nicolasdular)
    frontend Deepika Guliani current availability (@deepika.guliani) (UTC+5.5, 3.5 hours ahead of @nicolasdular) Paul Slaughter current availability (@pslaughter) (UTC-5, 7 hours behind @nicolasdular)

    To spread load more evenly across eligible reviewers, Danger has picked a candidate for each review slot, based on their timezone. Feel free to override these selections if you think someone else would be better-suited or use the GitLab Review Workload Dashboard to find other available reviewers.

    To read more on how to use the reviewer roulette, please take a look at the Engineering workflow and code review guidelines. Please consider assigning a reviewer or maintainer who is a domain expert in the area of the merge request.

    Once you've decided who will review this merge request, assign them as a reviewer! Danger does not automatically notify them for you.

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

    Generated by :no_entry_sign: Danger

  • Contributor

    Bundle size analysis [beta]

    This compares changes in bundle size for entry points between the commits d54231c3 and 3ef6ee1b

    :sparkles: Special assets

    Entrypoint / Name Size before Size after Diff Diff in percent
    average 4.12 MB 4.12 MB - 0.0 %
    mainChunk 3 MB 3 MB - 0.0 %

    Note: We do not have exact data for d54231c3. So we have used data from: e5b5d55a.
    The intended commit has no webpack pipeline, so we chose the last commit with one before it.

    Please look at the full report for more details


    Read more about how this report works.

    Generated by :no_entry_sign: Danger

  • Nicolas Dular added 1 commit

    added 1 commit

    • e9b0c7c8 - Pass down resource_id for AI features

    Compare with previous version

  • Nicolas Dular added 237 commits

    added 237 commits

    Compare with previous version

  • Contributor

    Allure report

    allure-report-publisher generated test report!

    e2e-test-on-gdk: :exclamation: test report for 3ef6ee1b

    expand test summary
    +-----------------------------------------------------------------------+
    |                            suites summary                             |
    +------------------+--------+--------+---------+-------+-------+--------+
    |                  | passed | failed | skipped | flaky | total | result |
    +------------------+--------+--------+---------+-------+-------+--------+
    | Create           | 8      | 0      | 1       | 0     | 9     | ✅     |
    | Framework sanity | 0      | 0      | 1       | 0     | 1     | ➖     |
    | Monitor          | 4      | 0      | 0       | 0     | 4     | ✅     |
    | Govern           | 2      | 0      | 0       | 0     | 2     | ✅     |
    | Plan             | 4      | 0      | 0       | 0     | 4     | ✅     |
    | Data Stores      | 2      | 0      | 0       | 1     | 2     | ❗     |
    | Manage           | 1      | 0      | 0       | 0     | 1     | ✅     |
    +------------------+--------+--------+---------+-------+-------+--------+
    | Total            | 21     | 0      | 2       | 1     | 23    | ❗     |
    +------------------+--------+--------+---------+-------+-------+--------+

    e2e-review-qa: :exclamation: test report for 3ef6ee1b

    expand test summary
    +-----------------------------------------------------------------------+
    |                            suites summary                             |
    +------------------+--------+--------+---------+-------+-------+--------+
    |                  | passed | failed | skipped | flaky | total | result |
    +------------------+--------+--------+---------+-------+-------+--------+
    | Manage           | 1      | 0      | 0       | 0     | 1     | ✅     |
    | Create           | 8      | 0      | 1       | 0     | 9     | ✅     |
    | Framework sanity | 0      | 0      | 1       | 0     | 1     | ➖     |
    | Data Stores      | 2      | 0      | 0       | 1     | 2     | ❗     |
    | Monitor          | 4      | 0      | 0       | 0     | 4     | ✅     |
    | Plan             | 3      | 0      | 1       | 0     | 4     | ✅     |
    | Govern           | 2      | 0      | 0       | 0     | 2     | ✅     |
    +------------------+--------+--------+---------+-------+-------+--------+
    | Total            | 20     | 0      | 3       | 1     | 23    | ❗     |
    +------------------+--------+--------+---------+-------+-------+--------+
  • Nicolas Dular changed the description

    changed the description

  • Author Maintainer

    Hey @mksionek, Do you mind performing a backend review for this merge request, please? :) Thanks!

  • Nicolas Dular requested review from @mksionek

    requested review from @mksionek

  • requested review from @eduardosanz

  • Eduardo Sanz García approved this merge request

    approved this merge request

  • Frontend looks good! Approving!

  • Eduardo Sanz García removed review request for @eduardosanz

    removed review request for @eduardosanz

  • :wave: @eduardosanz, thanks for approving this merge request.

    This is the first time the merge request is approved. To ensure full test coverage, a new pipeline will be started shortly.

    For more info, please refer to the following links:

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading