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

Sd 607 provide the compelete name of target cluster in promotion prs #21

Conversation

ashvarts
Copy link

@ashvarts ashvarts commented Aug 28, 2024

Description

This pull request includes changes to the internal/pkg/githubapi/github.go and mirrord.json files to improve the formatting of promotion PR bodies and update network configuration settings respectively.

Improvements to PR Body Formatting:

  • internal/pkg/githubapi/github.go: Updated the generatePromotionPrBody function to improve the formatting of target paths in the promotion PR body. The target paths are now joined with a newline and indentation for better readability.

Before:

image

After:

image

jira: SD-607: Telefonistka doesn't provide the complete name of target cluster in promotion PRs

Network Configuration Updates:

  • mirrord.json: Added a new network section with incoming set to "steal" and outgoing set to true, enhancing the network configuration settings.

These changes aim to enhance the usability, maintainability, and functionality of the Telefonistka project.

Type of Change

  • Bug Fix
  • New Feature
  • Breaking Change
  • Refactor
  • Documentation
  • Other (please describe)

Checklist

  • I have read the contributing guidelines
  • Existing issues have been referenced (where applicable)
  • I have verified this change is not present in other open pull requests
  • Functionality is documented
  • All code style checks pass
  • New code contribution is covered by automated tests
  • All new and existing tests pass

Stealing traffic means the Telefonistka instance running in the
cluster will not receive the webhook, only the local instance will.
This is so that we only see results from our local instance.
The promotion path used to look like 'source/'->['path1/','path2/'].
This PR changes it to look like:
'source/'->
  'path1/'
  'path2/'
@ashvarts ashvarts marked this pull request as ready for review August 29, 2024 16:10
@Freyert
Copy link

Freyert commented Aug 30, 2024

Love the test! I think if the file ending for the golden path were .md Github would be able to render the actual representation. I love this test because now we have a great pattern for all the other messages telefonistka sends.

@ashvarts ashvarts force-pushed the sd-607-provide-the-compelete-name-of-target-cluster-in-promotion-prs branch from 07285c6 to bb8e932 Compare August 30, 2024 13:52
Freyert
Freyert previously approved these changes Aug 30, 2024
Oded-B
Oded-B previously approved these changes Aug 30, 2024
yzdann
yzdann previously approved these changes Sep 2, 2024
Comment on lines 189 to 191
// if newPrBody != expectedPrBody {
// t.Errorf("Expected prBody to be %s, got %s", expectedPrBody, newPrBody)
// }
Copy link

Choose a reason for hiding this comment

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

let's remove it if not use anymore.

@yzdann
Copy link

yzdann commented Sep 2, 2024

, enhancing the network configuration settings.

just for my knowledge ... in what sense this will improve the network configuration?

@ashvarts
Copy link
Author

ashvarts commented Sep 3, 2024

@yzdann that's referring to mirrord. I'll confess that it's how CoPilot worded it. But the enhancement is that the traffic will be redirected to the local binary only, so during development only the local telefonistka will get webhooks, not the one running in the cluster, this should make it easier to test things.

@ashvarts ashvarts dismissed stale reviews from yzdann and Oded-B via 2a837d2 September 3, 2024 13:09
@ashvarts ashvarts merged commit 2f5c16e into main Sep 3, 2024
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.

4 participants