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

fix(feature-flags): Remove unused feature flags from Origo #16692

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

johannaagma
Copy link
Member

@johannaagma johannaagma commented Nov 1, 2024

What

According to this should we clean up all flags that have been flipped on for all environments

Checklist:

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • Formatting passes locally with my changes
  • I have rebased against main before asking for a review

Summary by CodeRabbit

  • New Features

    • Enhanced error handling for retrieving buyer national ID across multiple templates.
    • Improved type safety in user-role mapping methods.
  • Bug Fixes

    • Removed deprecated feature flags from various templates, streamlining configuration and improving clarity.
  • Chores

    • Updated state machine configurations to reflect the removal of feature flags, ensuring consistent application behavior across templates.

Copy link
Contributor

coderabbitai bot commented Nov 1, 2024

Walkthrough

The changes in this pull request involve the removal of feature flags from multiple application templates, indicating a shift in how feature management is handled across the application. Additionally, several templates have been updated to enhance type safety and error handling, particularly in methods related to user role mapping and national ID retrieval. The modifications streamline the configuration of templates while preserving core functionalities and state machine structures.

Changes

File Change Summary
libs/application/templates/aosh/change-machine-supervisor/src/lib/ChangeMachineSupervisorTemplate.ts Removed featureFlag property; updated mapUserToRole method to include explicit return type; added error handling in getBuyerNationalId function.
libs/application/templates/aosh/deregister-machine/src/lib/DeregisterMachineTemplate.ts Removed featureFlag property; updated COMPLETED state to include lifecycle property and onEntry action.
libs/application/templates/aosh/register-new-machine/src/lib/RegisterNewMachineTemplate.ts Removed featureFlag property; retained overall structure and state machine configuration.
libs/application/templates/aosh/request-for-inspection/src/lib/RequestForInspectionTemplate.ts Removed featureFlag property; no changes to state machine configuration or logic.
libs/application/templates/aosh/street-registration/src/lib/StreetRegistrationTemplate.ts Removed featureFlag property; added mapUserToRole method; getBuyerNationalId function remains unchanged.
libs/application/templates/aosh/transfer-of-machine-ownership/src/lib/TransferOfMachineOwnershipTemplate.ts Removed featureFlag property; mapUserToRole method defined to map user IDs to roles.
libs/application/templates/directorate-of-immigration/citizenship/src/lib/CitizenshipTemplate.ts Removed featureFlag property; state machine configuration remains unchanged.
libs/application/templates/energy-funds/src/lib/EnergyFundsTemplate.tsx Removed featureFlag property; retained overall structure and state machine configuration.
libs/application/templates/healthcare-license-certificate/src/lib/HealthcareLicenseCertificateTemplate.ts Removed featureFlag property; state machine structure remains intact.
libs/application/templates/healthcare-work-permit/src/lib/HealthcareWorkPermitTemplate.ts Removed featureFlag property; overall structure and logic remain unchanged.
libs/feature-flags/src/lib/features.ts Removed multiple feature flags from Features enum.

Possibly related PRs

Suggested labels

automerge

Suggested reviewers

  • thordurhhh
  • rafnarnason
  • albinagu

📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between d0c9471 and 74209f6.

📒 Files selected for processing (11)
  • libs/application/templates/aosh/change-machine-supervisor/src/lib/ChangeMachineSupervisorTemplate.ts (0 hunks)
  • libs/application/templates/aosh/deregister-machine/src/lib/DeregisterMachineTemplate.ts (0 hunks)
  • libs/application/templates/aosh/register-new-machine/src/lib/RegisterNewMachineTemplate.ts (0 hunks)
  • libs/application/templates/aosh/request-for-inspection/src/lib/RequestForInspectionTemplate.ts (0 hunks)
  • libs/application/templates/aosh/street-registration/src/lib/StreetRegistrationTemplate.ts (0 hunks)
  • libs/application/templates/aosh/transfer-of-machine-ownership/src/lib/TransferOfMachineOwnershipTemplate.ts (0 hunks)
  • libs/application/templates/directorate-of-immigration/citizenship/src/lib/CitizenshipTemplate.ts (0 hunks)
  • libs/application/templates/energy-funds/src/lib/EnergyFundsTemplate.tsx (0 hunks)
  • libs/application/templates/healthcare-license-certificate/src/lib/HealthcareLicenseCertificateTemplate.ts (0 hunks)
  • libs/application/templates/healthcare-work-permit/src/lib/HealthcareWorkPermitTemplate.ts (0 hunks)
  • libs/feature-flags/src/lib/features.ts (0 hunks)
💤 Files with no reviewable changes (11)
  • libs/application/templates/aosh/change-machine-supervisor/src/lib/ChangeMachineSupervisorTemplate.ts
  • libs/application/templates/aosh/deregister-machine/src/lib/DeregisterMachineTemplate.ts
  • libs/application/templates/aosh/register-new-machine/src/lib/RegisterNewMachineTemplate.ts
  • libs/application/templates/aosh/request-for-inspection/src/lib/RequestForInspectionTemplate.ts
  • libs/application/templates/aosh/street-registration/src/lib/StreetRegistrationTemplate.ts
  • libs/application/templates/aosh/transfer-of-machine-ownership/src/lib/TransferOfMachineOwnershipTemplate.ts
  • libs/application/templates/directorate-of-immigration/citizenship/src/lib/CitizenshipTemplate.ts
  • libs/application/templates/energy-funds/src/lib/EnergyFundsTemplate.tsx
  • libs/application/templates/healthcare-license-certificate/src/lib/HealthcareLicenseCertificateTemplate.ts
  • libs/application/templates/healthcare-work-permit/src/lib/HealthcareWorkPermitTemplate.ts
  • libs/feature-flags/src/lib/features.ts

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@johannaagma johannaagma marked this pull request as ready for review November 1, 2024 11:20
@johannaagma johannaagma requested review from a team as code owners November 1, 2024 11:20
Copy link

codecov bot commented Nov 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 36.63%. Comparing base (d0c9471) to head (74209f6).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #16692      +/-   ##
==========================================
- Coverage   36.64%   36.63%   -0.01%     
==========================================
  Files        6872     6872              
  Lines      143068   143051      -17     
  Branches    40770    40770              
==========================================
- Hits        52431    52413      -18     
- Misses      90637    90638       +1     
Flag Coverage Δ
air-discount-scheme-backend 54.03% <ø> (-0.14%) ⬇️
air-discount-scheme-web 0.00% <ø> (ø)
api 3.37% <ø> (ø)
api-domains-air-discount-scheme 36.96% <ø> (-0.34%) ⬇️
api-domains-assets 26.71% <ø> (ø)
api-domains-auth-admin 48.48% <ø> (ø)
api-domains-communications 39.85% <ø> (-0.08%) ⬇️
api-domains-criminal-record 47.40% <ø> (-0.44%) ⬇️
api-domains-driving-license 44.44% <ø> (-0.18%) ⬇️
api-domains-education 31.20% <ø> (-0.38%) ⬇️
api-domains-health-insurance 34.23% <ø> (-0.54%) ⬇️
api-domains-mortgage-certificate 34.63% <ø> (-0.31%) ⬇️
api-domains-payment-schedule 41.19% <ø> (-0.32%) ⬇️
application-api-files 56.49% <ø> (-0.30%) ⬇️
application-core 71.49% <ø> (+0.32%) ⬆️
application-system-api 41.31% <ø> (-0.03%) ⬇️
application-template-api-modules 27.79% <ø> (-0.03%) ⬇️
application-templates-accident-notification 29.24% <ø> (ø)
application-templates-car-recycling 3.12% <ø> (ø)
application-templates-criminal-record 26.30% <ø> (ø)
application-templates-driving-license 18.40% <ø> (ø)
application-templates-estate 12.19% <ø> (ø)
application-templates-example-payment 25.20% <ø> (ø)
application-templates-financial-aid 15.55% <ø> (ø)
application-templates-general-petition 23.42% <ø> (ø)
application-templates-inheritance-report 6.50% <ø> (ø)
application-templates-marriage-conditions 15.18% <ø> (ø)
application-templates-mortgage-certificate 43.58% <ø> (ø)
application-templates-parental-leave 29.94% <ø> (ø)
application-types 6.62% <ø> (ø)
application-ui-components 1.27% <ø> (ø)
application-ui-shell 20.87% <ø> (ø)
clients-charge-fjs-v2 24.11% <ø> (ø)
clients-driving-license 40.12% <ø> (-0.45%) ⬇️
clients-driving-license-book 43.38% <ø> (-0.33%) ⬇️
clients-financial-statements-inao 48.91% <ø> (-0.42%) ⬇️
clients-license-client 1.83% <ø> (ø)
clients-regulations 42.18% <ø> (-0.48%) ⬇️
clients-rsk-company-registry 29.76% <ø> (ø)
clients-rsk-personal-tax-return 38.00% <ø> (ø)
clients-smartsolutions 12.77% <ø> (ø)
clients-syslumenn 49.15% <ø> (-0.24%) ⬇️
cms 0.42% <ø> (ø)
cms-translations 38.97% <ø> (-0.08%) ⬇️
dokobit-signing 62.40% <ø> (-0.98%) ⬇️
download-service 44.23% <ø> (-0.17%) ⬇️
email-service 60.24% <ø> (-0.89%) ⬇️
feature-flags 90.32% <ø> (-0.79%) ⬇️
file-storage 52.41% <ø> (-1.30%) ⬇️
financial-aid-backend 51.24% <ø> (-0.15%) ⬇️
judicial-system-api 19.52% <ø> (ø)
judicial-system-audit-trail 68.53% <ø> (-0.90%) ⬇️
judicial-system-backend 55.30% <ø> (-0.03%) ⬇️
judicial-system-message 66.66% <ø> (-0.71%) ⬇️
judicial-system-message-handler 47.53% <ø> (-1.00%) ⬇️
judicial-system-scheduler 70.35% <ø> (-0.28%) ⬇️
license-api 42.46% <ø> (-0.25%) ⬇️
nest-config 77.74% <ø> (-0.71%) ⬇️
nest-feature-flags 50.83% <ø> (-0.69%) ⬇️
nova-sms 61.71% <ø> (-1.04%) ⬇️
portals-admin-regulations-admin 1.85% <ø> (ø)
portals-core 15.91% <ø> (ø)
services-auth-admin-api 51.87% <ø> (-0.05%) ⬇️
services-auth-delegation-api 57.45% <ø> (-0.12%) ⬇️
services-auth-ids-api 51.44% <ø> (-0.06%) ⬇️
services-auth-personal-representative 45.08% <ø> (-0.03%) ⬇️
services-auth-personal-representative-public 41.27% <ø> (-0.03%) ⬇️
services-auth-public-api 48.96% <ø> (-0.06%) ⬇️
services-endorsements-api 53.58% <ø> (-0.14%) ⬇️
services-sessions 65.36% <ø> (-0.18%) ⬇️
services-university-gateway 49.16% <ø> (-0.17%) ⬇️
services-user-notification 46.94% <ø> (-0.06%) ⬇️
services-user-profile 61.82% <ø> (-0.03%) ⬇️
web 1.80% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...ervisor/src/lib/ChangeMachineSupervisorTemplate.ts 38.46% <ø> (-1.54%) ⬇️
...registration/src/lib/StreetRegistrationTemplate.ts 42.85% <ø> (-1.33%) ⬇️
...ship/src/lib/TransferOfMachineOwnershipTemplate.ts 30.88% <ø> (-1.01%) ⬇️
...gration/citizenship/src/lib/CitizenshipTemplate.ts 52.38% <ø> (-2.17%) ⬇️
...te/src/lib/HealthcareLicenseCertificateTemplate.ts 52.38% <ø> (-2.17%) ⬇️
...ork-permit/src/lib/HealthcareWorkPermitTemplate.ts 52.38% <ø> (-2.17%) ⬇️
libs/feature-flags/src/lib/features.ts 100.00% <ø> (ø)

