Skip to content

fix: audit log event-post API update#869

Merged
shazron merged 1 commit intomasterfrom
update-audit-log-api-use
May 28, 2025
Merged

fix: audit log event-post API update#869
shazron merged 1 commit intomasterfrom
update-audit-log-api-use

Conversation

@shazron
Copy link
Copy Markdown
Member

@shazron shazron commented May 28, 2025

Description

Needs Deploy Service change in ACNA-3885.

Motivation and Context

  • Audit Log event-post API change.
  • We don't need to pass in projectId, workspaceId and workspaceName - this will be retrieved by the access token check for the namespace.
  • passing in the three parameters to the event is still fine for backwards compability, but they will be overridden

How Has This Been Tested?

  • aio plugins link . this PR branch
  • run a local version of the Deploy Service (ACNA-3885 PR branch), set AIO_DEPLOY_SERVICE_URL to http://localhost:3000
  • do an aio app deploy

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 28, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (e945fe6) to head (e61f596).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #869   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           57        57           
  Lines         3254      3251    -3     
  Branches       630       630           
=========================================
- Hits          3254      3251    -3     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@purplecabbage purplecabbage requested a review from Copilot May 28, 2025 23:26
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the audit log event-post API to no longer include the projectId, workspaceId, and workspaceName fields in the event payload since these values are now obtained via the access token namespace. Key changes include:

  • Removing projectId, workspaceId, and workspaceName from the audit log event object in src/lib/audit-logger.js.
  • Updating tests in test/commands/lib/audit-logger.test.js to reflect the new API behavior.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/lib/audit-logger.js Removed assignment and payload properties for project/workspace info.
test/commands/lib/audit-logger.test.js Removed expectations for project/workspace fields in audit event tests.

@shazron shazron merged commit 8db2d5d into master May 28, 2025
10 checks passed
@shazron shazron deleted the update-audit-log-api-use branch May 28, 2025 23:33
purplecabbage pushed a commit that referenced this pull request Nov 10, 2025
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.

5 participants