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-14381] Add POST /tasks/bulk-create endpoint #5188

Open
wants to merge 62 commits into
base: main
Choose a base branch
from

Conversation

gbubemismith
Copy link
Member

@gbubemismith gbubemismith commented Dec 23, 2024

🎟️ Tracking

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

📔 Objective

Admin endpoint to bulk create new tasks on the Access Intelligence page. Should accept a list of CipherIdsand the TaskType.

📸 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

shane-melton and others added 30 commits December 5, 2024 17:03
@@ -0,0 +1,9 @@
CREATE TYPE [dbo].[SecurityTaskType] AS TABLE(
[Id] UNIQUEIDENTIFIER NOT NULL,
Copy link
Contributor

Choose a reason for hiding this comment

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

We are trying to avoid custom data types that will need sql changes per schema changes.
The preference is to use the existing generic guidarray for bulk operations
CREATE TYPE [dbo].[GuidIdArray] AS TABLE(
[Id] [uniqueidentifier] NOT NULL
)

@gbubemismith gbubemismith requested a review from rkac-bw January 27, 2025 21:32
Copy link
Member

@shane-melton shane-melton 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, nice work! Just some left over code I think we can clean up.

shane-melton
shane-melton previously approved these changes Jan 28, 2025
Copy link
Member

@shane-melton shane-melton 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 to go!!

rkac-bw
rkac-bw previously approved these changes Jan 28, 2025
Copy link
Contributor

@rkac-bw rkac-bw left a comment

Choose a reason for hiding this comment

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

LGTM


public class SecurityTaskCreateRequest
{
[JsonConverter(typeof(JsonStringEnumConverter))]
Copy link
Member

Choose a reason for hiding this comment

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

⚠️ This now differs slightly from the request model in your client PR.

I think we can remove the JsonConverter and make the CipherId nullable?

Copy link
Member

@shane-melton shane-melton left a comment

Choose a reason for hiding this comment

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

Nice work!

Copy link
Contributor

@rkac-bw rkac-bw 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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants