Cleanup SNS topics / subscriptions in dev/prod accounts

Description

SNS topics and subscriptions are not deleted when the stacks are deleted.
Cleaned up dev-xxx ones in dev account. Need to identify old user stacks to delete others.
Then repeat in prod account.
And find out why they are not deleted automatically.

Environment

None

Activity

Show:
Xavier Schildwachter
April 25, 2020, 2:50 AM

and I looked some more and he realized that the problem was caused by the worker that replays messages. When a CHANGE for ACTIVITY/FORUM /EVALUATION is processed, the topic is created...
I verified on the dev stack by creating a CHANGE record for a FORUM in the database, within seconds it got sent and the topic appeared.
RepositoryMessagePublisherImpl.getTopicInfoLazy() creates the topic but is also used to build a cached map of types to topics, so cannot be deleted without additional work. The short term solution is to delete all CHANGES records for OBJECT_TYPE in (ACTIVITY, FORUM, EVALUATION) on staging and prod, so we did that.

So, in stack-308 we should not see these 3 topics after all messages are replayed.

Xavier Schildwachter
April 30, 2020, 5:44 PM

Looks good, you can see 3 remaining from 306, also there in 307 but not there on 308.

Bruce Hoff
May 1, 2020, 3:40 PM

I still see 3 SNS topics for stacks up to 306 (307 is currently prod'). I'm not sure what success looks like. I'm happy to validate and close if you could tell me what I should be checking for.

Xavier Schildwachter
May 1, 2020, 4:26 PM

You should not see ACTIVITY, EVALUATION or FORUM topics for stack-308. We want to make sure they're not created and therefore won't be left behind.
I'll cleanup 300-307 manually (script).

Bruce Hoff
May 1, 2020, 6:51 PM

I verified that those three SNS topics are not present for stack 308.

Fixed

Assignee

Xavier Schildwachter

Reporter

Xavier Schildwachter

Labels

None

Validator

Bruce Hoff

Development Area

Synapse Core Infrastructure

Release Version History

None

Components

Fix versions

Priority

Major
Configure