add linter to detect if changes occur in bindata that will be overwritten#863
add linter to detect if changes occur in bindata that will be overwritten#863kannon92 wants to merge 4 commits intoopenshift:mainfrom
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 DetailsNeeds 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.
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.
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.
podman isn't in the CI...
openshift really makes these things difficult.
There was a problem hiding this comment.
I think you can add podman here (use that src for tests) and see if it helps.
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.
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. DetailsInstructions 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.