-
Notifications
You must be signed in to change notification settings - Fork 120
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
Yamls to support backend-initiated notifications in v2v for Successful and Failed Requests #429
Conversation
0407555
to
6b701f4
Compare
Checked commit AparnaKarve@6b701f4 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 |
description: | ||
fields: | ||
- rel5: | ||
value: "/System/Policy/request_completed_with_failure" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AparnaKarve
/System/Policy/request_completed_with_failure is not defined in the database in https://github.com/ManageIQ/manageiq-content/tree/master/content/automate/ManageIQ/System/Policy.class are you planning on using the missing instance for this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mkanoor Should I also define request_completed_with_failure under https://github.com/ManageIQ/manageiq-content/tree/master/content/automate/ManageIQ/System/Policy.class ?
The way I have it right now seems to work.
description: | ||
fields: | ||
- rel5: | ||
value: "/System/Policy/request_completed_with_success" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AparnaKarve
/System/Policy/request_completed_with_success is not defined in https://github.com/ManageIQ/manageiq-content/tree/master/content/automate/ManageIQ/System/Policy.class are you planning on using the missing instance?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same question as above #429 (comment)
@lfu do you have comments on this? |
This does not look right to me. Usually the request comes in to kick out automate actions defined in Why these new request instances are needed for notification? |
@lfu We need backend triggered notifications for Does it look like I will need I am not familiar with the normal practices implemented in order to support this requirement in Content/Automate, but the current approach does seem to work. |
@tinaafitz @billfitzgerald0120 How do we implement notification from backend? |
Is there a prior example in the existing codebase that comes close to my current requirement that I can refer to and follow along? |
Hi @AparnaKarve @lfu You can create notifications without using Automate as is shown here: Can you use that approach, or do you need to have it setup in Automate content? Can we get together on Monday to help us better understand the requirements? |
@tinaafitz Then I started looking up some of the existing What I noticed was, which is what I have used in ManageIQ/manageiq#18012 I believe my use case is very similar to the above two ( Let's get together on Monday and we can discuss this more. |
As mentioned above |
@AparnaKarve I'm wondering if it's possible that the |
@tinaafitz That could very well be the case that the new Notification type was somehow not found when the This is something really strange -- even though the new Notification type exists in the |
@tinaafitz I may have identified the issue with It looks like in notification_types.yml, when I set the audience to either In Rails console, I get the following error if I use a notification_type that has it's audience set to user/group
So I have now changed the audience of my new notification_types to
With the changes made in ManageIQ/manageiq#18012, it looks like we no longer need this PR. Thank you for your tips -- really appreciated!! EDIT: If audience is set to |
Fixes ManageIQ/manageiq-v2v#265
Fixes ManageIQ/manageiq-v2v#578
Supporting Core PR - ManageIQ/manageiq#18012