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

feat: update tag script to handle telemetryservice image update in controller #1061

Merged
merged 2 commits into from
Dec 3, 2024

Conversation

tomqin93
Copy link
Contributor

@tomqin93 tomqin93 commented Dec 1, 2024

What this PR does / why we need it:
This PR updates tag.go to update image specified in controller for release
Will this PR make the community happier?
Yes
Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #

How is this PR tested

  • unit test
  • e2e test
  • other (please specify)

Special notes for your reviewer:

Release note:

- update tag.go script to update image tag specified in telemetryservice_controller.go

Copy link

codecov bot commented Dec 1, 2024

Codecov Report

Attention: Patch coverage is 0% with 15 lines in your changes missing coverage. Please review.

Project coverage is 33.40%. Comparing base (539475c) to head (d90116d).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
tools/tag.go 0.00% 15 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1061      +/-   ##
==========================================
- Coverage   33.42%   33.40%   -0.02%     
==========================================
  Files          55       55              
  Lines        4808     4810       +2     
==========================================
  Hits         1607     1607              
- Misses       3061     3063       +2     
  Partials      140      140              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tomqin93
Copy link
Contributor Author

tomqin93 commented Dec 1, 2024

This pull request includes several changes to the tools/tag.go file to enhance its functionality and improve code clarity. The key changes include updating the parameter handling, modifying the directory traversal logic, and refining the tag replacement logic.

Parameter Handling:

  • Updated the main function to require an additional parameter and adjusted the variable assignments accordingly.

Directory Traversal:

  • Renamed variables within the traverseDir function for better clarity and included .go files in the list of target files. [1] [2]

Tag Replacement Logic:

  • Enhanced the replaceTag function to handle image updates in both deployment files and controller constants, ensuring that the new tag is correctly applied in various contexts.

@tomqin93 tomqin93 merged commit 4196d40 into main Dec 3, 2024
17 checks passed
@tomqin93 tomqin93 deleted the update-tag-script branch December 3, 2024 05:53
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.

3 participants