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

Extract Contacts class + related refactorings to NotificationConfigurator class. #5214

Merged
merged 2 commits into from
Jan 26, 2023

Conversation

konrad-jamrozik
Copy link
Contributor

@konrad-jamrozik konrad-jamrozik commented Jan 25, 2023

Changes made

This PR improves logged messages and refactors NotificationConfigurator class logic related to obtaining list of contacts to send notifications to based on CODEOWNERS file from repository to which given pipeline pertains.

The main change is extraction of Contacts class from NotificationConfigurator class, with entry method being Contacts.GetFromBuildDefinitionRepoCodeowners(BuildDefinition buildDefinition).

I also made related improvements to log messages and naming in surrounding code. Most notably, I made the naming more consistent and got rid of some synonyms or mismatched names, like BuildDefinition being named Pipeline.

Test plan

Once this PR is merged and package published, I will run the automation - build-failure-notification-subscriptions pipeline from a branch that uses the new package and report how it went here. I do not expect any issues as the PR is composed only of automated refactoring and logged messages updates.

If there are problems, I will re-run the pipeline from main to restore the notification setup.

Update 1/26/2023: here is the build doing the test.

The pipeline run looks good, no issues.

Context

This PR originated by salvaging refactored code from this PR:

And significantly expanding upon it.

In general, I have bunch of related work upcoming pertaining to the logic modified in this PR, hence I am working on improving the code. Related issues:

@konrad-jamrozik konrad-jamrozik added the Central-EngSys This issue is owned by the Engineering System team. label Jan 25, 2023
@konrad-jamrozik konrad-jamrozik self-assigned this Jan 25, 2023
@konrad-jamrozik konrad-jamrozik requested a review from a team as a code owner January 25, 2023 06:00
@konrad-jamrozik konrad-jamrozik force-pushed the users/kojamroz/pipeline_owner_refactor branch 2 times, most recently from 08ae91f to 4f89a25 Compare January 25, 2023 06:18
@konrad-jamrozik konrad-jamrozik force-pushed the users/kojamroz/pipeline_owner_refactor branch from 8d072ff to 13a1439 Compare January 26, 2023 05:41
@konrad-jamrozik konrad-jamrozik requested a review from a team January 26, 2023 05:44
@konrad-jamrozik konrad-jamrozik force-pushed the users/kojamroz/pipeline_owner_refactor branch 4 times, most recently from 38b72de to 8c28493 Compare January 26, 2023 05:47
@konrad-jamrozik konrad-jamrozik force-pushed the users/kojamroz/pipeline_owner_refactor branch from 8c28493 to e97ce38 Compare January 26, 2023 05:48
@konrad-jamrozik konrad-jamrozik requested a review from benbp January 26, 2023 05:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Central-EngSys This issue is owned by the Engineering System team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants