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

Update contour to 1.27.0 and Kubernetes to 1.28 #94

Merged
merged 3 commits into from
Nov 10, 2023
Merged

Update contour to 1.27.0 and Kubernetes to 1.28 #94

merged 3 commits into from
Nov 10, 2023

Conversation

yokaze
Copy link
Contributor

@yokaze yokaze commented Nov 2, 2023

Signed-off-by: Daichi Sakaue [email protected]

@yokaze yokaze self-assigned this Nov 2, 2023
@yokaze yokaze marked this pull request as ready for review November 7, 2023 08:58
@yokaze yokaze requested a review from terassyi November 7, 2023 09:07
$(shell echo $1 | sed -E 's/^(.*)\.[[:digit:]]+$$/v\1/')
endef

# usage update-version OWNER/REPO VAR MAJOR
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
# usage update-version OWNER/REPO VAR MAJOR
# usage update-version OWNER/REPO VER MAJOR

VAR seems to mean "version", so I think this should be VER.

$(MAKE) update-actions
$(MAKE) download-crds

.PHONY: list-actions
Copy link
Contributor

Choose a reason for hiding this comment

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

This target isn't used in other targets and doesn't appear in maintenance.md.
When are you supposed to use this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@terassyi
This is a small usable function to check the completeness of the update script.
It is not used unless we're going to use a new Action.

If you suspect it is not needed, I'll move it to my dotfiles. How do you think?

Copy link
Contributor

Choose a reason for hiding this comment

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

It is good for me to keep this in the file.
I just thought it might be a copy paste mistake. 🙇‍♂️

@yokaze yokaze requested a review from terassyi November 8, 2023 05:10
Signed-off-by: Daichi Sakaue <[email protected]>
sed -i -e "s/$2 := .*/$2 := $${NEW_VERSION}/g" Makefile.versions
endef

# usage update-version-quay NAME VAR
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
# usage update-version-quay NAME VAR
# usage update-version-quay NAME VERSION

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For update-version and update-version-quay, the parameter is a VAR (variable name).
It receives a repository name and VAR name, and write a record in Makefile.versions.

# usage update-version OWNER/REPO VAR MAJOR
define update-version
	$(call get-latest-gh,$1)
	NEW_VERSION=$$(echo $(latest_gh) | if [ -z "$3" ]; then cut -b 2-; else cut -b 2; fi); \
	sed -i -e "s/$2 := .*/$2 := $${NEW_VERSION}/g" Makefile.versions
endef

On the other hand, update-trusted-action receives a specific version and overwrites GitHub Actions manifests.

# usage update-trusted-action OWNER/REPO VERSION
define update-trusted-action
	for i in $(shell ls $(WORKFLOWS_DIR)); do \
		$(YQ) -i '(.. | select(has("uses")) | select(.uses | contains("$1"))).uses = "$1@v$2"' $(WORKFLOWS_DIR)/$$i; \
	done
endef

Therefore, their calling conventions are different:

$(call update-version,actions/checkout,ACTIONS_CHECKOUT_VERSION,1)
$(call update-version-quay,cert-manager,CERT_MANAGER_VERSION)

# The version is substituted for update-trusted-action
$(call update-trusted-action,actions/checkout,$(ACTIONS_CHECKOUT_VERSION))

Signed-off-by: Daichi Sakaue <[email protected]>
@yokaze yokaze requested a review from terassyi November 10, 2023 05:39
Copy link
Contributor

@terassyi terassyi left a comment

Choose a reason for hiding this comment

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

LGTM

@yokaze yokaze merged commit 97b1765 into main Nov 10, 2023
1 check passed
@yokaze yokaze deleted the k8s-1.28 branch November 10, 2023 09:27
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.

2 participants