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(ti-community-infra/prow): fix image building jobs #2996

Merged
merged 2 commits into from
Jun 13, 2024

Conversation

wuhuizuo
Copy link
Collaborator

Signed-off-by: wuhuizuo wuhuizuo@126.com

Signed-off-by: wuhuizuo <wuhuizuo@126.com>
Copy link

ti-chi-bot bot commented Jun 13, 2024

I have already done a preliminary review for you, and I hope to help you do a better job.

Based on the pull request title and description, it seems that the changes are made to fix image building jobs in the ti-community-infra/prow repository. The changes introduced are modifying the run_if_changed regex patterns in the push-prow-images job and build-images command in the prow job. The serviceAccountName is also changed to prow-pusher in both jobs.

However, there are some potential problems I noticed in this pull request. Firstly, the run_if_changed regex pattern in the push-prow-images job seems incorrect. The closing bracket is misplaced, which may cause the pattern to match unintended files. Secondly, the build-images command in the prow job is missing the -C prow argument which specifies the working directory. This may cause the command to fail or build images in the wrong directory.

To fix these issues, the run_if_changed regex pattern in the push-prow-images job should be modified to:

-      run_if_changed: '^(\.ko\.yaml|hack/(make-rules|prowimagebuilder))|.+\.go'
+      run_if_changed: '^(\.ko\.yaml|hack/(make-rules|prowimagebuilder)|.+\.go)'

And the build-images command in the prow job should be modified to:

-              - make
-              - -C
-              - prow
+              - make build-images REGISTRY=ticommunityinfra

This will ensure that the correct directory is used and the images are built with the correct registry.

@ti-chi-bot ti-chi-bot bot requested a review from purelind June 13, 2024 10:47
@ti-chi-bot ti-chi-bot bot added the size/S label Jun 13, 2024
Copy link

ti-chi-bot bot commented Jun 13, 2024

I have already done a preliminary review for you, and I hope to help you do a better job.

Key Changes:

  • Changes made in postsubmits.yaml and presubmits.yaml files.
  • Changed the service account name from pusher to prow-pusher.
  • Replaced the cpu value from "4" to "1" in both files.
  • Added REGISTRY=ticommunityinfra in the args list in presubmits.yaml file.

Potential Problems:

  • It is not clear why the cpu value was reduced from "4" to "1". This might lead to slower builds or longer build times.
  • The change in service account names might cause some issues if there are other dependent services that are using the old service account name.

Fixing Suggestions:

  • It would be helpful if the author of the pull request could add some explanation for the change in the cpu value.
  • It might be a good idea to update any dependent services that are using the old service account name to use the new one.
  • If the cpu value was reduced to save resources, then it might be better to consider other approaches like horizontal pod autoscaling or limiting the number of concurrent builds instead of reducing the cpu value.

@wuhuizuo wuhuizuo added the lgtm label Jun 13, 2024
@wuhuizuo
Copy link
Collaborator Author

/approve

Copy link

ti-chi-bot bot commented Jun 13, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: wuhuizuo

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added the approved label Jun 13, 2024
@ti-chi-bot ti-chi-bot bot merged commit a0ce803 into main Jun 13, 2024
2 checks passed
@ti-chi-bot ti-chi-bot bot deleted the fix/prow-ci-jobs branch June 13, 2024 10:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant