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

AAE-28530 Teams notifications improvements #826

Merged
merged 4 commits into from
Dec 5, 2024

Conversation

atchertchian
Copy link
Contributor

@atchertchian atchertchian commented Dec 4, 2024

  • move to adaptative cards for send-teams-notification-action: unused input "overwrite" was removed
  • add markdown message support for teams usage from reportportal-summarize

Checklist

  • Jira Reference (also in PR title): AAE-28530
  • README updated after adding/changing behaviour of an action
  • Proposed version increment for release:
    • Patch (bugfix)
    • Minor (new feature)
    • Major (breaking changes)
  • External PR link where changes has been tested:

Description

- move to adaptative cards for send-teams-notification-action: unused input "overwrite" was removed
- add markdown message support for teams usage from reportportal-summarize
@atchertchian atchertchian requested a review from eromano December 4, 2024 15:33
@atchertchian atchertchian requested a review from a team as a code owner December 4, 2024 15:33
eromano
eromano previously approved these changes Dec 5, 2024
gionn
gionn previously approved these changes Dec 5, 2024
Copy link
Member

@gionn gionn left a comment

Choose a reason for hiding this comment

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

The changes are quite extensive for a detailed review, but overall LGTM

Copy link
Member

Choose a reason for hiding this comment

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

these screenshots looks like using the deprecated webhooks and not the workflows based ones - is this intentional?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I did not change that part: I tested with a workflow hook and it did not work ok so I set this aside for now

Copy link
Contributor

@erdemedeiros erdemedeiros left a comment

Choose a reason for hiding this comment

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

Appart from a comment on variable name, it looks good to me

Copy link
Contributor

@dsibilio dsibilio left a comment

Choose a reason for hiding this comment

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

LGTM, mostly left a few comments to raise awareness on a couple of things.

if [ -n "$COMPUTED_MESSAGE" ]; then
COMPUTED_MESSAGE="${COMPUTED_MESSAGE}"
COMPUTED_MESSAGE=$(printf "${COMPUTED_MESSAGE}" | sed -z 's/\n/\\n/g' | sed -r 's/"/\\\"/g' | sed -e 's/\r//g')
# avoid error if message is too long (total message must be less than 3001 characters)
Copy link
Contributor

Choose a reason for hiding this comment

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

Teams limit for messages is ~28KB for both channels and chats.
We could consider either:

  • raising this limit
  • rewording the comment to reflect that it's just our preference to cut it down to 3k chars for now

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually this particular number was added when some slack limits were hit: we can definitely up this limit but it does feel like it's enough content (especially since the long content usually comes from long commit messages, so we can always get the full info even if it's not in the notif)

- name: Send teams notification
uses: skitionek/notify-microsoft-teams@9c67757f64d610fb6748d8ff3c11f284355ed7ec # v1.0.8
uses: skitionek/notify-microsoft-teams@190d4d92146df11f854709774a4dae6eaf5e2aa3 # master
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm a bit concerned about the state of this repository, it's not great with 2 commits and no releases in the last year lol

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same, now I think we can always change and use another action if that's better

![Teams Success](./images/teams-success.png)

Sample of a FAILURE notification on a `push` event.
![Teams Success](./images/send-teams-push-success.png)
Copy link
Contributor

Choose a reason for hiding this comment

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

The docs here mentioned creating the hook via the "Incoming Webhook" approach that is going to be deprecated by MSFT soon.

I was curious whether we tried at all the new approach based on Workflows after the changes? It'd be great to avoid having to rework this in the near future 😅

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was thinking we could try again when the notifs are up: as I told you in chat I had a quick try and it did not work, if it does it's just a matter of updating the Readme doc

@atchertchian atchertchian merged commit 9789882 into master Dec 5, 2024
3 checks passed
@atchertchian atchertchian deleted the improvement/AAE-28530-teams-notifications branch December 5, 2024 10:03
@atchertchian atchertchian restored the improvement/AAE-28530-teams-notifications branch December 5, 2024 18:16
@atchertchian atchertchian deleted the improvement/AAE-28530-teams-notifications branch December 5, 2024 18:35
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.

5 participants