ansible / eda-server

Event Driven Ansible for AAP
Apache License 2.0
66 stars 42 forks source link

feat: Add CRUD log messages #1005

Closed zkayyali812 closed 1 month ago

zkayyali812 commented 1 month ago

Description: Adds CRUD logging messages to core EDA resources. Jira: https://issues.redhat.com/browse/AAP-29258

Rulebook Activations Logging added for following operations-

  1. Create
  2. Read
  3. Update
  4. Delete
  5. ListActivations
  6. Enable
  7. Disable
  8. Restart

Decision Environments Logging added for following operations-

  1. Create
  2. Read
  3. Update
  4. Delete

Project Logging added for following operations-

  1. Create
  2. Read
  3. Update
  4. Delete
  5. Sync

EventStreams Logging added for following operations -

  1. Create
  2. Read
  3. Update
  4. Delete
  5. List
  6. ListActivations

Rulebook Activation Start/Stop/Restart (Already exists)

  1. Activation Start
    1. Has many log messsages including various statuses an activation may hit
  2. Activation Stop
  3. Activation Restart
  4. Activation Delete
mkanoor commented 1 month ago

@zkayyali812 Would it be possible to use a separate package like this one https://github.com/jjkester/django-auditlog

zkayyali812 commented 1 month ago

@mkanoor Preferably for event 1, we should keep this change simple to avoid any potential changes to our downstream build. For this reason, this PR uses just the simple logger.

I expect if we used an alternate library here, there could be potential of downstream impact. For event 2 the plan is to revisit this to implement a more robust logging/auditing solution.

zkayyali812 commented 1 month ago

e2e tests now pass without read enabled. Will test again with read enabled.

sonarcloud[bot] commented 1 month ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud