question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Remove zeroDataStates feature flag and unused code

See original GitHub issue

Feature Description

Once the zeroDataStates feature is complete and rolled out to 100% of eligible sites, we can safely remove the feature flag and remove the old code that no longer runs.


Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance criteria

  • All usage of zeroDataStates feature flag should be removed, and any code that runs when zeroDataStates === false should be removed.

Implementation Brief

  • Remove zeroDataStates from feature-flags.json
  • Search for the zeroDataStates string within the code base and review code where it is present. Any logic/component which was rendered conditionally when the zeroDataStates feature was enabled should be rendered unconditionally now. Any code which was rendered when the feature flag was disabled should be removed.
  • Use of the useFeature hook with zeroDataStates as a parameter should be removed.
  • Review stories where the zeroDataStates feature is enabled via the story’s parameters to remove the parameter.
    • Legacy Gathering data stories must be removed.

Test Coverage

  • Update VRT images and E2E tests if necessary.

QA Brief

  • Set up a site with forced zero data for modules
  • Ensure that this branch doesn’t differ from the released plugin
  • Ensure that no new warnings are raised in the console
  • Check that the zeroDataStates feature flag is gone from the tester plugin as well

Changelog entry

  • Remove zeroDataStates feature flag and unused code.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:9

github_iconTop GitHub Comments

1reaction
FlicHolliscommented, May 29, 2022

That makes sense - thanks @techanvil

0reactions
mohitwpcommented, Sep 7, 2022

QA Update ✅

Verified

  • Verified for the site which is in default gathering state.
  • Verified for the site which is in forced gathering or zero state.
  • Verified on main branch.
  • On main branch ‘Zero data state’ feature flag not showing under tester plugin and zero data both state ‘gathering and zero’ working fine.
  • No console errors.
  • Also, CTA for both gathering and zero data state are now appearing.
  • CTA appearing on both main,entity and WP dashboard.

image

image

image

image

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cleaning Up Unused Flags - DevCycle Docs
Failing to remove feature flags and their variables at the appropriate time causes cluttered code. Another risk of technical debt with feature ...
Read more >
How to Manage Outdated Feature Flags - Optimizely
Not cleaning up feature flags can introduce risk to your code base. Learn how Feature Flag Removal Day can lead to better feature...
Read more >
Remove `adsenseSetupV2` feature flag and phase out old code
This issue is about removing the adsenseSetupV2 feature flag at some point, ... This will also allow us to delete a bunch of...
Read more >
Reducing feature flag tech debt - Medium
One way to minimize the tedium above is to write code that anticipates the future requirement of removing the feature flag and its...
Read more >
Deleting feature flags - CloudBees Documentation
Removing unused feature flags helps maintain cleaner code and reduce technical debt. You can optionally integrate with Jira and configure additional cleanup ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found