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

Repo maintenance for windows #8626

Merged

Conversation

Lyndon-Li
Copy link
Contributor

Fix issue #8419, support repo maintenance job to run on Windows nodes:

  • Add toleration and labels to repo maintenance job pods
  • Add retry to wait pod network ready
  • Change repo maintenance job pod's TerminationMessagePolicy to TerminationMessageFallbackToLogsOnError, as kubelet has a bug to support TerminationMessageReadFile on Windows

@Lyndon-Li Lyndon-Li force-pushed the repo-maintainance-for-windows-2 branch from bdf495f to fe408e5 Compare January 17, 2025 08:08
@Lyndon-Li Lyndon-Li force-pushed the repo-maintainance-for-windows-2 branch from fe408e5 to 09fcbc8 Compare January 17, 2025 08:22
Copy link

codecov bot commented Jan 17, 2025

Codecov Report

Attention: Patch coverage is 68.11594% with 22 lines in your changes missing coverage. Please review.

Project coverage is 59.39%. Comparing base (5b1738a) to head (0a4b05c).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
pkg/cmd/cli/repomantenance/maintenance.go 0.00% 22 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8626      +/-   ##
==========================================
+ Coverage   59.33%   59.39%   +0.06%     
==========================================
  Files         370      370              
  Lines       39932    39952      +20     
==========================================
+ Hits        23692    23730      +38     
+ Misses      14744    14731      -13     
+ Partials     1496     1491       -5     

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

@Lyndon-Li Lyndon-Li force-pushed the repo-maintainance-for-windows-2 branch 2 times, most recently from f7a04c9 to c852a7f Compare January 17, 2025 10:28
@Lyndon-Li Lyndon-Li force-pushed the repo-maintainance-for-windows-2 branch from c852a7f to 0a4b05c Compare January 17, 2025 11:07
@Lyndon-Li Lyndon-Li marked this pull request as ready for review January 20, 2025 03:04
@Lyndon-Li Lyndon-Li requested a review from ywk253100 January 20, 2025 03:08
return "", nil
}

idx := strings.Index(terminated.Message, TerminationLogIndicator)
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we need the indicator? Why cannot we return the termination message directly?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The termination message is written to stdout together with logrus logs. So we use this indicator to identify it among other logs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As the behavior of TerminationMessageFallbackToLogsOnError, the last 2048 bytes of stdout is retrieved as the termination message whatever are there in the bytes.

@Lyndon-Li Lyndon-Li requested a review from ywk253100 January 20, 2025 05:46
@Lyndon-Li Lyndon-Li merged commit a9031eb into vmware-tanzu:main Jan 21, 2025
45 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants