-
Notifications
You must be signed in to change notification settings - Fork 22
add linter to detect if changes occur in bindata that will be overwritten #863
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
base: main
Are you sure you want to change the base?
Conversation
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: kannon92 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 |
|
bindata is largely autogenerated. It should not be manually changed. |
Correct. I'm trying to avoid the scenario where someone modified that in a PR and we miss it. |
|
Gotcha. We should also do something like: #871 |
hack/check_bindata_conflicts.py
Outdated
| print(f"Running kustomize build on {src_dir}...") | ||
| try: | ||
| result = subprocess.run( | ||
| ["kustomize", "build", src_dir], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should run sync_manifests so the code isn't duplicated and is consistent on what is outputted.
| sync-manifests-from-submodule: | ||
| hack/sync_manifests.py --src-dir upstream/kueue/src/config/default/ | ||
|
|
||
| .PHONY: check-sync-manifests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you tried using Podman here? For e.g.
.PHONY: check-sync-manifests
check-sync-manifests:
@podman run --rm \
-v $(PWD):/workspace:Z \
-w /workspace \
python:3.11-slim \
sh -c " \
echo 'Installing dependencies...'; \
apt-get update -qq > /dev/null 2>&1; \
apt-get install -y -qq git curl jq > /dev/null 2>&1; \
echo 'Fetching latest kustomize version...'; \
KUSTOMIZE_VERSION=\$$(curl -s https://api.github.com/repos/kubernetes-sigs/kustomize/releases/latest | jq -r '.tag_name' | sed 's/kustomize\///'); \
curl -sL https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize%2Fv\$${KUSTOMIZE_VERSION}/kustomize_v\$${KUSTOMIZE_VERSION}_linux_amd64.tar.gz | tar xz -C /usr/local/bin > /dev/null 2>&1; \
pip install pyyaml requests > /dev/null 2>&1; \
echo 'Running check_bindata_conflicts.py...'; \
python3 hack/check_bindata_conflicts.py \
"There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
podman isn't in the CI...
openshift really makes these things difficult.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can add podman here (use that src for tests) and see if it helps.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
opened up openshift/release#71154.
hack/check_bindata_conflicts.py
Outdated
| @@ -0,0 +1,308 @@ | |||
| #!/usr/bin/env -S uv run --with pyyaml --with requests | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With https://github.com/openshift/kueue-operator/pull/863/files#r2492538226, you can simply make the following change:
| #!/usr/bin/env -S uv run --with pyyaml --with requests | |
| #!/usr/bin/env python3 |
|
/retest |
|
/test lint |
d842c68 to
8cf8a0e
Compare
|
@kannon92: The following tests failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
No description provided.