Cache `IntrospectionQuery` results"
What does this MR do and why?
Caches IntrospectionQuery results, since this is called rather often and takes a lot of time (often 5+ seconds, which triggers an 'error' in the error budget). Since the results are always the same for every deploy, we cache it, and reset the cache on restart
How to set up and validate locally
- Enable
cache_introspection_query
FF - go to http://gdk.test:3000/-/graphql-explorer
- run query multiple times, first time it should be slow, next times cached and very fast:
query IntrospectionQuery {
__schema {
queryType {
name
}
mutationType {
name
}
subscriptionType {
name
}
types {
...FullType
}
directives {
name
description
locations
args {
...InputValue
}
}
}
}
fragment FullType on __Type {
kind
name
description
fields(includeDeprecated: true) {
name
description
args {
...InputValue
}
type {
...TypeRef
}
isDeprecated
deprecationReason
}
inputFields {
...InputValue
}
interfaces {
...TypeRef
}
enumValues(includeDeprecated: true) {
name
description
isDeprecated
deprecationReason
}
possibleTypes {
...TypeRef
}
}
fragment InputValue on __InputValue {
name
description
type {
...TypeRef
}
defaultValue
}
fragment TypeRef on __Type {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
}
}
}
}
}
}
}
}
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.
Related to #409448 (closed)
Merge request reports
Activity
assigned to @rzwambag
- A deleted user
added backend label
1 Warning 447abcc4: 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 you want to create a changelog entry for GitLab FOSS, add the
Changelog
trailer to the commit message you want to add to the changelog.If you want to create a changelog entry for GitLab EE, also add the
EE: true
trailer to your commit message.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 Dmytro Biryukov (
@dbiryukov
) (UTC+2, same timezone as@rzwambag
)Kerri Miller (
@kerrizor
) (UTC-5, 7 hours behind@rzwambag
)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
danger-review
job that generated this comment.Generated by
Dangeradded 700 commits
-
4e5d9bf5...d4dcda2a - 699 commits from branch
master
- f7a4bc93 - Wrap introspection cache around graphql_controller.rb execute
-
4e5d9bf5...d4dcda2a - 699 commits from branch
- Resolved by Roy Zwambag
- Resolved by Roy Zwambag
- Resolved by Roy Zwambag
- Resolved by Roy Zwambag
added 295 commits
-
f7a4bc93...604a8e72 - 293 commits from branch
master
- cf888439 - Wrap introspection cache around graphql_controller.rb execute
- 66d9ccd7 - Use query method
-
f7a4bc93...604a8e72 - 293 commits from branch
- Resolved by Aleksei Lipniagov
Allure report
allure-report-publisher
generated test report!e2e-test-on-gdk:
test report for d99f26d4expand test summary
+-----------------------------------------------------------------------+ | suites summary | +------------------+--------+--------+---------+-------+-------+--------+ | | passed | failed | skipped | flaky | total | result | +------------------+--------+--------+---------+-------+-------+--------+ | Create | 8 | 0 | 1 | 0 | 9 | ✅ | | Framework sanity | 0 | 0 | 1 | 0 | 1 | ➖ | | Manage | 1 | 0 | 0 | 0 | 1 | ✅ | | Govern | 2 | 0 | 0 | 0 | 2 | ✅ | | Monitor | 4 | 0 | 0 | 0 | 4 | ✅ | | Data Stores | 2 | 0 | 0 | 1 | 2 | ❗ | | Plan | 4 | 0 | 0 | 0 | 4 | ✅ | +------------------+--------+--------+---------+-------+-------+--------+ | Total | 21 | 0 | 2 | 1 | 23 | ❗ | +------------------+--------+--------+---------+-------+-------+--------+
e2e-review-qa:
test report for e1c62456expand test summary
+-----------------------------------------------------------------------+ | suites summary | +------------------+--------+--------+---------+-------+-------+--------+ | | passed | failed | skipped | flaky | total | result | +------------------+--------+--------+---------+-------+-------+--------+ | Manage | 1 | 0 | 0 | 0 | 1 | ✅ | | Create | 8 | 0 | 1 | 0 | 9 | ✅ | | Plan | 3 | 0 | 1 | 2 | 4 | ❗ | | Monitor | 4 | 0 | 0 | 0 | 4 | ✅ | | Framework sanity | 0 | 0 | 1 | 0 | 1 | ➖ | | Govern | 2 | 0 | 0 | 1 | 2 | ❗ | | Data Stores | 2 | 0 | 0 | 1 | 2 | ❗ | +------------------+--------+--------+---------+-------+-------+--------+ | Total | 20 | 0 | 3 | 4 | 23 | ❗ | +------------------+--------+--------+---------+-------+-------+--------+
e2e-package-and-test:
test report for d99f26d4expand test summary
+------------------------------------------------------------+ | suites summary | +-------+--------+--------+---------+-------+-------+--------+ | | passed | failed | skipped | flaky | total | result | +-------+--------+--------+---------+-------+-------+--------+ +-------+--------+--------+---------+-------+-------+--------+ | Total | 0 | 0 | 0 | 0 | 0 | ➖ | +-------+--------+--------+---------+-------+-------+--------+
added 285 commits
-
1242b803...7828df78 - 283 commits from branch
master
- 38a5a9d2 - Wrap introspection cache around graphql_controller.rb execute
- cf5e426a - Cache separately on remove_deprecated param
-
1242b803...7828df78 - 283 commits from branch
marked the checklist item I have evaluated the MR acceptance checklist for this MR. as completed
- Resolved by Luke Duncalfe
@alipniagov hi could you take a first look at this?
requested review from @alipniagov
- Resolved by Roy Zwambag
- Resolved by Roy Zwambag
- Resolved by Roy Zwambag
added 762 commits
-
29135967...87408dd1 - 758 commits from branch
master
- 9b3b80ba - Wrap introspection cache around graphql_controller.rb execute
- e6d07973 - Cache separately on remove_deprecated param
- 58d61202 - Use Gitlab.revision in the cache key
- b7a08b52 - First check operationName
Toggle commit list-
29135967...87408dd1 - 758 commits from branch
added 2 commits
Bundle size analysis [beta]
This compares changes in bundle size for entry points between the commits b7d7ee2b and e1c62456
Special assetsEntrypoint / Name Size before Size after Diff Diff in percent average 4.13 MB 4.13 MB - 0.0 % mainChunk 2.97 MB 2.97 MB - 0.0 %
Please look at the full report for more details
Read more about how this report works.
Generated by
Danger- Resolved by Roy Zwambag
- Resolved by Roy Zwambag
added 63 commits
-
9c246072...55446289 - 56 commits from branch
master
- f631caaf - Wrap introspection cache around graphql_controller.rb execute
- 95ee0ca9 - Cache separately on remove_deprecated param
- cd840200 - Use Gitlab.revision in the cache key
- c021ba37 - First check operationName
- 9357ee19 - Update spec
- 165ef8d3 - Compare squished query strings
- 3e78c2f1 - Dont cache on fingerprint, but one cache
Toggle commit list-
9c246072...55446289 - 56 commits from branch
- A deleted user
added frontend label
- Resolved by Roy Zwambag
- Resolved by Roy Zwambag
- Resolved by Roy Zwambag
- Resolved by Roy Zwambag
mentioned in issue #412457 (closed)
added 12 commits
-
3e78c2f1...29b54676 - 4 commits from branch
master
- d9d5cabe - Wrap introspection cache around graphql_controller.rb execute
- c30d5988 - Cache separately on remove_deprecated param
- 0956dd62 - Use Gitlab.revision in the cache key
- b0b18d99 - First check operationName
- 234f1463 - Update spec
- c5e4bc96 - Compare squished query strings
- c4978c8f - Dont cache on fingerprint, but one cache
- b47014d7 - Add Feature Flag
Toggle commit list-
3e78c2f1...29b54676 - 4 commits from branch
- A deleted user
added feature flag label
mentioned in commit gitlab-org-sandbox/gitlab-jh-validation@6b84cfbe
mentioned in commit gitlab-org-sandbox/gitlab-jh-validation@9e7c3edd
requested review from @ntepluhina
removed review request for @ntepluhina
removed review request for @alipniagov
added 1007 commits
-
1b635ede...b7faf643 - 998 commits from branch
master
- a786f5c5 - Wrap introspection cache around graphql_controller.rb execute
- 918583ae - Cache separately on remove_deprecated param
- 9b1ddc9a - Use Gitlab.revision in the cache key
- c3917e37 - First check operationName
- 9fa52e77 - Compare squished query strings
- a328a05d - Dont cache on fingerprint, but one cache
- ae55b050 - Add Feature Flag
- f0de5508 - Add Gitlab.revision and remove_deprecated specs
- df90455d - Move introspection query
Toggle commit list-
1b635ede...b7faf643 - 998 commits from branch
requested review from @alipniagov
mentioned in commit gitlab-org-sandbox/gitlab-jh-validation@f39cbd8e
changed milestone to %16.1
added workflowin review label and removed workflowin dev label
- Resolved by Roy Zwambag
- Resolved by Roy Zwambag
- Resolved by Aleksei Lipniagov
- Resolved by Roy Zwambag
- Resolved by Aleksei Lipniagov
removed review request for @alipniagov
added 125 commits
-
df90455d...cb8281e7 - 116 commits from branch
master
- 1805c480 - Wrap introspection cache around graphql_controller.rb execute
- 558fb3de - Cache separately on remove_deprecated param
- c63f44ea - Use Gitlab.revision in the cache key
- dc5313f4 - First check operationName
- 14faa9b5 - Compare squished query strings
- 649256bd - Dont cache on fingerprint, but one cache
- 26707c53 - Add Feature Flag
- ce02d81c - Add Gitlab.revision and remove_deprecated specs
- ad92a3c6 - Clean up method, add spec
Toggle commit list-
df90455d...cb8281e7 - 116 commits from branch
requested review from @alipniagov
mentioned in commit gitlab-org-sandbox/gitlab-jh-validation@3fa0d2fc
@alipniagov
, 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:
added pipeline:mr-approved label
requested review from @.luke
mentioned in commit gitlab-org-sandbox/gitlab-jh-validation@da2caf69
removed review request for @alipniagov
- Resolved by Roy Zwambag
- Resolved by Roy Zwambag
- Resolved by Luke Duncalfe
- Resolved by Roy Zwambag
- Resolved by Roy Zwambag
- Resolved by Luke Duncalfe
removed review request for @.luke
mentioned in issue #409448 (closed)
mentioned in commit gitlab-org-sandbox/gitlab-jh-validation@92cc0ecf
added 369 commits
-
056bf7a8...f2cad5b4 - 359 commits from branch
master
- faa30569 - Wrap introspection cache around graphql_controller.rb execute
- 1154b515 - First check operationName
- 49939925 - Compare squished query strings
- e79fba4e - Add Feature Flag
- b38b30bc - Add Gitlab.revision and remove_deprecated specs
- 3634c20d - Apply 4 suggestion(s) to 1 file(s)
- f0785617 - Add information about remove_deprecated in the cache key
- 44d7879d - Update method names
- d4dbaea3 - Move cached query string to a constant
- e1c62456 - Test GraphiQL Gem Version
Toggle commit list-
056bf7a8...f2cad5b4 - 359 commits from branch
mentioned in commit gitlab-org-sandbox/gitlab-jh-validation@1677cbd4
requested review from @.luke
- Resolved by Roy Zwambag
- Resolved by Roy Zwambag
- Resolved by Roy Zwambag
- Resolved by Roy Zwambag
removed review request for @.luke
added 421 commits
-
e1c62456...78abfd22 - 410 commits from branch
master
- e3f9249d - 1 earlier commit
- 447abcc4 - First check operationName
- be144e4b - Compare squished query strings
- 588e6683 - Add Feature Flag
- d39e6866 - Add Gitlab.revision and remove_deprecated specs
- 6f7a2000 - Apply 4 suggestion(s) to 1 file(s)
- 5384117b - Add information about remove_deprecated in the cache key
- 8e5dac3c - Update method names
- 6a732014 - Move cached query string to a constant
- a1835a38 - Test GraphiQL Gem Version
- d99f26d4 - Apply reviewer suggestions
Toggle commit list-
e1c62456...78abfd22 - 410 commits from branch
mentioned in commit gitlab-org-sandbox/gitlab-jh-validation@478fb89c
requested review from @.luke
@rzwambag Thank you for this improvement
. Thank you also @alipniagov for your review. Set to merge when the pipeline succeeds !enabled an automatic merge when the pipeline for e57660e6 succeeds
- Resolved by Luke Duncalfe
mentioned in issue #414361 (closed)
mentioned in commit gitlab-org-sandbox/gitlab-jh-validation@e57660e6
mentioned in commit 4c34f54b
mentioned in merge request !122725 (merged)
added workflowstaging-canary label and removed workflowin review label
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 #414841 (closed)
added releasedcandidate label
mentioned in merge request !132647 (merged)