Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat: add audit diffing for all user editable types #1413

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

Merged
merged 2 commits into from
May 16, 2022

Conversation

coadler
Copy link
Contributor

@coadler coadler commented May 12, 2022

Resolves #467
Resolves #476

Adds the rest of the database types that are directly editable by users to the audit table. It also adds tests for each type to ensure the audit information is kept up-to-date.

@coadler coadler self-assigned this May 12, 2022
@codecov
Copy link

codecov bot commented May 12, 2022

Codecov Report

Merging #1413 (2dba7ed) into main (75a5877) will increase coverage by 0.15%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #1413      +/-   ##
==========================================
+ Coverage   67.08%   67.24%   +0.15%     
==========================================
  Files         282      287       +5     
  Lines       19008    19233     +225     
  Branches      241      241              
==========================================
+ Hits        12752    12933     +181     
- Misses       4935     4967      +32     
- Partials     1321     1333      +12     
Flag Coverage Δ
unittest-go-macos-latest 54.33% <100.00%> (?)
unittest-go-postgres- 65.75% <100.00%> (-0.03%) ⬇️
unittest-go-ubuntu-latest 56.59% <100.00%> (+0.04%) ⬆️
unittest-go-windows-2022 52.61% <100.00%> (?)
unittest-js 74.65% <ø> (ø)
Impacted Files Coverage Δ
coderd/audit/table.go 77.77% <ø> (ø)
coderd/audit/diff.go 88.88% <100.00%> (+2.32%) ⬆️
provisionersdk/serve.go 35.13% <0.00%> (-8.11%) ⬇️
cli/cliui/provisionerjob.go 76.42% <0.00%> (-2.15%) ⬇️
provisionerd/provisionerd.go 75.50% <0.00%> (-1.88%) ⬇️
coderd/provisionerdaemons.go 63.81% <0.00%> (ø)
pty/start_windows.go 66.95% <0.00%> (ø)
pty/pty_windows.go 70.14% <0.00%> (ø)
agent/usershell/usershell_darwin.go 100.00% <0.00%> (ø)
... and 11 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 75a5877...2dba7ed. Read the comment docs.

@coadler coadler requested a review from kylecarbs May 12, 2022 21:10
@misskniss misskniss added this to the V2 Beta milestone May 15, 2022
@coadler coadler force-pushed the colin/audit-all-types branch from 65de9ba to a17dafc Compare May 16, 2022 15:54
Copy link
Member

@kylecarbs kylecarbs left a comment

Choose a reason for hiding this comment

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

LGTM

@coadler coadler merged commit e990a9a into main May 16, 2022
@coadler coadler deleted the colin/audit-all-types branch May 16, 2022 16:20
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.

Create tests for audit logging that are decoupled from HTTP API testing Bring audit diffing out of individual structs and into a centralized package
4 participants