Skip to content
This repository was archived by the owner on Jan 29, 2025. It is now read-only.

Commit 3081377

Browse files
killianmuldoontogashidm
killianmuldoon
authored andcommitted
Replace top level go mod with project specific dependency model
The Platform Aware Scheduling repository now contains multiple go dependency files - using a go.mod file in each subproject. This commit adds the files for the extender and Telemetry Aware Scheduling directories and removes the older single go.mod at the top level of the repo.
1 parent 48c2d0f commit 3081377

35 files changed

+809
-101
lines changed

.github/e2e/e2e_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ import (
1313

1414
"github.com/pkg/errors"
1515

16-
"github.com/intel/telemetry-aware-scheduling/telemetry-aware-scheduling/pkg/metrics"
17-
"github.com/intel/telemetry-aware-scheduling/telemetry-aware-scheduling/pkg/strategies/deschedule"
18-
"github.com/intel/telemetry-aware-scheduling/telemetry-aware-scheduling/pkg/strategies/dontschedule"
19-
"github.com/intel/telemetry-aware-scheduling/telemetry-aware-scheduling/pkg/strategies/scheduleonmetric"
20-
api "github.com/intel/telemetry-aware-scheduling/telemetry-aware-scheduling/pkg/telemetrypolicy/api/v1alpha1"
21-
tasclient "github.com/intel/telemetry-aware-scheduling/telemetry-aware-scheduling/pkg/telemetrypolicy/client/v1alpha1"
16+
"github.com/intel/platform-aware-scheduling/telemetry-aware-scheduling/pkg/metrics"
17+
"github.com/intel/platform-aware-scheduling/telemetry-aware-scheduling/pkg/strategies/deschedule"
18+
"github.com/intel/platform-aware-scheduling/telemetry-aware-scheduling/pkg/strategies/dontschedule"
19+
"github.com/intel/platform-aware-scheduling/telemetry-aware-scheduling/pkg/strategies/scheduleonmetric"
20+
api "github.com/intel/platform-aware-scheduling/telemetry-aware-scheduling/pkg/telemetrypolicy/api/v1alpha1"
21+
tasclient "github.com/intel/platform-aware-scheduling/telemetry-aware-scheduling/pkg/telemetrypolicy/client/v1alpha1"
2222
v1 "k8s.io/api/core/v1"
2323
"k8s.io/apimachinery/pkg/api/resource"
2424
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

.github/e2e/go.mod

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
module github.com/intel/platform-aware-scheduling/e2e
2+
3+
go 1.15
4+
5+
require (
6+
github.com/intel/platform-aware-scheduling/telemetry-aware-scheduling v0.0.0-00010101000000-000000000000
7+
github.com/pkg/errors v0.9.1
8+
k8s.io/api v0.20.2
9+
k8s.io/apimachinery v0.20.2
10+
k8s.io/client-go v0.20.2
11+
)
12+
13+
replace (
14+
github.com/intel/platform-aware-scheduling/extender => ../../extender
15+
github.com/intel/platform-aware-scheduling/telemetry-aware-scheduling => ../../telemetry-aware-scheduling
16+
)

.github/e2e/go.sum

Lines changed: 484 additions & 0 deletions
Large diffs are not rendered by default.

.github/workflows/end-to-end-test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ jobs:
1717
- name: Set up cluster with TAS and custom metrics
1818
run: ./.github/scripts/e2e_setup_cluster.sh
1919
- name: Run end to end tests
20-
run: go test -v ./.github/e2e/e2e_test.go
20+
run: cd .github/e2e/&& go test -v e2e_test.go

.github/workflows/go-build-and-test.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ jobs:
1818
go-version: 1.16
1919

2020
- name: Build
21-
run: go build -v ./...
21+
run: make test
2222

2323
- name: Test
24-
run: go test -v ./...
24+
run: make build
2525

2626
build-older-go-version:
2727
runs-on: ubuntu-latest
@@ -37,7 +37,7 @@ jobs:
3737
go-version: ${{ matrix.go-version }}
3838

3939
- name: Build
40-
run: go build -v ./...
40+
run: make build
4141

4242
- name: Test
43-
run: go test -v ./...
43+
run: make test

.github/workflows/static-analysis.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,22 +29,23 @@ jobs:
2929
with:
3030
go-version: 1.15
3131
- run: go get golang.org/x/tools/cmd/goimports; test -z $(goimports -l .) && test -z $(gofmt -l .)
32-
golangci:
32+
33+
golangci-TAS:
3334
strategy:
3435
matrix:
35-
go-version: [1.15.x]
36-
os: [ubuntu-latest]
36+
workingdir: [extender, telemetry-aware-scheduling]
3737
name: lint
38-
runs-on: ${{ matrix.os }}
38+
runs-on: ubuntu-latest
3939
steps:
4040
- uses: actions/checkout@v2
4141
- uses: actions/setup-go@v2
4242
with:
4343
go-version: 1.15
44-
- name: golangci-lint
44+
- name: golangci-lint-TAS
4545
uses: golangci/golangci-lint-action@v2
4646
with:
4747
version: v1.29
4848
skip-go-installation: true
49+
working-directory: ${{matrix.workingdir }}
4950
# Additional linting tools can be added here
5051
args: --enable=golint --timeout=5m

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,11 @@ With a policy like the above as part of the Kubernetes scheduler configuration t
6262

6363
To read more about scheduler extenders see the [official docs](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/scheduling/scheduler_extender.md).
6464

65+
## Adding a new extender to Platform Aware Scheduling
66+
Platform Aware Scheduling is a single repo designed to host multiple hardware enabling Kubernetes Scheduler Extenders. A new scheduler can be added with an issue and pull request.
67+
68+
Each project under the top-level repo has its own go module, dependency model and lifecycle.There is no single top level go.mod for the project. Some development tools and testing workflows may need to be done in the context of the go module they're targeting i.e. by changing into one of the directories that contains a go module.
69+
6570
## Communication and contribution
6671

6772
Report a bug by [filing a new issue](https://github.com/intel/telemetry-aware-scheduling/issues).

extender/go.mod

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module github.com/intel/platform-aware-scheduling/extender
2+
3+
go 1.15
4+
5+
require k8s.io/api v0.20.2

0 commit comments

Comments
 (0)