Hi @leetickett-gitlab a few small comments for you but overall looks good and I was able to test locally
question: Why did you choose to add this only to update but not also create?
field :filter, GraphQL::Types::JSON, # rubocop:disable Graphql/JSONType -- filter schema is not model backend argument :filter, GraphQL::Types::JSON, # rubocop:disable Graphql/JSONType -- filter schema is not model backendHi @alexander.rusa thanks for your feedback! This is really helpful to know the friction points for you in contributing
Missy Davies (409faf37) at 17 Mar 19:06
Remove by_username scope and inline logic into lookup_by_username
@leetickett-gitlab I removed the scope and folded that into the lookup_by_username method. Can you take another look?
Missy Davies (91cfb9a2) at 17 Mar 19:03
Remove by_username scope and inline logic into lookup_by_username
Hi @tanvir.singh
Thanks for onboarding!
I'm a community maintainer and will help you get started with contributing to GitLab
Please reply to this issue and introduce yourself by sharing about who you are and where you're looking to contribute.
These shared projects make it easier than personal forks to push changes to the GitLab codebase, collaborate with others, and improve efficiency with GitLab Ultimate and Duo features.
We'll help make your first contribution to GitLab easy so you can learn the process.
If you're unsure about anything, please join us on Discord in the #contribute channel so we can support you!
Thank you
Ok! I'll make the change :)
Without the wrapper then we have to repeat the .first across all the places it's called (bc otherwise it returns a relation when we need a single record). It's not that much duplication, but I still kind of liked simplifying.
The wrapper also lets us return early if username is nil which prevents an extra database query. It's not a huge improvement in performance, but we call this in 6 different places and would have to add the same early return in all 6 if we wanted that catch.
@leetickett-gitlab WDYT, I'm happy to update if you prefer to not have the wrapper.
Missy Davies (f7d8b7c0) at 16 Mar 19:48
Missy Davies (f67bcd04) at 16 Mar 19:48
Merge branch 'renovate/vitest-coverage-istanbul-4.x' into 'main'
... and 1 more commit
This MR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| @vitest/coverage-istanbul (source) | devDependencies | minor | ^4.0.18 -> ^4.1.0 |
MR created with the help of gitlab-org/frontend/renovate-gitlab-bot
v4.1.0
Vitest 4.1 is out!
This release page lists all changes made to the project during the 4.1 beta. To get a review of all the new features, read our blog post.
setTickMode to timer controls - by @atscott and @sheremet-va in https://github.com/vitest-dev/vitest/issues/8726 (4b480)
toTestSpecification to reported tasks - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/9464 (1a470)
vi.mock or vi.hoisted are declared outside of top level of the module - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/9387 (5db54)
aroundEach and aroundAll hooks - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/9450 (2a8cb)
new or all in --update flag - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/9543 (a5acf)
meta in test options - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/9535 (7d622)
test.extend syntax - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/9550 (e5385)
vitest list to statically collect tests instead of running files to collect them - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/9630 (7a8e7)
--detect-async-leaks - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/9528 (c594d)
mockThrow and mockThrowOnce - by @thor-juhasz and @sheremet-va in https://github.com/vitest-dev/vitest/issues/9512 (61917)
update: "none" and add docs about snapshots behavior on CI - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/9700 (05f18)
launchOptions with connectOptions - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/9702 (f0ff1)
page/locator.mark API to enhance playwright trace - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/9652 (d0ee5)
test in experimental_parseSpecification - by @jgillick and Jeremy Gillick in https://github.com/vitest-dev/vitest/issues/9235 (2f367)
createSpecification - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/9336 (c8e6c)
runTestFiles as alternative to runTestSpecifications - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/9443 (43d76)
allowWrite and allowExec options to api - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/9350 (20e00)
toTestSpecification - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/9627 (6f17d)
userEvent.wheel API - by @macarie in https://github.com/vitest-dev/vitest/issues/9188 (66080)
filterNode option to prettyDOM for filtering browser assertion error output - by @Copilot, sheremet-va and @sheremet-va in https://github.com/vitest-dev/vitest/issues/9475 (d3220)
detailsPanelPosition option and button - by @shairez in https://github.com/vitest-dev/vitest/issues/9525 (c8a31)
findElement and enable strict mode in webdriverio and preview - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/9677 (c3f37)
ignore start/stop ignore hints - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/9204 (e59c9)
coverage.changed option to report only changed files - by @kykim00 and @AriPerkkio in https://github.com/vitest-dev/vitest/issues/9521 (1d939)
onModuleRunner hook to worker.init - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/9286 (e977f)
importDurations: { limit, print } options - by @hi-ogawa, Claude Opus 4.6 and @sheremet-va in https://github.com/vitest-dev/vitest/issues/9401 (7e10f)
importDurations - by @hi-ogawa and Claude Opus 4.6 in https://github.com/vitest-dev/vitest/issues/9533 (3f7a5)
beforeAll/afterAll - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/9572 (c8339)
agent reporter to reduce ai agent token usage - by @cpojer in https://github.com/vitest-dev/vitest/issues/9779 (3e9e0)
retry options - by @MazenSamehR, Matan Shavit, @AriPerkkio and @sheremet-va in https://github.com/vitest-dev/vitest/issues/9370 (9e4cf)
meta.url in createRequire - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/9441 (e3422)
external/noExternal during configEnvironment hook - by @hi-ogawa and Claude Opus 4.6 in https://github.com/vitest-dev/vitest/issues/9508 (59ea2)
browser.isolate is used - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/9410 (3d48e)
vi.mock({ spy: true }) node v8 coverage - by @hi-ogawa, hi-ogawa and Claude Opus 4.6 in https://github.com/vitest-dev/vitest/issues/9541 (687b6)
.name from statically collected test - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/9596 (b66ff)
expect.soft - by @iumehara, @hi-ogawa and Claude Opus 4.6 in https://github.com/vitest-dev/vitest/issues/9231 (3eb2c)
sequence.shuffle.tests is enabled - by @kaigritun, Kai Gritun and @sheremet-va in https://github.com/vitest-dev/vitest/issues/9576 (8182b)
expect/src/utils from vitest - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/9616 (48739)
--detect-async-leaks - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/9638 (9fd4c)
aroundEach/All when inner aroundEach/All throws - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/9657 (4ec6c)
aroundEach/All setup timed out - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/9670 (bb013)
VitestRunnerConfig optional fields with SerializedConfig - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/9661 (79520)
toBe* spy assertions in favor of toHaveBeen* (and toThrowError) - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/9665 (4d390)
aroundEach/All errors but aggregate them on runner - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/9673 (b6365)
resolves/rejects chained assertion error - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/9679 (c6151)
maxConcurrency - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/9653 (16d13)
resolve.conditions for externals - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/9717 (1d498)
mockObject change backwards compatible - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/9744 (84c69)
URL.name on jsdom - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/9767 (031f3)
vi.importActual() for virtual modules - by @hi-ogawa and Claude Opus 4.6 in https://github.com/vitest-dev/vitest/issues/9772 (1e89e)
FixtureAccessError if suite hook accesses undefined fixture - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/9786 (fc2ce)
load or transform original module - by @hi-ogawa and Claude Opus 4.6 in https://github.com/vitest-dev/vitest/issues/9774 (a8216)
hideSkippedTests should not hide test.todo - by @oilater in https://github.com/vitest-dev/vitest/issues/9562 and https://github.com/vitest-dev/vitest/issues/9781 (8181e)
beforeEach hooks - by @hi-ogawa and Claude Opus 4.6 in https://github.com/vitest-dev/vitest/issues/9826 (99e52)
performance.now to measure test timeout duration - by @hi-ogawa and Claude Opus 4.6 in https://github.com/vitest-dev/vitest/issues/9795 (f48a6)
toMatchScreenshot passes - by @macarie in https://github.com/vitest-dev/vitest/issues/9289 (46aab)
toMatchScreenshot - by @macarie in https://github.com/vitest-dev/vitest/issues/9552 (83ca0)
--remote-debugging-address from chrome args - by @hi-ogawa and @AriPerkkio in https://github.com/vitest-dev/vitest/issues/9712 (f09bb)
ensureAwaited - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/9732 (97685)
getCDPSession and cdp() - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/9716 (689a2)
deepEqual in the config because it's not serializable - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/9666 (9ee99)
thresholds.autoUpdate to preserve ending whitespace - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/9436 (7e534)
/config/#option hash links causing hydration errors - by @hi-ogawa, Claude Opus 4.6 and @sheremet-va in https://github.com/vitest-dev/vitest/issues/9610 (a603c)
toMatchObject(Map/Set) should expect Map/Set on left hand side - by @hi-ogawa and Claude Opus 4.6 in https://github.com/vitest-dev/vitest/issues/9532 (381da)
toThrow and make Error detection robust - by @hi-ogawa and Claude Opus 4.6 in https://github.com/vitest-dev/vitest/issues/9570 (de215)
dot reporter leaves pending tests - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/9684 (4d793)
undefined - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/9511 (6f181)
bench.reporters no longer gives type errors when passing file name string paths - by @Bertie690 in https://github.com/vitest-dev/vitest/issues/9695 (093c8)
This MR has been generated by Renovate Bot.
Hi @kevinxshao are you ready for another review? I see you resolved the last thread but didn't tag or mention me for another review so I'm assuming you're still working here. I also see the pipeline is failing
Missy Davies (ee5d0dfb) at 16 Mar 19:34
Missy Davies (d22465e7) at 16 Mar 19:34
Merge branch 'renovate/vue-data-ui-3.x' into 'main'
... and 1 more commit
This MR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| vue-data-ui (source) | dependencies | patch | ^3.15.10 -> ^3.15.12 |
MR created with the help of gitlab-org/frontend/renovate-gitlab-bot
v3.15.12
npmx icon ;)<VueUiIcon name="npmx" />
VueUiVerticalBarDatapoint type which allows to fix TS errors when passing metadata into the dataset, and using this type in the tooltip.customFormat callbackv3.15.11
const config = computed(() => {
return {
style: {
chart: {
layout: {
bars: {
// defaults:
rowColor: null,
rowRadius: 4
}
}
}
}
}
});
Special thanks to @alexdln for another genius idea
This MR has been generated by Renovate Bot.
This MR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| vue-data-ui (source) | dependencies | patch | ^3.15.10 -> ^3.15.12 |
MR created with the help of gitlab-org/frontend/renovate-gitlab-bot
v3.15.12
npmx icon ;)<VueUiIcon name="npmx" />
VueUiVerticalBarDatapoint type which allows to fix TS errors when passing metadata into the dataset, and using this type in the tooltip.customFormat callbackv3.15.11
const config = computed(() => {
return {
style: {
chart: {
layout: {
bars: {
// defaults:
rowColor: null,
rowRadius: 4
}
}
}
}
}
});
Special thanks to @alexdln for another genius idea
This MR has been generated by Renovate Bot.
This MR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| @vitest/coverage-istanbul (source) | devDependencies | minor | ^4.0.18 -> ^4.1.0 |
MR created with the help of gitlab-org/frontend/renovate-gitlab-bot
v4.1.0
Vitest 4.1 is out!
This release page lists all changes made to the project during the 4.1 beta. To get a review of all the new features, read our blog post.
setTickMode to timer controls - by @atscott and @sheremet-va in https://github.com/vitest-dev/vitest/issues/8726 (4b480)
toTestSpecification to reported tasks - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/9464 (1a470)
vi.mock or vi.hoisted are declared outside of top level of the module - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/9387 (5db54)
aroundEach and aroundAll hooks - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/9450 (2a8cb)
new or all in --update flag - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/9543 (a5acf)
meta in test options - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/9535 (7d622)
test.extend syntax - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/9550 (e5385)
vitest list to statically collect tests instead of running files to collect them - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/9630 (7a8e7)
--detect-async-leaks - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/9528 (c594d)
mockThrow and mockThrowOnce - by @thor-juhasz and @sheremet-va in https://github.com/vitest-dev/vitest/issues/9512 (61917)
update: "none" and add docs about snapshots behavior on CI - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/9700 (05f18)
launchOptions with connectOptions - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/9702 (f0ff1)
page/locator.mark API to enhance playwright trace - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/9652 (d0ee5)
test in experimental_parseSpecification - by @jgillick and Jeremy Gillick in https://github.com/vitest-dev/vitest/issues/9235 (2f367)
createSpecification - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/9336 (c8e6c)
runTestFiles as alternative to runTestSpecifications - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/9443 (43d76)
allowWrite and allowExec options to api - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/9350 (20e00)
toTestSpecification - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/9627 (6f17d)
userEvent.wheel API - by @macarie in https://github.com/vitest-dev/vitest/issues/9188 (66080)
filterNode option to prettyDOM for filtering browser assertion error output - by @Copilot, sheremet-va and @sheremet-va in https://github.com/vitest-dev/vitest/issues/9475 (d3220)
detailsPanelPosition option and button - by @shairez in https://github.com/vitest-dev/vitest/issues/9525 (c8a31)
findElement and enable strict mode in webdriverio and preview - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/9677 (c3f37)
ignore start/stop ignore hints - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/9204 (e59c9)
coverage.changed option to report only changed files - by @kykim00 and @AriPerkkio in https://github.com/vitest-dev/vitest/issues/9521 (1d939)
onModuleRunner hook to worker.init - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/9286 (e977f)
importDurations: { limit, print } options - by @hi-ogawa, Claude Opus 4.6 and @sheremet-va in https://github.com/vitest-dev/vitest/issues/9401 (7e10f)
importDurations - by @hi-ogawa and Claude Opus 4.6 in https://github.com/vitest-dev/vitest/issues/9533 (3f7a5)
beforeAll/afterAll - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/9572 (c8339)
agent reporter to reduce ai agent token usage - by @cpojer in https://github.com/vitest-dev/vitest/issues/9779 (3e9e0)
retry options - by @MazenSamehR, Matan Shavit, @AriPerkkio and @sheremet-va in https://github.com/vitest-dev/vitest/issues/9370 (9e4cf)
meta.url in createRequire - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/9441 (e3422)
external/noExternal during configEnvironment hook - by @hi-ogawa and Claude Opus 4.6 in https://github.com/vitest-dev/vitest/issues/9508 (59ea2)
browser.isolate is used - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/9410 (3d48e)
vi.mock({ spy: true }) node v8 coverage - by @hi-ogawa, hi-ogawa and Claude Opus 4.6 in https://github.com/vitest-dev/vitest/issues/9541 (687b6)
.name from statically collected test - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/9596 (b66ff)
expect.soft - by @iumehara, @hi-ogawa and Claude Opus 4.6 in https://github.com/vitest-dev/vitest/issues/9231 (3eb2c)
sequence.shuffle.tests is enabled - by @kaigritun, Kai Gritun and @sheremet-va in https://github.com/vitest-dev/vitest/issues/9576 (8182b)
expect/src/utils from vitest - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/9616 (48739)
--detect-async-leaks - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/9638 (9fd4c)
aroundEach/All when inner aroundEach/All throws - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/9657 (4ec6c)
aroundEach/All setup timed out - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/9670 (bb013)
VitestRunnerConfig optional fields with SerializedConfig - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/9661 (79520)
toBe* spy assertions in favor of toHaveBeen* (and toThrowError) - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/9665 (4d390)
aroundEach/All errors but aggregate them on runner - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/9673 (b6365)
resolves/rejects chained assertion error - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/9679 (c6151)
maxConcurrency - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/9653 (16d13)
resolve.conditions for externals - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/9717 (1d498)
mockObject change backwards compatible - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/9744 (84c69)
URL.name on jsdom - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/9767 (031f3)
vi.importActual() for virtual modules - by @hi-ogawa and Claude Opus 4.6 in https://github.com/vitest-dev/vitest/issues/9772 (1e89e)
FixtureAccessError if suite hook accesses undefined fixture - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/9786 (fc2ce)
load or transform original module - by @hi-ogawa and Claude Opus 4.6 in https://github.com/vitest-dev/vitest/issues/9774 (a8216)
hideSkippedTests should not hide test.todo - by @oilater in https://github.com/vitest-dev/vitest/issues/9562 and https://github.com/vitest-dev/vitest/issues/9781 (8181e)
beforeEach hooks - by @hi-ogawa and Claude Opus 4.6 in https://github.com/vitest-dev/vitest/issues/9826 (99e52)
performance.now to measure test timeout duration - by @hi-ogawa and Claude Opus 4.6 in https://github.com/vitest-dev/vitest/issues/9795 (f48a6)
toMatchScreenshot passes - by @macarie in https://github.com/vitest-dev/vitest/issues/9289 (46aab)
toMatchScreenshot - by @macarie in https://github.com/vitest-dev/vitest/issues/9552 (83ca0)
--remote-debugging-address from chrome args - by @hi-ogawa and @AriPerkkio in https://github.com/vitest-dev/vitest/issues/9712 (f09bb)
ensureAwaited - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/9732 (97685)
getCDPSession and cdp() - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/9716 (689a2)
deepEqual in the config because it's not serializable - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/9666 (9ee99)
thresholds.autoUpdate to preserve ending whitespace - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/9436 (7e534)
/config/#option hash links causing hydration errors - by @hi-ogawa, Claude Opus 4.6 and @sheremet-va in https://github.com/vitest-dev/vitest/issues/9610 (a603c)
toMatchObject(Map/Set) should expect Map/Set on left hand side - by @hi-ogawa and Claude Opus 4.6 in https://github.com/vitest-dev/vitest/issues/9532 (381da)
toThrow and make Error detection robust - by @hi-ogawa and Claude Opus 4.6 in https://github.com/vitest-dev/vitest/issues/9570 (de215)
dot reporter leaves pending tests - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/9684 (4d793)
undefined - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/9511 (6f181)
bench.reporters no longer gives type errors when passing file name string paths - by @Bertie690 in https://github.com/vitest-dev/vitest/issues/9695 (093c8)
This MR has been generated by Renovate Bot.