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

Add feature flag for Max CFI service switch and tests #20160

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

asiisii
Copy link
Contributor

@asiisii asiisii commented Jan 8, 2025

Summary

  • This work is behind a feature toggle (flipper): YES
  • This PR introduces the disability_526_max_cfi_service_switch feature flag to control the switch between the Virtual Regional Office (VRO) client and a new Max Ratings service for fetching disability max ratings.
  • No bugs were fixed in this PR, only the addition of the new feature flag and corresponding logic.
  • The solution introduces a feature flag to control which service is used. When the feature flag is enabled, it will use the new service logic (to be implemented); when disabled, it will default to the VRO client.
  • I am part of the Employee Experience team (EE)

Related issue(s)

Testing done

  • New code is covered by unit tests.
  • The old behavior was to use the VRO client by default for fetching max ratings.
  • The updated behavior allows switching to a new service using a feature flag.
  • The following tests were added:
    • Flipper ON: Ensures the new logic path is followed.
    • Flipper OFF: Ensures the VRO client is used to fetch max ratings.
  • I verified the feature toggle behavior with unit tests.

What areas of the site does it impact?

  • This change impacts the disability compensation max ratings functionality, specifically the backend service used to fetch the ratings.

Acceptance criteria

  • I added unit tests for both the flipper ON and OFF scenarios.
  • No errors or warnings in the console.
  • Events are being sent to the appropriate logging solution.
  • No sensitive information (PII/credentials/internal URLs) is captured in logging or hardcoded.
  • Documentation has been updated if necessary.
  • Verified that all authenticated routes work as expected.

Requested Feedback

Does this implementation of the feature flag meet expectations? Do you foresee any potential issues with the logic for handling the switch between services?

@asiisii asiisii requested a review from a team as a code owner January 8, 2025 20:00
@va-vfs-bot va-vfs-bot temporarily deployed to ee/am/3947-add-max-cfi-service-switch/main/main January 8, 2025 20:04 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to ee/am/3947-add-max-cfi-service-switch/main/main January 8, 2025 20:17 Inactive
dfitchett
dfitchett previously approved these changes Jan 8, 2025
Copy link
Contributor

@dfitchett dfitchett left a comment

Choose a reason for hiding this comment

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

Looks good! No blockers, but left a comment. 🚀

response.body['ratings']
def self.get_ratings(diagnostic_codes, user)
if Flipper.enabled?(:disability_526_max_cfi_service_switch, user)
Rails.logger.info('Implement the new service logic')
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we get more specific with this info statement?

@va-vfs-bot va-vfs-bot temporarily deployed to ee/am/3947-add-max-cfi-service-switch/main/main January 9, 2025 02:07 Inactive
LindseySaari
LindseySaari previously approved these changes Jan 9, 2025
@asiisii asiisii dismissed stale reviews from LindseySaari and dfitchett via 7b27f5a January 9, 2025 17:37
@asiisii asiisii force-pushed the ee/am/3947-add-max-cfi-service-switch branch from 7b27f5a to fcdc3ba Compare January 9, 2025 17:41
Copy link
Contributor

@dfitchett dfitchett left a comment

Choose a reason for hiding this comment

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

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants