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

Opt-in email notifications when {repo sync, cv promote, cv publish, proxy sync} fails #10742

Merged
merged 7 commits into from
Oct 4, 2023

Conversation

adamruzicka
Copy link
Member

@adamruzicka adamruzicka commented Sep 18, 2023

What are the changes introduced in this pull request?

Opt-in email notifications when {repo sync, cv promote, cv publish, proxy sync} fails

Considerations taken when implementing this change?

What are the testing steps for this pull request?

  1. Subscribe to each of the things mentioned above
  2. Make them fail. In general raise "HALT" somewhere in the action works pretty well, but it cannot happen before action_subject is called

TODO:

  • redmine

@adamruzicka
Copy link
Member Author

Do these four actions always fail hard or do they go into paused?

@sjha4
Copy link
Member

sjha4 commented Sep 20, 2023

IIRC syncs fail and go to stopped/error state.. Promote/Publish pause upon errors.

@adamruzicka
Copy link
Member Author

Changed to send the emails out when things either fail or get paused just to be extra sure

@sjha4
Copy link
Member

sjha4 commented Sep 21, 2023

I am getting this error. Not sure if any additional config is needed. I turned on the notifications in User details for the 4 new actions.

15:06:34 rails.1 | 2023-09-21T15:06:34 [E|dyn|b194a130] Failed to run hook 'notify_on_failure' for action 'Actions::Katello::CapsuleContent::Sync' 15:06:34 rails.1 | 2023-09-21T15:06:34 [E|dyn|b194a130] undefined method users' for nil:NilClass (NoMethodError)
15:06:34 rails.1 | b194a130 | /home/vagrant/katello/app/lib/actions/katello/capsule_content/sync.rb:56:in notify_on_failure'

@adamruzicka
Copy link
Member Author

adamruzicka commented Sep 25, 2023

Is your db seeded? If you run MailNotification[:capsule_sync_failure] in rails console, what does it give you? Scratch that. Originally I used downstream terminology and then just renamed it to upstream one, but failed to propagate the changes into all the right places

@sjha4
Copy link
Member

sjha4 commented Sep 28, 2023

Seems to be working now! Will test some more..I don't seem to have sendmail correctly set up on my box so verifing the emails in the console. Will do some more testing.

Copy link
Member

@sjha4 sjha4 left a comment

Choose a reason for hiding this comment

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

Able to see emails on repo sync, capsule sync, cv publish and promote failures.
Ack 👍🏼

Repo_sync_failure_email
Cv_promote_fail_email
CV_publish_failure_email
Capsule_sync_failure_email

@sjha4 sjha4 merged commit fbf7739 into Katello:master Oct 4, 2023
4 of 5 checks passed
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.

3 participants