... and 1 file with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d0c9471...74209f6. Read the comment docs.

@datadog-island-is
Copy link

Datadog Report

All test runs 6d37d0d 🔗

70 Total Test Services: 0 Failed, 67 Passed
🔻 Test Sessions change in coverage: 36 decreased, 1 increased (+0.2%), 163 no change

Test Services
This report shows up to 10 services
Service Name Failed Known Flaky New Flaky Passed Skipped Total Time Code Coverage Change Test Service View
air-discount-scheme-backend 0 0 0 82 0 30.66s N/A Link
air-discount-scheme-web 0 0 0 2 0 7.19s N/A Link
api 0 0 0 4 0 2.34s N/A Link
api-domains-air-discount-scheme 0 0 0 6 0 15.56s N/A Link
api-domains-assets 0 0 0 3 0 9.54s 1 no change Link
api-domains-auth-admin 0 0 0 18 0 10.38s N/A Link
api-domains-communications 0 0 0 5 0 27.41s N/A Link
api-domains-criminal-record 0 0 0 5 0 8.15s 1 decreased (-0.46%) Link
api-domains-driving-license 0 0 0 23 0 26.42s N/A Link
api-domains-education 0 0 0 8 0 16.67s 1 decreased (-0.32%) Link

🔻 Code Coverage Decreases vs Default Branch (36)

This report shows up to 5 code coverage decreases.

  • file-storage - jest 55.96% (-1.34%) - Details
  • nova-sms - jest 64.32% (-1.07%) - Details
  • judicial-system-message-handler - jest 50.59% (-1.06%) - Details
  • dokobit-signing - jest 65.15% (-0.99%) - Details
  • judicial-system-audit-trail - jest 70.74% (-0.93%) - Details

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