Skip to content

Conversation

cellio
Copy link
Member

@cellio cellio commented Jun 10, 2025

Adds tag renames to the audit log -- merges are already there, and renames, like merges, don't leave visible history other than the log. Fixes #1638.

screenshot of log entry

@cellio cellio requested a review from a team June 10, 2025 23:21
Copy link

codecov bot commented Jun 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 66.14%. Comparing base (e299667) to head (411cf34).
Report is 13 commits behind head on develop.

Current head 411cf34 differs from pull request most recent head 88b58ca

Please upload reports for the commit 88b58ca to get more accurate results.

Additional details and impacted files
Components Coverage Δ
controllers 61.51% <100.00%> (+0.15%) ⬆️
helpers 68.98% <ø> (ø)
jobs 28.00% <ø> (ø)
models 81.80% <ø> (ø)

☔ 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.

@cellio
Copy link
Member Author

cellio commented Jun 11, 2025

I should probably figure out how to add a test, but there's no merge test for me to piggyback on so I'm a bit lost. I didn't find any existing tests that check the audit log.

I do not understand the system-test failure (is it spurious?).

@cellio cellio self-assigned this Jun 11, 2025
@Oaphi
Copy link
Member

Oaphi commented Jun 11, 2025

I do not understand the system-test failure (is it spurious?).

Yeah, system tests are just flaky, it's annoying, but for now until I or someone else sits down and fixes them, the only remedy is to rerun the workflow whenever it fails on CircleCI (https://app.circleci.com/pipelines/github/codidact - you should have access to it via the org - just "rerun from failed" if no one's around to do so - might take a couple of tries, though):

2025-06-11_07-38

@Oaphi
Copy link
Member

Oaphi commented Jun 11, 2025

I should probably figure out how to add a test, but there's no merge test for me to piggyback on so I'm a bit lost.

Adding tests for audit logs should be relatively straightforward: just test the controller method in question and then ask the model to get you the most recent audit log of the relevant type - even checking that it's there at all should be enough

@Oaphi
Copy link
Member

Oaphi commented Jun 11, 2025

I've added the test (not for the audit log, but for the controller method - it's more important to have the base functionality covered - if you want to get some practice, feel free to add one specifically for the log [best to just expand the test I've made] - do ping me if you need help with that) and several fixes (will comment on them separately).

@Oaphi Oaphi requested a review from ArtOfCode- June 11, 2025 06:51
status = false

Post.transaction do
@tag.transaction do
Copy link
Member Author

@cellio cellio Jun 11, 2025

Choose a reason for hiding this comment

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

I got Post.transaction from merge a few lines down. Do we need to change it there too? Or is that one correct because tag merges modify posts?

@cellio
Copy link
Member Author

cellio commented Jun 11, 2025

I've added the test [...] and several fixes (will comment on them separately).

Those fixes were educational. Thank you!

@cellio cellio force-pushed the cellio/1638-audit-tag-renames branch from 5a9f058 to 88b58ca Compare June 12, 2025 00:06
@cellio cellio merged commit a577b5b into develop Jun 12, 2025
5 of 8 checks passed
@cellio cellio deleted the cellio/1638-audit-tag-renames branch June 12, 2025 23:46
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.

Audit tag renames
3 participants