Skip to content

Commit d1b7331

Browse files
authored
Merge pull request #435 from AI-Hypercomputer/sudo-make-rm
Remove sudo requirement from make
2 parents de990b0 + 5a59ed7 commit d1b7331

11 files changed

+12
-15
lines changed

.github/workflows/build_tests.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,11 @@ jobs:
9898
usr/local/bin/
9999
~/.cache/pip
100100
${{env.pythonLocation}}
101-
key: xpk-deps-${{ matrix.python-version }}-${{needs.set-variables.outputs.run-id}}
101+
key: xpk-deps-${{ matrix.python-version }}-${{github.run_id}}-${{github.run_attempt}}
102102
lookup-only: true
103103
- name: install dependencies
104104
if : steps.check-cache.outputs.cache-hit != 'true'
105-
run: make install-lint && make install-dev
105+
run: make install-lint && make install-dev && cp ./bin/kubectl-kueue /usr/local/bin/kubectl-kueue && cp ./bin/kubectl-kjob /usr/local/bin/kubectl-kjob
106106
- name: Cache dependencies
107107
if : steps.check-cache.outputs.cache-hit != 'true'
108108
uses: actions/cache/save@v3
@@ -112,7 +112,7 @@ jobs:
112112
/usr/local/bin/kubectl-kjob
113113
~/.cache/pip
114114
${{env.pythonLocation}}
115-
key: xpk-deps-${{ matrix.python-version }}-${{needs.set-variables.outputs.run-id}}
115+
key: xpk-deps-${{ matrix.python-version }}-${{github.run_id}}-${{github.run_attempt}}
116116
linter:
117117
needs: [install-dependencies, set-variables]
118118
concurrency: # We support one build or nightly test to run at a time currently.

.github/workflows/reusable_batch_tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
/usr/local/bin/kubectl-kjob
5757
~/.cache/pip
5858
${{env.pythonLocation}}
59-
key: xpk-deps-3.10-${{inputs.run-id}}
59+
key: xpk-deps-3.10-${{github.run_id}}-${{github.run_attempt}}
6060
restore-keys: xpk-deps-3.10
6161
- name: Install expect package
6262
run: sudo apt-get install expect

.github/workflows/reusable_cluster_create.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959
/usr/local/bin/kubectl-kjob
6060
~/.cache/pip
6161
${{env.pythonLocation}}
62-
key: xpk-deps-3.10-${{inputs.run-id}}
62+
key: xpk-deps-3.10-${{github.run_id}}-${{github.run_attempt}}
6363
restore-keys: xpk-deps-3.10-
6464
- uses: 'google-github-actions/auth@v2'
6565
with:

.github/workflows/reusable_cluster_delete.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
/usr/local/bin/kubectl-kjob
5656
~/.cache/pip
5757
${{env.pythonLocation}}
58-
key: xpk-deps-3.10-${{inputs.run-id}}
58+
key: xpk-deps-3.10-${{github.run_id}}-${{github.run_attempt}}
5959
restore-keys: xpk-deps-3.10
6060
- name: Check xpk installation
6161
run: xpk --help

.github/workflows/reusable_cluster_private.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767
/usr/local/bin/kubectl-kjob
6868
~/.cache/pip
6969
${{env.pythonLocation}}
70-
key: xpk-deps-3.10-${{inputs.run-id}}
70+
key: xpk-deps-3.10-${{github.run_id}}-${{github.run_attempt}}
7171
restore-keys: xpk-deps-3.10
7272
- name: Set Google Cloud CLI properties to a unused zone to verify --zone arg is passed properly in commands.
7373
run: |

.github/workflows/reusable_integration_tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
/usr/local/bin/kubectl-kjob
4747
~/.cache/pip
4848
${{env.pythonLocation}}
49-
key: xpk-deps-3.10-${{inputs.run-id}}
49+
key: xpk-deps-3.10-${{github.run_id}}-${{github.run_attempt}}
5050
restore-keys: xpk-deps-3.10
5151
- name: "Set auth cidr"
5252
run: echo "AUTH_CIDR=$(curl api.ipify.org)/32" >> $GITHUB_ENV

