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

sync upstream #7

Merged
merged 113 commits into from
Dec 18, 2023
Merged

sync upstream #7

merged 113 commits into from
Dec 18, 2023

Conversation

mshimizu-oc
Copy link

@mshimizu-oc mshimizu-oc commented Dec 14, 2023

sync https://github.com/collectiveidea/audited/releases/tag/v5.4.2

github workflowは消されていましたが、テストが無いと不安な気がしたので改めて追加しました。

set_sqlのテストはサラッと書いてみたらうまくいかなかったので、今回は追加を諦めました。
(おそらく事前準備が足りて無い)

jess and others added 30 commits December 2, 2021 08:37
When I first implemented this feature, I assumed the `has_associated_audits` enabled auditing of the parent model and connected the child audits. When I tested the `company.own_and_associated_audits` I got an `undefined method `own_and_associated_audits'`. It took me a while to guess that I needed to also added audited to the parent model. 

I think adding the `audited` to the parent will make the docs more explicit and devs will immediately realized that `has_associated_audits` is a extra/separate call.
When combining audits the oldest remaining audit is updated and the audits over max_audit count are deleted.
This can result in a deadlock if if the same record is updated at the same time. However by virtue of being at the same time
the same end is being selected and the same verion number is used for the delete. This means the same update and same delete
are being performed for both audit combinations so this error can just be ignored.
I want to improve how we do this, but this gets more things passing in the interim.
Trying to get tests back to passing.
It is segfaulting on GitHub Actions and I don't care enough to fix it right now.
Should effectively be the same query but easier to read and with the benefit of ActiveRecord's type casting and association reflection. Fixes issue dealing with mutiple id column types
Replace raw string where clause with query methods
…after-block-fix

Ensure audits are re-enabled after blocks
Use string class name and constantize
…igrations-deprecation

Fix timestamped_migrations deprecation warning
…attributes-automatically

Filter encrypted attributes automatically
…bine_deadlock

Deadlocks from concurrent audit combinations
Add audited method to parent in docs
@mshimizu-oc mshimizu-oc self-assigned this Dec 14, 2023
@trafico-bot trafico-bot bot added the 🔍 Ready for Review Pull Request is not reviewed yet label Dec 14, 2023
@trafico-bot trafico-bot bot added ✅ Approved Pull Request has been approved and can be merged and removed 🔍 Ready for Review Pull Request is not reviewed yet labels Dec 15, 2023
@dkyoyoung dkyoyoung merged commit c7c13e8 into master Dec 18, 2023
138 checks passed
@trafico-bot trafico-bot bot added ✨ Merged Pull Request has been merged successfully and removed ✅ Approved Pull Request has been approved and can be merged labels Dec 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ Merged Pull Request has been merged successfully
Projects
None yet
Development

Successfully merging this pull request may close these issues.