Skip to content

Conversation

JimmyVo16
Copy link
Contributor

@JimmyVo16 JimmyVo16 commented Sep 5, 2025

🎟️ Tracking

https://bitwarden.atlassian.net/browse/PM-24279

📔 Objective

We introduce a Policy vNext endpoint that includes a breaking change in the request body. This new endpoint enables us to pass metadata to perform operations on the backend that are not associated with the policy record data. PR for the new endpoint.

Changes in this PR

  1. Add functionality to build the new request body and endpoint route
  2. Add feature flag check to handle routing to the new endpoint only if the feature flag is enabled

📸 Screenshots

manual testing of the vNext endpoint and the regular endpoint.

Testing.vnext.endpoint.mov

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • ❓ (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • ❌ (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

} catch (e) {
this.toastService.showToast({ variant: "error", title: null, message: e.message });
return;
if (await this.shouldUseVNextImplementation()) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hey @BrandonTreston , please review the architecture of this PR. Once I get your approval, I will add tests.

Copy link
Contributor

github-actions bot commented Sep 5, 2025

Logo
Checkmarx One – Scan Summary & Details559a4f97-3082-4ce3-a8b5-98b167dc3495

Great job! No new security vulnerabilities introduced in this pull request

BTreston
BTreston previously approved these changes Sep 8, 2025
Copy link
Contributor

@BTreston BTreston left a comment

Choose a reason for hiding this comment

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

Approach looks good to me 👍

}

const vNextRequest = await (
this.policyComponent as vNextOrganizationDataOwnershipPolicyComponent
Copy link
Contributor

Choose a reason for hiding this comment

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

⛏️ Prefer narrowing to type assertions

Copy link

sonarqubecloud bot commented Sep 9, 2025

Copy link

codecov bot commented Sep 9, 2025

Codecov Report

❌ Patch coverage is 0% with 48 lines in your changes missing coverage. Please review.
✅ Project coverage is 37.27%. Comparing base (678c5cb) to head (7607b56).
⚠️ Report is 9 commits behind head on main.

Files with missing lines Patch % Lines
...le/organizations/policies/policy-edit.component.ts 0.00% 27 Missing ⚠️
...ies/vnext-organization-data-ownership.component.ts 0.00% 15 Missing ⚠️
...dmin-console/services/policy/policy-api.service.ts 0.00% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #16317      +/-   ##
==========================================
- Coverage   37.29%   37.27%   -0.03%     
==========================================
  Files        3374     3374              
  Lines       96759    96797      +38     
  Branches    14599    14605       +6     
==========================================
- Hits        36091    36084       -7     
- Misses      59090    59135      +45     
  Partials     1578     1578              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@JimmyVo16 JimmyVo16 marked this pull request as ready for review September 9, 2025 16:30
@JimmyVo16 JimmyVo16 requested a review from a team as a code owner September 9, 2025 16:30
@JimmyVo16 JimmyVo16 requested a review from jrmccannon September 9, 2025 16:30
@JimmyVo16 JimmyVo16 merged commit b76d437 into main Sep 10, 2025
114 checks passed
@JimmyVo16 JimmyVo16 deleted the ac/pm-24279/utilize-policy-vnext-endpoint branch September 10, 2025 14:32
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.

2 participants