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

[sc-231506] fix: extinction checking not working correctly #93

Merged

Conversation

jazanne
Copy link
Contributor

@jazanne jazanne commented Feb 5, 2024

We weren't properly checking for flag extinctions, because the project element matcher wasn't configured right.

Also adds new logging helpers and debug logs for github actions debug mode

@jazanne jazanne requested a review from a team February 5, 2024 15:55
Copy link

This pull request has been linked to Shortcut Story #231506: [pr commenter] falsely saying all refs have been removed.

Copy link

github-actions bot commented Feb 5, 2024

LaunchDarkly flag references

🔍 1 flag added or modified

Name Key Aliases found Info
Show: App Promo mobile-app-promo-ios mobile-app-promo-ios ⚠️ archived on 2023-08-03

❌ 1 flag removed

Name Key Aliases found Info
old-pricing-banner old-pricing-banner old-pricing-banner

@github-actions github-actions bot added the ld-flags LaunchDarkly flags have been detected in the PR diff label Feb 5, 2024
delimiters := strings.Join(lsearch.GetDelimiters(opts), "")
elements := make([]lsearch.ElementMatcher, 0, 1)
elements = append(elements, lsearch.NewElementMatcher(opts.ProjKey, opts.Dir, delimiters, flagKeys, aliasesByFlagKey))
matcher = lsearch.Matcher{
elements = append(elements, lsearch.NewElementMatcher(opts.ProjKey, "", delimiters, flagKeys, aliasesByFlagKey))
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is the fix - this was setup for monorepo support, but didn't work correctly with scanning.

oldPricingBanner
show_widgets
oldPricingBanner
mobile-app-promo-ios
mobile-app-promo-ios
Copy link

Choose a reason for hiding this comment

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

looks like this is listed twice now?

Copy link
Contributor Author

@jazanne jazanne Feb 5, 2024

Choose a reason for hiding this comment

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

yea just test data to show that everything is working properly (see comment) - this file changes with most PRs

@jazanne jazanne merged commit 487ce20 into main Feb 5, 2024
5 checks passed
@jazanne jazanne deleted the jwhite/sc-231506/pr-commenter-falsely-saying-all-refs-have branch February 5, 2024 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ld-flags LaunchDarkly flags have been detected in the PR diff
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants