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(auth-api): Add audit logs to index with alsoLog set to true for server logs #16203

Merged
merged 4 commits into from
Sep 29, 2024

Conversation

saevarma
Copy link
Member

@saevarma saevarma commented Sep 28, 2024

What

Adding audit logs when

  • Reindexing
  • Manually creating/removing index records from system events

Why

To be able to track changes made to the index during multiple scenarios of updates.

Screenshots / Gifs

N/A

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

Release Notes

  • New Features

    • Enhanced delegation record management by including user context in delegation creation, removal, and indexing processes.
    • Added auditing and logging capabilities for delegation actions to improve tracking and accountability.
  • Bug Fixes

    • Resolved issues related to delegation indexing by ensuring user information is consistently passed to relevant methods.

These changes improve the overall functionality and user experience when managing delegation records.

@saevarma saevarma requested review from a team as code owners September 28, 2024 13:25
Copy link
Contributor

coderabbitai bot commented Sep 28, 2024

Walkthrough

The changes in this pull request involve updates to several classes and methods across different files, primarily focusing on the inclusion of additional parameters, specifically auth and user, in various method signatures related to delegation handling. These modifications aim to enhance the functionality of delegation operations by allowing more contextual information to be passed during method calls, affecting how delegation records are created, updated, and removed.

Changes

File Change Summary
apps/services/auth/delegation-api/src/app/delegations/delegation-index.controller.ts Updated createOrUpdateDelegationRecord and removeDelegationRecord methods to include an auth parameter.
apps/services/auth/delegation-api/src/app/delegations/test/delegation-index/delegation-index.service.spec.ts Modified test cases to include a user parameter in indexCustomDelegations and indexRepresentativeDelegations method calls.
apps/services/auth/personal-representative/src/app/modules/personalRepresentatives/personalRepresentatives.controller.ts Added user parameter to indexRepresentativeDelegations method calls in delete and create methods.
libs/auth-api-lib/src/lib/delegations/admin/delegation-admin-custom.service.ts Updated indexDelegations method to accept an auth parameter and modified internal calls to include user.
libs/auth-api-lib/src/lib/delegations/delegation-scope.service.ts Changed findDistrictCommissionersRegistryScopesTo method to accept a User object instead of a toNationalId string, updating internal logic accordingly.
libs/auth-api-lib/src/lib/delegations/delegations-incoming.service.ts Added user parameter to removeDelegationRecord method call.
libs/auth-api-lib/src/lib/delegations/delegations-index.service.ts Updated several method signatures to include an auth parameter, enhancing delegation indexing and auditing capabilities.
libs/auth-api-lib/src/lib/delegations/delegations-outgoing.service.ts Added user parameter to indexCustomDelegations and notifyDelegationUpdate method calls, incorporating user context into delegation processes.

Possibly related PRs

Suggested labels

automerge, high priority

Suggested reviewers

  • GunnlaugurG

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.

@saevarma saevarma added the automerge Merge this PR as soon as all checks pass label Sep 28, 2024
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 8

🧹 Outside diff range and nitpick comments (12)
apps/services/auth/delegation-api/src/app/delegations/delegation-index.controller.ts (2)

96-103: LGTM! Consider destructuring for improved readability.

The addition of the auth parameter to the createOrUpdateDelegationRecord method call is appropriate and aligns with the PR objectives to enhance auditing capabilities. This change maintains consistency with the updated method signature and adheres to NestJS best practices.

For improved readability, consider destructuring the object passed to createOrUpdateDelegationRecord. Here's a suggested refactor:

 this.delegationIndexService.createOrUpdateDelegationRecord(
-  {
-    ...parsedDelegationInfo,
-    provider: auth.delegationProvider,
-    validTo: body.validTo,
-  },
-  auth,
+  {
+    ...parsedDelegationInfo,
+    provider: auth.delegationProvider,
+    validTo: body.validTo,
+    auth,
+  },
 ),

This change combines the two arguments into a single object, which can make the code more maintainable if additional parameters are added in the future.


132-138: LGTM! Consider destructuring for improved readability.

The addition of the auth parameter to the removeDelegationRecord method call is appropriate and aligns with the PR objectives to enhance auditing capabilities. This change maintains consistency with the updated method signature and adheres to NestJS best practices.

For improved readability and consistency with the previous suggestion, consider destructuring the object passed to removeDelegationRecord. Here's a suggested refactor:

 this.delegationIndexService.removeDelegationRecord(
-  {
-    ...parsedDelegationInfo,
-    provider: auth.delegationProvider,
-  },
-  auth,
+  {
+    ...parsedDelegationInfo,
+    provider: auth.delegationProvider,
+    auth,
+  },
 ),

This change combines the two arguments into a single object, which can make the code more maintainable if additional parameters are added in the future and maintains consistency with the createOrUpdateDelegationRecord method.

apps/services/auth/personal-representative/src/app/modules/personalRepresentatives/personalRepresentatives.controller.ts (2)

139-139: LGTM! Consider adding a comment for clarity.

The addition of the user parameter to indexRepresentativeDelegations aligns with the PR objectives and enhances the auditing capabilities. This change provides more context for indexing operations, which is a good practice.

Consider adding a brief comment explaining the purpose of passing the user parameter, for consistency with other parts of the codebase and to improve maintainability. For example:

// Pass user context for audit logging during indexing
void this.delegationIndexService.indexRepresentativeDelegations(
  deletedPersonalRepresentative.nationalIdPersonalRepresentative,
  user,
)

208-208: LGTM! Consider adding a comment for clarity.

The addition of the user parameter to indexRepresentativeDelegations in the create method is consistent with the change in the delete method. This maintains consistency across the controller and enhances the auditing capabilities as per the PR objectives.

For consistency and improved maintainability, consider adding a brief comment explaining the purpose of passing the user parameter, similar to the suggestion for the delete method. For example:

// Pass user context for audit logging during indexing
void this.delegationIndexService.indexRepresentativeDelegations(
  createdPersonalRepresentative.nationalIdPersonalRepresentative,
  user,
)
libs/auth-api-lib/src/lib/delegations/delegations-incoming.service.ts (1)

305-313: LGTM! Consider adding a comment for clarity.

The addition of the user parameter to the removeDelegationRecord method call is a good improvement. It aligns with the PR objectives of enhancing auditing capabilities by providing more context when removing delegation records.

Consider adding a brief comment explaining why the user parameter is now included, to improve code readability and maintain consistency with the rest of the codebase. For example:

// Include user information for audit logging purposes
void this.delegationsIndexService.removeDelegationRecord(
  {
    fromNationalId,
    toNationalId: user.nationalId,
    type: AuthDelegationType.LegalRepresentative,
    provider: AuthDelegationProvider.DistrictCommissionersRegistry,
  },
  user,
)
libs/auth-api-lib/src/lib/delegations/delegations-outgoing.service.ts (5)

276-276: LGTM! Consider adding a comment for consistency.

The addition of the user parameter to indexCustomDelegations is appropriate and aligns with the PR objectives. It enhances the auditing capabilities by providing user context during indexing.

For consistency with other asynchronous operations in this file, consider adding a comment explaining why we're using void here:

// Fire and forget: Index custom delegations for the toNationalId
void this.delegationIndexService.indexCustomDelegations(
  createDelegation.toNationalId,
  user,
)

422-422: LGTM! Consider adding a comment for consistency.

The addition of the user parameter to indexCustomDelegations in the patch method is appropriate and consistent with the previous change in the create method. It further enhances the auditing capabilities by providing user context during indexing for patch operations.

For consistency, consider adding a comment explaining the use of void here as well:

// Fire and forget: Index custom delegations for the toNationalId
void this.delegationIndexService.indexCustomDelegations(
  delegation.toNationalId,
  user,
)

427-428: LGTM! Consider adding a comment for clarity.

The addition of void before this.notifyDelegationUpdate is consistent with the treatment of other asynchronous operations in this file. The blank line improves readability by separating this operation from the previous code block.

For clarity and consistency with other asynchronous operations, consider adding a comment explaining the use of void:

// Fire and forget: Notify delegation update
void this.notifyDelegationUpdate(user, delegation, hasExistingScopes)

463-463: LGTM! Consider adding a comment for consistency.

The addition of the user parameter to indexCustomDelegations in the delete method is appropriate and consistent with the previous changes in the create and patch methods. It further enhances the auditing capabilities by providing user context during indexing for delete operations.

For consistency, consider adding a comment explaining the use of void here as well:

// Fire and forget: Index custom delegations for the toNationalId
void this.delegationIndexService.indexCustomDelegations(
  delegation.toNationalId,
  user,
)

Line range hint 1-515: Overall, the changes enhance auditing capabilities and maintain consistency.

The modifications to the DelegationsOutgoingService class successfully implement the PR objectives by adding user context to the indexCustomDelegations method calls in the create, patch, and delete methods. This enhancement improves the auditing capabilities of the system during delegation operations.

The changes adhere to the coding guidelines for files in the libs directory, maintaining reusability and consistency across different NextJS apps. The use of TypeScript for defining props and exporting types is preserved.

To further improve the code:

  1. Consider extracting the indexCustomDelegations calls into a separate private method within the service to reduce code duplication and improve maintainability.
  2. If the user parameter is consistently required for auditing purposes, consider updating the indexCustomDelegations method signature in the DelegationIndexService to include it as a mandatory parameter.
libs/auth-api-lib/src/lib/delegations/delegation-scope.service.ts (2)

325-333: Include error details in logs for improved debugging

In the catch block, the logged error message does not include the actual error details. Including the error object can provide more context and aid in debugging issues.

Apply this diff to include the error in the log:

      } catch (error) {
  -     logger.error(
  -       `Failed checking if delegation exists at provider '${AuthDelegationProvider.DistrictCommissionersRegistry}'`,
  -     )
  +     logger.error(
  +       `Failed checking if delegation exists at provider '${AuthDelegationProvider.DistrictCommissionersRegistry}': ${error.message}`,
  +       { error },
  +     )
        return []
      }

313-333: Update function documentation to reflect new parameter

The method findDistrictCommissionersRegistryScopesTo now accepts a User object instead of a toNationalId string. Ensure that any accompanying documentation or comments are updated to reflect this change, enhancing code readability and maintainability.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between cb65af3 and 5282080.

📒 Files selected for processing (8)
  • apps/services/auth/delegation-api/src/app/delegations/delegation-index.controller.ts (2 hunks)
  • apps/services/auth/delegation-api/src/app/delegations/test/delegation-index/delegation-index.service.spec.ts (3 hunks)
  • apps/services/auth/personal-representative/src/app/modules/personalRepresentatives/personalRepresentatives.controller.ts (3 hunks)
  • libs/auth-api-lib/src/lib/delegations/admin/delegation-admin-custom.service.ts (4 hunks)
  • libs/auth-api-lib/src/lib/delegations/delegation-scope.service.ts (3 hunks)
  • libs/auth-api-lib/src/lib/delegations/delegations-incoming.service.ts (1 hunks)
  • libs/auth-api-lib/src/lib/delegations/delegations-index.service.ts (7 hunks)
  • libs/auth-api-lib/src/lib/delegations/delegations-outgoing.service.ts (3 hunks)
🧰 Additional context used
📓 Path-based instructions (8)
apps/services/auth/delegation-api/src/app/delegations/delegation-index.controller.ts (2)

Pattern apps/services/**/*: "Confirm that the code adheres to the following:

  • NestJS architecture, including modules, services, and controllers.
  • Dependency injection patterns and service encapsulation.
  • Integration and unit testing coverage and practices."

Pattern apps/**/*: "Confirm that the code adheres to the following:

  • NextJS best practices, including file structure, API routes, and static generation methods.
  • Efficient state management and server-side rendering techniques.
  • Optimal use of TypeScript for component and utility type safety."
apps/services/auth/delegation-api/src/app/delegations/test/delegation-index/delegation-index.service.spec.ts (2)

Pattern apps/services/**/*: "Confirm that the code adheres to the following:

  • NestJS architecture, including modules, services, and controllers.
  • Dependency injection patterns and service encapsulation.
  • Integration and unit testing coverage and practices."

Pattern apps/**/*: "Confirm that the code adheres to the following:

  • NextJS best practices, including file structure, API routes, and static generation methods.
  • Efficient state management and server-side rendering techniques.
  • Optimal use of TypeScript for component and utility type safety."
apps/services/auth/personal-representative/src/app/modules/personalRepresentatives/personalRepresentatives.controller.ts (2)

Pattern apps/services/**/*: "Confirm that the code adheres to the following:

  • NestJS architecture, including modules, services, and controllers.
  • Dependency injection patterns and service encapsulation.
  • Integration and unit testing coverage and practices."

Pattern apps/**/*: "Confirm that the code adheres to the following:

  • NextJS best practices, including file structure, API routes, and static generation methods.
  • Efficient state management and server-side rendering techniques.
  • Optimal use of TypeScript for component and utility type safety."
libs/auth-api-lib/src/lib/delegations/admin/delegation-admin-custom.service.ts (1)

Pattern libs/**/*: "Confirm that the code adheres to the following:

  • Reusability of components and hooks across different NextJS apps.
  • TypeScript usage for defining props and exporting types.
  • Effective tree-shaking and bundling practices."
libs/auth-api-lib/src/lib/delegations/delegation-scope.service.ts (1)

Pattern libs/**/*: "Confirm that the code adheres to the following:

  • Reusability of components and hooks across different NextJS apps.
  • TypeScript usage for defining props and exporting types.
  • Effective tree-shaking and bundling practices."
libs/auth-api-lib/src/lib/delegations/delegations-incoming.service.ts (1)

Pattern libs/**/*: "Confirm that the code adheres to the following:

  • Reusability of components and hooks across different NextJS apps.
  • TypeScript usage for defining props and exporting types.
  • Effective tree-shaking and bundling practices."
libs/auth-api-lib/src/lib/delegations/delegations-index.service.ts (1)

Pattern libs/**/*: "Confirm that the code adheres to the following:

  • Reusability of components and hooks across different NextJS apps.
  • TypeScript usage for defining props and exporting types.
  • Effective tree-shaking and bundling practices."
libs/auth-api-lib/src/lib/delegations/delegations-outgoing.service.ts (1)

Pattern libs/**/*: "Confirm that the code adheres to the following:

  • Reusability of components and hooks across different NextJS apps.
  • TypeScript usage for defining props and exporting types.
  • Effective tree-shaking and bundling practices."
🔇 Additional comments (11)
apps/services/auth/delegation-api/src/app/delegations/delegation-index.controller.ts (1)

Line range hint 1-142: Overall assessment: Changes are well-implemented and align with project goals.

The modifications to the DelegationIndexController class successfully enhance the auditing capabilities of the system by including the auth parameter in relevant method calls. The changes are consistent with the PR objectives and adhere to NestJS architecture and best practices.

Key points:

  1. Both createOrUpdateDelegationRecord and removeDelegationRecord methods have been updated to include the auth parameter.
  2. The changes maintain the existing architecture and dependency injection patterns.
  3. Minor suggestions for code readability have been provided to further improve the implementation.

The implementation effectively addresses the goal of adding audit logs during specific operations related to indexing, improving the overall transparency and accountability of the system's operations.

apps/services/auth/personal-representative/src/app/modules/personalRepresentatives/personalRepresentatives.controller.ts (1)

Line range hint 1-214: Overall, the changes look good. Verify the impact on related components.

The modifications to both the delete and create methods enhance the auditing capabilities by passing the user context to the indexRepresentativeDelegations method. These changes align well with the PR objectives and follow NestJS best practices.

To ensure the changes don't have unintended consequences, please run the following verification script:

This script will help ensure that the DelegationsIndexService has been updated to handle the new user parameter and that all calls to indexRepresentativeDelegations across the codebase include the user parameter.

apps/services/auth/delegation-api/src/app/delegations/test/delegation-index/delegation-index.service.spec.ts (4)

454-454: LGTM: User parameter added to indexCustomDelegations call

The addition of the user parameter to the indexCustomDelegations method call is consistent with the broader update to include user context in delegation operations. This change enhances the method's capability to handle user-specific information during custom delegation indexing.


483-486: LGTM: User parameter added and improved readability

The addition of the user parameter to the indexRepresentativeDelegations method call is consistent with the previous changes. The multi-line format improves readability and makes it easier to add more parameters in the future if needed. This change enhances the method's capability to handle user-specific information during representative delegation indexing.


631-631: LGTM: Consistent application of user parameter

The addition of the user parameter to the indexCustomDelegations method call in this test case is consistent with the previous changes. This demonstrates a thorough update across different test scenarios, ensuring that the new user context is properly tested in various situations.


Line range hint 1-631: Consider adding specific tests for the new user parameter functionality

The changes to include the user parameter in various method calls have been consistently applied throughout the test file. This is a good practice and aligns with the PR objectives. However, to ensure comprehensive test coverage, consider adding specific test cases that verify the behavior of these methods with different user contexts.

To help identify areas where additional tests might be beneficial, you can run the following script:

This script will help you identify methods that now accept a user parameter and compare them with existing test cases, potentially revealing areas where additional tests could be beneficial.

✅ Verification successful

To proceed with verifying the need for additional tests, please run the following script:


User Parameter Functionality is Adequately Tested

The methods that accept the user parameter are appropriately covered by existing test cases. No additional tests are necessary at this time.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Identify methods that now accept a user parameter but may lack specific tests for this new functionality.

# Search for method definitions that include a user parameter
echo "Methods that now accept a user parameter:"
rg --type typescript "async.*\(.*user.*\)" apps/services/auth/delegation-api/src/app/delegations

# Search for existing test cases that use these methods with the user parameter
echo "\nExisting test cases using methods with user parameter:"
rg --type typescript "await.*\(.*user.*\)" apps/services/auth/delegation-api/src/app/delegations/test

# Compare the results to identify methods that might need additional test coverage

Length of output: 488


Script:

#!/bin/bash
# Description: Identify methods that now accept a user parameter but may lack specific tests for this new functionality.

# Search for method definitions that include a user parameter
echo "Methods that now accept a user parameter:"
rg --type ts "async.*\(.*user.*\)" apps/services/auth/delegation-api/src/app/delegations

# Search for existing test cases that use these methods with the user parameter
echo "\nExisting test cases using methods with user parameter:"
rg --type ts "await.*\(.*user.*\)" apps/services/auth/delegation-api/src/app/delegations/test

Length of output: 3921

libs/auth-api-lib/src/lib/delegations/admin/delegation-admin-custom.service.ts (2)

8-8: Importing 'Auth' and 'User' types

The addition of Auth and User imports is appropriate, as these types are utilized in the updated method signatures.


270-275: Ensure correct usage of 'auth' parameter in 'indexDelegations' method

The indexDelegations method now accepts auth: Auth and passes it to the delegation indexing services. Confirm that when indexDelegations is called elsewhere, the provided auth parameter contains the necessary authentication information required by delegationIndexService.

libs/auth-api-lib/src/lib/delegations/delegation-scope.service.ts (3)

31-31: Import 'User' type for updated method signatures

The import statement correctly includes the User type from '@island.is/auth-nest-tools', which is necessary for the updated method signatures that now accept a User object.


313-333: Confirm TypeScript types for function parameters

Using TypeScript for defining function parameters is a good practice. Confirm that the User type correctly represents the expected structure and that all properties used (e.g., user.nationalId) are properly typed.


436-436: Verify all calls are updated to pass 'user' instead of 'toNationalId'

Ensure that all calls to findDistrictCommissionersRegistryScopesTo have been updated to pass the user object instead of toNationalId as the first parameter. This is crucial to maintain consistency after changing the method signature.

Run the following script to check for any outdated calls:

@saevarma saevarma removed the request for review from programm-ingovals September 28, 2024 13:33
Copy link

codecov bot commented Sep 28, 2024

Codecov Report

Attention: Patch coverage is 88.88889% with 3 lines in your changes missing coverage. Please review.

Project coverage is 36.71%. Comparing base (c14f868) to head (c1bbbd4).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...b/src/lib/delegations/delegations-index.service.ts 89.47% 2 Missing ⚠️
...ib/src/lib/delegations/delegation-scope.service.ts 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main   #16203   +/-   ##
=======================================
  Coverage   36.70%   36.71%           
=======================================
  Files        6778     6776    -2     
  Lines      139601   139599    -2     
  Branches    39687    39686    -1     
=======================================
+ Hits        51243    51248    +5     
+ Misses      88358    88351    -7     
Flag Coverage Δ
api 3.39% <ø> (ø)
api-domains-auth-admin 48.77% <ø> (ø)
application-system-api 41.62% <ø> (ø)
application-template-api-modules 23.71% <ø> (+0.01%) ⬆️
services-auth-admin-api 51.97% <37.03%> (+0.01%) ⬆️
services-auth-delegation-api 57.94% <62.96%> (+0.08%) ⬆️
services-auth-ids-api 51.86% <33.33%> (+<0.01%) ⬆️
services-auth-personal-representative 45.52% <18.51%> (+0.01%) ⬆️
services-auth-personal-representative-public 41.59% <14.81%> (+<0.01%) ⬆️
services-auth-public-api 49.27% <18.51%> (+0.01%) ⬆️
services-user-notification 47.13% <ø> (+0.02%) ⬆️
services-user-profile 62.30% <ø> (ø)

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

Files with missing lines Coverage Δ
...src/app/delegations/delegation-index.controller.ts 93.75% <ø> (ø)
...resentatives/personalRepresentatives.controller.ts 90.56% <ø> (ø)
...legations/admin/delegation-admin-custom.service.ts 90.47% <100.00%> (ø)
...rc/lib/delegations/delegations-incoming.service.ts 97.58% <100.00%> (ø)
...rc/lib/delegations/delegations-outgoing.service.ts 95.23% <100.00%> (ø)
...ib/src/lib/delegations/delegation-scope.service.ts 91.07% <0.00%> (ø)
...b/src/lib/delegations/delegations-index.service.ts 87.01% <89.47%> (-0.10%) ⬇️

... and 3 files 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 c14f868...c1bbbd4. Read the comment docs.

@datadog-island-is
Copy link

datadog-island-is bot commented Sep 28, 2024

Datadog Report

All test runs 264c04d 🔗

13 Total Test Services: 0 Failed, 13 Passed
🔻 Test Sessions change in coverage: 1 decreased (-0.02%), 2 increased, 21 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
api 0 0 0 4 0 2.68s 1 no change Link
api-domains-auth-admin 0 0 0 18 0 12.04s 1 no change Link
application-system-api 0 0 0 111 2 3m 3.15s 1 no change Link
application-template-api-modules 0 0 0 109 0 1m 55.6s 1 no change Link
auth-api-lib 0 0 0 20 0 30.68s 1 no change Link
services-auth-admin-api 0 0 0 125 0 3m 3.53s 1 no change Link
services-auth-delegation-api 0 0 0 256 0 2m 40.95s 1 increased (+0.02%) Link
services-auth-personal-representative 0 0 0 59 0 1m 19.91s 1 increased (+0.04%) Link
services-auth-personal-representative-public 0 0 0 10 0 26.56s 1 no change Link
services-auth-public-api 0 0 0 35 0 23.74s 1 no change Link

🔻 Code Coverage Decreases vs Default Branch (1)

  • services-user-profile - jest 52.72% (-0.02%) - Details

@kodiakhq kodiakhq bot merged commit d399cd8 into main Sep 29, 2024
49 checks passed
@kodiakhq kodiakhq bot deleted the delegation-index-logging branch September 29, 2024 21:40
thoreyjona pushed a commit that referenced this pull request Oct 2, 2024
…erver logs (#16203)

* Adding audit log to delegationIndex saveToIndex method to track changes to users delegations records in the index.

* Add audit to create and remove in index service.

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Merge this PR as soon as all checks pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants