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

[PM-12747] Move CollectionService and models to AC Team #11278

Merged
merged 13 commits into from
Oct 8, 2024

Conversation

eliykat
Copy link
Member

@eliykat eliykat commented Sep 27, 2024

🎟️ Tracking

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

📔 Objective

Move CollectionService and associated models into @bitwarden/admin-console/common.

I also took the opportunity to rename the implementation to DefaultCollectionService per our current naming convention, and drop the Abstraction alias where it was used.

📸 Screenshots

⏰ 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

Copy link
Contributor

github-actions bot commented Sep 27, 2024

Logo
Checkmarx One – Scan Summary & Details7019047e-4f38-4a2a-9e09-92b6503e812d

No New Or Fixed Issues Found

Copy link

codecov bot commented Sep 27, 2024

Codecov Report

Attention: Patch coverage is 50.00000% with 39 lines in your changes missing coverage. Please review.

Project coverage is 33.18%. Comparing base (bf042ef) to head (d459031).
Report is 5 commits behind head on main.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
apps/browser/src/background/main.background.ts 0.00% 2 Missing ⚠️
apps/browser/src/popup/services/services.module.ts 0.00% 1 Missing ⚠️
...assign-collections/assign-collections.component.ts 0.00% 1 Missing ⚠️
...vault/popup/components/vault/add-edit.component.ts 0.00% 1 Missing ⚠️
...lt/popup/components/vault/collections.component.ts 0.00% 1 Missing ⚠️
...rc/vault/popup/components/vault/share.component.ts 0.00% 1 Missing ⚠️
...lt/popup/components/vault/vault-items.component.ts 0.00% 1 Missing ⚠️
apps/cli/src/commands/edit.command.ts 0.00% 1 Missing ⚠️
apps/cli/src/commands/get.command.ts 0.00% 1 Missing ⚠️
apps/cli/src/commands/list.command.ts 0.00% 1 Missing ⚠️
... and 28 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #11278      +/-   ##
==========================================
- Coverage   33.28%   33.18%   -0.10%     
==========================================
  Files        2741     2772      +31     
  Lines       85810    86061     +251     
  Branches    16367    16394      +27     
==========================================
+ Hits        28559    28561       +2     
- Misses      54987    55235     +248     
- Partials     2264     2265       +1     

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

Copy link
Contributor

@djsmith85 djsmith85 left a comment

Choose a reason for hiding this comment

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

Could you please add @bitwarden/admin-console/common as a dependency to the package.json-files for libs/importer, libs/tools/vault-export-core and libs/tools/vault-export-ui. This is currently not enforced nor used, but in preparation to move to something like https://nx.dev/ for building packages within our monorepo.

Base automatically changed from ac/ac-3062/clients-move-collectionadminservice-to-ac-team to main October 1, 2024 22:07
@eliykat eliykat force-pushed the ac/pm-12747/clients-move-collectionservice-to-ac-team branch from 3ffaa7c to 4610e65 Compare October 1, 2024 22:51
@eliykat eliykat marked this pull request as ready for review October 1, 2024 23:36
@eliykat eliykat requested review from a team as code owners October 1, 2024 23:36
@eliykat eliykat enabled auto-merge (squash) October 1, 2024 23:37
Copy link
Contributor

@JaredSnider-Bitwarden JaredSnider-Bitwarden left a comment

Choose a reason for hiding this comment

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

Auth changes look good!

@@ -19,6 +19,7 @@
},
"dependencies": {
"@bitwarden/common": "file:../common",
"@bitwarden/vault-export-core": "file:../tools/export/vault-export/vault-export-core"
"@bitwarden/vault-export-core": "file:../tools/export/vault-export/vault-export-core",
"@bitwarden/admin-console-common": "file:../admin-console/src/common"
Copy link
Contributor

@djsmith85 djsmith85 Oct 2, 2024

Choose a reason for hiding this comment

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

@eliykat:
This package-name differs from the actually used package-name (@bitwarden/admin-console/common). Same issue applies to the vault-export package.json files. The one used here is a valid package name. I hadn't caught that with your previous PR. While working on the exporters I ran into a similar issue with @bitwarden/vault-export/core and @bitwarden/vault-export/ui. These are invalid package names.

libs/admin-console does not export the common-folder as it's own package. It's only achieved by deeplinking within the tsconfigs. Should libs/admin-console/commonbe a it's own package or should it just be exported via @bitwarden/admin-console ?

I'm still fine with approving this, to not block the ownership move, but would like to request a follow-up ticket to look into a naming and packaging scheme for libs/admin-console.

The tools-team has chosen to separate their packages by features so we can easily build what we need and also only depend on things we need. We are obviously fortunate that our ownership splits up so nicely, which isn't as easy for the other teams. Collections for example are a very commonly used entity and overlap into a ton of domains.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll hit you up on Slack to discuss this further!

djsmith85
djsmith85 previously approved these changes Oct 2, 2024
Copy link
Contributor

@djsmith85 djsmith85 left a comment

Choose a reason for hiding this comment

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

I went ahead and fixed any issues with incorrect import-paths (admin-console/src/common)

Jingo88
Jingo88 previously approved these changes Oct 2, 2024
jrmccannon
jrmccannon previously approved these changes Oct 2, 2024
justindbaur
justindbaur previously approved these changes Oct 3, 2024
djsmith85
djsmith85 previously approved these changes Oct 3, 2024
djsmith85
djsmith85 previously approved these changes Oct 3, 2024
Jingo88
Jingo88 previously approved these changes Oct 4, 2024
jrmccannon
jrmccannon previously approved these changes Oct 7, 2024
@eliykat eliykat merged commit 7c72795 into main Oct 8, 2024
65 of 66 checks passed
@eliykat eliykat deleted the ac/pm-12747/clients-move-collectionservice-to-ac-team branch October 8, 2024 14:14
@addisonbeck
Copy link
Contributor

🥳

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.

7 participants