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

tootctl domains purge fails when an account has notifications allowed #30305

Open
gunchleoc opened this issue May 15, 2024 · 0 comments
Open
Labels
bug Something isn't working status/to triage This issue needs to be triaged

Comments

@gunchleoc
Copy link
Contributor

gunchleoc commented May 15, 2024

Steps to reproduce the problem

  1. Allow notifications from an account on a domain <domain name>
  2. RAILS_LOG_LEVEL=debug live/bin/tootctl domains purge <domain name>

Expected behaviour

Affected accounts purged or kept without error

Actual behaviour

Foreign key violation

Detailed description

I'm trying to purge the domain social.growyourown.services because my server refuses to find feditips@social.growyourown.services from some nebulous reason and I can't follow the account. So, I'm trying to make my server forget that domain to see if that will fix it.

The account that's throwing the error is FediGarden@social.growyourown.services that I've been DMming with in an attempt to fix the problem, but I don't follow them.

mastodon@mastodon:~$ RAILS_LOG_LEVEL=debug live/bin/tootctl domains purge social.growyourown.services
D, [2024-05-15T10:13:45.111579 #297089] DEBUG -- : [dotenv] Set LOCAL_DOMAIN, REDIS_HOST, REDIS_PORT, REDIS_PASSWORD, DB_HOST, DB_PORT, DB_NAME, DB_USER, DB_PASS, ACTIVE_RECORD_ENCRYPTION_DETERMINISTIC_KEY, ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT, ACTIVE_RECORD_ENCRYPTION_PRIMARY_KEY, ES_ENABLED, ES_HOST, ES_PORT, ES_PRESET, ES_USER, ES_PASS, SECRET_KEY_BASE, OTP_SECRET, VAPID_PRIVATE_KEY, VAPID_PUBLIC_KEY, SMTP_SERVER, SMTP_PORT, SMTP_LOGIN, SMTP_PASSWORD, SMTP_FROM_ADDRESS, PAPERCLIP_ROOT_PATH, S3_ENABLED, S3_PROTOCOL, S3_BUCKET, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, S3_REGION, S3_ALIAS_HOST, S3_HOSTNAME, S3_ENDPOINT, S3_PERMISSION, S3_READ_TIMEOUT, S3_OPEN_TIMEOUT, IP_RETENTION_PERIOD, SESSION_RETENTION_PERIOD, HCAPTCHA_SECRET_KEY, HCAPTCHA_SITE_KEY, SINGLE_USER_MODE, DEFAULT_LOCALE, and AUTHORIZED_FETCH
I, [2024-05-15T10:13:45.111649 #297089]  INFO -- : [dotenv] Loaded .env.production
Error processing 109747560915941592: PG::ForeignKeyViolation: ERROR:  update or delete on table "accounts" violates foreign key constraint "fk_rails_e3e0aaad70" on table "notification_permissions"
DETAIL:  Key (id)=(109747560915941592) is still referenced from table "notification_permissions".

1/1 |==============================================================================================================================================================================| Time: 00:00:00
Removed 1 accounts
Removed 0 custom emojis

Mastodon instance

ailbhean.co-shaoghal.ne

Mastodon version

main @ 1959365

Technical details

  • Ruby version: ruby 3.3.1 (2024-04-23 revision c56cd86388) [x86_64-linux]
  • Node.js version: v22.1.0
@gunchleoc gunchleoc added bug Something isn't working status/to triage This issue needs to be triaged labels May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working status/to triage This issue needs to be triaged
Projects
None yet
Development

No branches or pull requests

1 participant