.github/workflows/reusable_lint_and_format.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
/usr/local/bin/kubectl-kjob
4444
~/.cache/pip
4545
${{env.pythonLocation}}
46-
key: xpk-deps-${{matrix.python-version}}-${{inputs.run-id}}
46+
key: xpk-deps-${{matrix.python-version}}-${{github.run_id}}-${{github.run_attempt}}
4747
restore-keys: xpk-deps-${{matrix.python-version}}-
4848
- name: Run pylint
4949
run: make pylint

.github/workflows/reusable_storage_tests_by_type.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ jobs:
108108
/usr/local/bin/kubectl-kjob
109109
~/.cache/pip
110110
${{env.pythonLocation}}
111-
key: xpk-deps-3.10-${{inputs.run-id}}
111+
key: xpk-deps-3.10-${{github.run_id}}-${{github.run_attempt}}
112112
restore-keys: xpk-deps-3.10-
113113
- name: Verify xpk installation
114114
run: xpk --help

.github/workflows/reusable_unit_tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
/usr/local/bin/kubectl-kjob
3838
~/.cache/pip
3939
${{env.pythonLocation}}
40-
key: xpk-deps-3.10-${{inputs.run-id}}
40+
key: xpk-deps-3.10-${{github.run_id}}-${{github.run_attempt}}
4141
restore-keys: xpk-deps-3.10-
4242
# - name: Install dependecies
4343
# run: make install-dev

.github/workflows/reusable_workload_tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959
/usr/local/bin/kubectl-kjob
6060
~/.cache/pip
6161
${{env.pythonLocation}}
62-
key: xpk-deps-3.10-${{inputs.run-id}}
62+
key: xpk-deps-3.10-${{github.run_id}}-${{github.run_attempt}}
6363
restore-keys: xpk-deps-3.10-
6464
- name: Set Google Cloud CLI properties to a unused zone to verify --zone arg is passed properly in commands.
6565
run: |

Makefile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ PROJECT_DIR := $(realpath $(shell dirname $(firstword $(MAKEFILE_LIST))))
1515
KJOB_DOCKER_IMG := xpk_kjob
1616
KJOB_DOCKER_CONTAINER := xpk_kjob_container
1717
BIN_PATH=$(PROJECT_DIR)/bin
18-
USR_BIN_PATH=/usr/local/bin
1918

2019
.PHONY: install
2120
install: check-python check-gcloud install-gcloud-auth-plugin install-kueuectl install-kjobctl pip-install
@@ -46,7 +45,6 @@ mkdir-bin:
4645
install-kueuectl: mkdir-bin
4746
curl -Lo $(BIN_PATH)/kubectl-kueue $(KUEUECTL_URL);
4847
chmod +x $(BIN_PATH)/kubectl-kueue;
49-
sudo mv -f $(BIN_PATH)/kubectl-kueue $(USR_BIN_PATH)/kubectl-kueue;
5048

5149
.PHONY: install-kjobctl
5250
install-kjobctl: mkdir-bin
@@ -58,7 +56,6 @@ install-kjobctl: mkdir-bin
5856
docker cp $(KJOB_DOCKER_CONTAINER):/kjob/bin/kubectl-kjob $(BIN_PATH)/kubectl-kjob;
5957
docker rm -f $(KJOB_DOCKER_CONTAINER);
6058
docker image rm $(KJOB_DOCKER_IMG);
61-
sudo mv -f $(BIN_PATH)/kubectl-kjob $(USR_BIN_PATH)/kubectl-kjob;
6259

6360
.PHONY: install-gcloud-auth-plugin
6461
install-gcloud-auth-plugin:

0 commit comments

Comments
 (0)