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

fix: slack notification url #827

Merged
merged 3 commits into from
Feb 20, 2024
Merged

fix: slack notification url #827

merged 3 commits into from
Feb 20, 2024

Conversation

cre8ivejp
Copy link
Member

@cre8ivejp cre8ivejp commented Feb 16, 2024

Fixes #821

After the Organization implementation, we must use the url_code instead of environment_id for all URLs.
I fixed it to use the urlCode and added environmentName to the notification, too.


This pull request mainly involves changes in the pkg/batch/jobs/notification/domain_event_informer.go and pkg/notification/sender/notifier/slack.go files, with changes focusing on the replacement of environmentID with environmentName and environmentURLCode. This is reflected in the creation of notification events, handling of messages, and logging. Test files have been updated to reflect these changes. Additional logging has also been added in pkg/eventpersister/persister/persister.go.

Changes to domain_event_informer.go:

  • Added logging for when the DomainEventInformer fails to pull a message from the message channel.
  • Replaced environmentID with environmentName and environmentURLCode in handleMessage and createNotificationEvent methods. [1] [2] [3] [4]

Changes to domain_event_test.go:

  • Updated test cases to use environmentName and environmentURLCode instead of environmentID. [1] [2] [3] [4]

Changes to other files:

  • Replaced environmentID with environmentName and environmentURLCode in various files and methods. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16]
  • Added debug logging in pkg/eventpersister/persister/persister.go when the update evaluation count timer is triggered.

Signed-off-by: Alessandro Yuichi Okimoto <[email protected]>
@cre8ivejp cre8ivejp marked this pull request as ready for review February 16, 2024 15:12
@cre8ivejp cre8ivejp requested a review from kakcy February 20, 2024 06:55
Copy link
Contributor

@kakcy kakcy left a comment

Choose a reason for hiding this comment

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

I have commented on some points of interest.

And one more thing,
Isn't it necessary to take measures such as returning an error if environmentURLCode is empty in createNotificationEvent() etc.?

proto/notification/sender/notification.proto Outdated Show resolved Hide resolved
@cre8ivejp
Copy link
Member Author

I have commented on some points of interest.

And one more thing, Isn't it necessary to take measures such as returning an error if environmentURLCode is empty in createNotificationEvent() etc.?

As default, the url_code is a required field. So there is no need.

Signed-off-by: Alessandro Yuichi Okimoto <[email protected]>
Signed-off-by: Alessandro Yuichi Okimoto <[email protected]>
Copy link
Contributor

@kakcy kakcy left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@cre8ivejp cre8ivejp merged commit 49ae0c0 into main Feb 20, 2024
21 checks passed
@cre8ivejp cre8ivejp deleted the fix-slack-url branch February 20, 2024 10:52
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.

fix: 404 error occurs in the notification URL related to feature flags
2 participants