Skip to content
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

Merged
merged 6 commits into from
Aug 21, 2024

Conversation

gitar-bot[bot]
Copy link
Contributor

@gitar-bot gitar-bot bot commented Aug 20, 2024

Gitar


This automated PR was generated by Gitar. View docs.

Copy link

vercel bot commented Aug 20, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
unleash-monorepo-frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 21, 2024 0:16am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
unleash-docs ⬜️ Ignored (Inspect) Visit Preview Aug 21, 2024 0:16am

Copy link
Contributor

github-actions bot commented Aug 20, 2024

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails

Scanned Manifest Files

Copy link
Contributor

@daveleek daveleek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to me the code removing was a tad over eager

properties: {
integrationEvents: {
type: 'array',
description: 'A list of integration events.',
items: {
$ref: integrationEventSchema.$id,
},
},
},
properties: {},
Copy link
Contributor

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

Copy link
Contributor

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".

Copy link

@rajbarik rajbarik Aug 28, 2024

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.,

flags: {
            integrationEvents: true,
        },

We need to discuss and agree on when it is safe to delete and when it is not. @sjaanus

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),
},
{},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks a little weird, we're keeping the feature

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same thing as the other one, I guess. It just looks for integrationEvents, thinks "oh, I can delete that" and then also cleans up where it's used. We should see if we can fix that somehow.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See the comment above!

Copy link
Contributor

@daveleek daveleek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks better now that we've added back a few deleted sections

@daveleek daveleek merged commit 3a15fa7 into main Aug 21, 2024
9 of 12 checks passed
@daveleek daveleek deleted the gitar_integrationEvents_true branch August 21, 2024 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants