-
-
Notifications
You must be signed in to change notification settings - Fork 737
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Gitar] Cleaning up stale flag: integrationEvents with value true #7940
Changes from 2 commits
34e1017
ce21de9
acc5f97
df69b2e
412e15b
ecb7638
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,7 +38,7 @@ import { | |
type IntegrationEventsSchema, | ||
integrationEventsSchema, | ||
} from '../../openapi/spec/integration-events-schema'; | ||
import { BadDataError, NotFoundError } from '../../error'; | ||
import { BadDataError } from '../../error'; | ||
import type { IntegrationEventsService } from '../../services'; | ||
|
||
type AddonServices = Pick< | ||
|
@@ -276,10 +276,6 @@ Note: passing \`null\` as a value for the description property will set it to an | |
>, | ||
res: Response<IntegrationEventsSchema>, | ||
): Promise<void> { | ||
if (!this.flagResolver.isEnabled('integrationEvents')) { | ||
throw new NotFoundError('This feature is not enabled'); | ||
} | ||
|
||
const { id } = req.params; | ||
|
||
if (Number.isNaN(Number(id))) { | ||
|
@@ -288,24 +284,11 @@ Note: passing \`null\` as a value for the description property will set it to an | |
|
||
const { limit = '50', offset = '0' } = req.query; | ||
|
||
const normalizedLimit = | ||
Number(limit) > 0 && Number(limit) <= 100 ? Number(limit) : 50; | ||
const normalizedOffset = Number(offset) > 0 ? Number(offset) : 0; | ||
|
||
const integrationEvents = | ||
await this.integrationEventsService.getPaginatedEvents( | ||
id, | ||
normalizedLimit, | ||
normalizedOffset, | ||
); | ||
|
||
this.openApiService.respondWithValidation( | ||
200, | ||
res, | ||
integrationEventsSchema.$id, | ||
{ | ||
integrationEvents: serializeDates(integrationEvents), | ||
}, | ||
{}, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This looks a little weird, we're keeping the feature There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same thing as the other one, I guess. It just looks for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See the comment above! |
||
); | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm this doesn't seem right if we're keeping the feature and just removing the feature flag
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm guessing this is because the did a grep for
integrationEvents
without considering whether something is a string or a "name".There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do not do "grep" to transform the code. There are scenarios where it is OK to delete this entry, e.g.,
We need to discuss and agree on when it is safe to delete and when it is not. @sjaanus