Add more extensive logging guarded by feature flag
What does this MR do and why?
Add logging every log of LLM cycle. It is guarded by the feature flag scoped to user.
Some explanation:
I was thinking of overriding debug
method in Llm::Logger
class and adding the condition there. I decided against it as it would made the logic a bit hidden and making it less readable.
In the course of the review, I created info_or_debug
method that encapsulates the feature flag logic.
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.
- In rails console enable the experiment fully
Feature.enable(:expanded_ai_loggging)
- Ask some question in chat.
- check if entries in
llm.log
are logged on info level. - Switch feature flag off, ask question again and compare
llm.log
file content.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Merge request reports
Activity
changed milestone to %16.7
added groupai framework typemaintenance labels
assigned to @mksionek
added devopsai-powered sectiondata-science labels
- A deleted user
added backend feature flag labels
- Resolved by Gosia Ksionek
2 Warnings 44020675: 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. 85740886: 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. 1 Message CHANGELOG missing: If this merge request needs a changelog entry, add the
Changelog
trailer to the commit message you want to add to the changelog.If this merge request doesn't need a CHANGELOG entry, feel free to ignore this message.
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 @thutterer
(UTC+1, same timezone as author)
@jarka
(UTC+1, same timezone as author)
Please check reviewer's status!
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
danger-review
job that generated this comment.Generated by
Dangermentioned in commit gitlab-org-sandbox/gitlab-jh-validation@5b2a349a
mentioned in commit gitlab-org-sandbox/gitlab-jh-validation@2c52ac3c
Allure report
allure-report-publisher
generated test report!e2e-test-on-gdk:
test report for bea7983eexpand test summary
+-----------------------------------------------------------------------+ | suites summary | +------------------+--------+--------+---------+-------+-------+--------+ | | passed | failed | skipped | flaky | total | result | +------------------+--------+--------+---------+-------+-------+--------+ | Monitor | 8 | 0 | 0 | 0 | 8 | ✅ | | Create | 50 | 0 | 7 | 0 | 57 | ✅ | | Plan | 55 | 0 | 0 | 0 | 55 | ✅ | | Verify | 31 | 0 | 0 | 0 | 31 | ✅ | | Govern | 57 | 0 | 0 | 0 | 57 | ✅ | | Data Stores | 23 | 0 | 0 | 0 | 23 | ✅ | | Package | 0 | 0 | 1 | 0 | 1 | ➖ | | Framework sanity | 0 | 0 | 1 | 0 | 1 | ➖ | | Manage | 0 | 0 | 1 | 0 | 1 | ➖ | +------------------+--------+--------+---------+-------+-------+--------+ | Total | 224 | 0 | 10 | 0 | 234 | ✅ | +------------------+--------+--------+---------+-------+-------+--------+
e2e-package-and-test:
test report for bea7983eexpand test summary
+------------------------------------------------------------+ | suites summary | +-------+--------+--------+---------+-------+-------+--------+ | | passed | failed | skipped | flaky | total | result | +-------+--------+--------+---------+-------+-------+--------+ +-------+--------+--------+---------+-------+-------+--------+ | Total | 0 | 0 | 0 | 0 | 0 | ➖ | +-------+--------+--------+---------+-------+-------+--------+
@nicolasdular would you review please?
requested review from @nicolasdular
- Resolved by Jan Provaznik
@nicolasdular
, thanks for approving this merge request.This is the first time the merge request has been approved. To ensure we don't only run predictive pipelines, and we don't break
master
, a new pipeline will be started shortly.Please wait for the pipeline to start before resolving this discussion and set auto-merge for the new pipeline. See merging a merge request for more details.
added pipeline:mr-approved label
mentioned in commit gitlab-org-sandbox/gitlab-jh-validation@bfa1d756
@jprovaznik would you mind performing maintainer review?
requested review from @jprovaznik
- Resolved by Jan Provaznik
I was thinking of overriding debug method in Llm::Logger class and adding the condition there. I decided against it as it would made the logic a bit hidden and making it less readable.
@mksionek I was thinking that we could rather define temporarily
Llm::Logger.info_or_debug
method, so it would be still quite clear and we would avoid all if-clauses.But because this MR is already prepared and it's expected to be present for a short period of time, I think it's acceptable to keep it as is.
removed review request for @jprovaznik
added 2 commits
mentioned in commit gitlab-org-sandbox/gitlab-jh-validation@856f990a
mentioned in commit gitlab-org-sandbox/gitlab-jh-validation@18379d5a
requested review from @jprovaznik
Thanks @mksionek, LGTM
, MWPS setenabled an automatic merge when the pipeline for cf2cb754 succeeds
mentioned in commit gitlab-org-sandbox/gitlab-jh-validation@cf2cb754
mentioned in commit ff95c9c2
added workflowstaging-canary label
@mksionek This merge request was deployed to the workflowstaging-canary environment. You may want to enable the associated feature flag on this environment with/chatops run feature set expanded_ai_logging true --staging
.This message was generated automatically. You're welcome to improve it.
@mksionek This merge request was deployed to the workflowcanary environment. You may want to enable the associated feature flag on this environment with/chatops run feature set expanded_ai_logging true --production
.This message was generated automatically. You're welcome to improve it.
@mksionek This merge request was deployed to the workflowstaging environment. You may want to enable the associated feature flag on this environment with/chatops run feature set expanded_ai_logging true --staging
.This message was generated automatically. You're welcome to improve it.
@mksionek This merge request was deployed to the workflowproduction environment. You may want to enable the associated feature flag on this environment with/chatops run feature set expanded_ai_logging true --production
.This message was generated automatically. You're welcome to improve it.
added workflowcanary label and removed workflowstaging-canary label
added workflowstaging label and removed workflowcanary label
added workflowproduction label and removed workflowstaging label
added workflowpost-deploy-db-staging label and removed workflowproduction label
added workflowpost-deploy-db-production label and removed workflowpost-deploy-db-staging label
mentioned in issue mksionek/mksionek#33
added releasedcandidate label
mentioned in merge request gitlab-org/modelops/applied-ml/code-suggestions/ai-assist!503 (closed)
mentioned in issue gitlab-org/quality/triage-reports#16503 (closed)
mentioned in issue gitlab-org/quality/triage-reports#17035 (closed)
mentioned in issue #433001 (closed)
mentioned in issue gitlab-org/quality/triage-reports#17483 (closed)
mentioned in issue gitlab-org/quality/triage-reports#17948 (closed)
mentioned in merge request !155146 (closed)
mentioned in issue gitlab-org/quality/triage-reports#18481 (closed)
mentioned in issue gitlab-org/quality/triage-reports#18962 (closed)
mentioned in issue gitlab-org/quality/triage-reports#19412 (closed)
mentioned in merge request gitlab-org/modelops/applied-ml/code-suggestions/ai-assist!1471 (merged)
mentioned in issue gitlab-org/quality/triage-reports#20590 (closed)
mentioned in issue gitlab-org/quality/triage-reports#20952 (closed)
mentioned in issue gitlab-org/quality/triage-reports#21565 (closed)
mentioned in issue gitlab-org/quality/triage-reports#22058 (closed)