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-5966] Fix Entity Framework query for MySQL #5170

Merged
merged 7 commits into from
Jan 7, 2025

Conversation

JimmyVo16
Copy link
Contributor

@JimmyVo16 JimmyVo16 commented Dec 19, 2024

🎟️ Tracking

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

📔 Objective

Problem: The Entity Framework query was causing a compile-time error.

Changes:

  1. Fixed the query.
  2. Renamed the variable to replace the comment.

📸 Screenshots

Manual testing

Generated SQL query.
image

With results

image

⏰ 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

@JimmyVo16 JimmyVo16 requested a review from a team December 19, 2024 21:57
@JimmyVo16 JimmyVo16 self-assigned this Dec 19, 2024
@JimmyVo16 JimmyVo16 requested a review from r-tome December 19, 2024 21:57
Copy link

codecov bot commented Dec 19, 2024

Codecov Report

Attention: Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.

Project coverage is 43.69%. Comparing base (d924c67) to head (d49ba8b).
Report is 20 commits behind head on main.

Files with missing lines Patch % Lines
...ework/Repositories/OrganizationDomainRepository.cs 0.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5170      +/-   ##
==========================================
+ Coverage   43.34%   43.69%   +0.34%     
==========================================
  Files        1458     1469      +11     
  Lines       66517    67870    +1353     
  Branches     6081     6148      +67     
==========================================
+ Hits        28835    29658     +823     
- Misses      36390    36919     +529     
- Partials     1292     1293       +1     

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

Copy link
Contributor

github-actions bot commented Dec 19, 2024

Logo
Checkmarx One – Scan Summary & Details43c8a918-101b-49e8-b40b-7fd8169fb870

New Issues

Severity Issue Source File / Package Checkmarx Insight
MEDIUM Missing_HSTS_Header /src/Billing/Startup.cs: 35 Attack Vector

Fixed Issues

Severity Issue Source File / Package
MEDIUM CSRF /src/Api/Billing/Controllers/InvoicesController.cs: 16
MEDIUM CSRF /src/Api/Billing/Controllers/AccountsBillingController.cs: 83
LOW Log_Forging /src/Api/Billing/Controllers/OrganizationBillingController.cs: 256
LOW Log_Forging /src/Api/Billing/Controllers/OrganizationBillingController.cs: 256
LOW Log_Forging /src/Api/Billing/Controllers/OrganizationBillingController.cs: 256
LOW Log_Forging /src/Api/Auth/Controllers/AccountsController.cs: 713
LOW Log_Forging /src/Api/Billing/Controllers/OrganizationsController.cs: 110
LOW Log_Forging /src/Api/Auth/Controllers/AccountsController.cs: 713
LOW Log_Forging /src/Api/Auth/Controllers/AccountsController.cs: 639
LOW Log_Forging /src/Api/Billing/Controllers/OrganizationsController.cs: 110
LOW Log_Forging /src/Api/Auth/Controllers/AccountsController.cs: 639
LOW Log_Forging /src/Api/Auth/Controllers/AccountsController.cs: 639
LOW Log_Forging /src/Api/Auth/Controllers/AccountsController.cs: 713
LOW Log_Forging /src/Api/Billing/Controllers/OrganizationBillingController.cs: 166
LOW Log_Forging /src/Api/Billing/Controllers/OrganizationsController.cs: 110
LOW Log_Forging /src/Api/Billing/Controllers/ProviderBillingController.cs: 104
LOW Log_Forging /src/Api/Billing/Controllers/ProviderBillingController.cs: 104
LOW Log_Forging /src/Api/Billing/Controllers/OrganizationBillingController.cs: 166
LOW Log_Forging /src/Api/Billing/Controllers/ProviderBillingController.cs: 104
LOW Log_Forging /src/Api/Billing/Controllers/OrganizationBillingController.cs: 166
LOW Log_Forging /src/Api/Billing/Controllers/OrganizationsController.cs: 309
LOW Log_Forging /src/Api/Auth/Controllers/AccountsController.cs: 828
LOW Log_Forging /src/Api/Billing/Controllers/OrganizationsController.cs: 110
LOW Log_Forging /src/Api/Auth/Controllers/AccountsController.cs: 828
LOW Log_Forging /src/Api/Billing/Controllers/OrganizationsController.cs: 309
LOW Log_Forging /src/Api/Billing/Controllers/OrganizationsController.cs: 110
LOW Log_Forging /src/Api/Billing/Controllers/OrganizationsController.cs: 309
LOW Log_Forging /src/Api/Auth/Controllers/AccountsController.cs: 828
LOW Log_Forging /src/Api/Billing/Controllers/OrganizationsController.cs: 110
LOW Log_Forging /src/Api/Billing/Controllers/InvoicesController.cs: 17
LOW Log_Forging /src/Api/Billing/Controllers/InvoicesController.cs: 20
LOW Log_Forging /src/Api/Billing/Controllers/InvoicesController.cs: 17
LOW Log_Forging /src/Api/Billing/Controllers/InvoicesController.cs: 17
LOW Log_Forging /src/Api/Billing/Controllers/InvoicesController.cs: 20
LOW Log_Forging /src/Api/Billing/Controllers/InvoicesController.cs: 20
LOW Log_Forging /src/Api/Billing/Controllers/AccountsBillingController.cs: 83
LOW Log_Forging /src/Api/Billing/Controllers/AccountsBillingController.cs: 83
LOW Log_Forging /src/Api/Billing/Controllers/AccountsBillingController.cs: 83
LOW Log_Forging /src/Api/AdminConsole/Controllers/OrganizationsController.cs: 170
LOW Log_Forging /src/Api/AdminConsole/Controllers/OrganizationsController.cs: 185
LOW Log_Forging /src/Api/Billing/Controllers/OrganizationBillingController.cs: 166

Copy link
Contributor

@r-tome r-tome left a comment

Choose a reason for hiding this comment

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

It looks good to me but it would be ideal to have the integration test

@holow29
Copy link
Contributor

holow29 commented Dec 20, 2024

Looks like this should resolve #3722. Funny to see it resolved because of a compilation issue vs. the longstanding pre-existing issue.

@JimmyVo16 JimmyVo16 requested a review from a team as a code owner December 20, 2024 21:49
@JimmyVo16 JimmyVo16 requested a review from r-tome December 20, 2024 21:49
r-tome
r-tome previously approved these changes Jan 2, 2025
- Replace incorrect models to simplify compatibility with the stored proc.

- Fix logic issues and update tests to ensure consistency between stored proc and Entity Framework.
@eliykat eliykat linked an issue Jan 7, 2025 that may be closed by this pull request
1 task
@JimmyVo16 JimmyVo16 merged commit 0e801ca into main Jan 7, 2025
56 checks passed
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.

Organization domain maintenance failed because of untranslated query
3 participants