-
Notifications
You must be signed in to change notification settings - Fork 16
Support package refactor #1
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
Merged
Fiona-Waters
merged 7 commits into
project-codeflare:main
from
Fiona-Waters:support-package-refactor
Oct 18, 2023
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
c9a8a37
Move CFO support files
Fiona-Waters 501d80e
adding go.mod, go.sum
Fiona-Waters ffb6d38
adding makefile and gitignore
Fiona-Waters fae1824
updating makefile with defaults command
Fiona-Waters f030970
adding import workflow
Fiona-Waters e3b1833
updates to files
Fiona-Waters ce52e74
updating makefile
Fiona-Waters File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Verify Generated Files and Import Organization | ||
on: | ||
push: | ||
branches: | ||
- '**' | ||
paths: | ||
- '**.go' | ||
- '**go.mod' | ||
- '**go.sum' | ||
tags-ignore: | ||
- 'v*' | ||
pull_request: | ||
paths: | ||
- '**.go' | ||
- '**go.mod' | ||
- '**go.sum' | ||
jobs: | ||
verify-imports: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: v1.19 | ||
- name: Verify that imports are organized | ||
run: make verify-imports | ||
|
||
verify-manifests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: v1.19 | ||
- name: Verify that the latest WebhookConfigurations, ClusterRoles, and CustomResourceDefinitions have been generated | ||
run: make manifests && git diff --exit-code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ | |
*.dll | ||
*.so | ||
*.dylib | ||
bin | ||
|
||
# Test binary, built with `go test -c` | ||
*.test | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# CODEFLARE_SDK_VERSION defines the default version of the CodeFlare SDK | ||
CODEFLARE_SDK_VERSION ?= 0.9.0 | ||
|
||
# RAY_VERSION defines the default version of Ray (used for testing) | ||
RAY_VERSION ?= 2.5.0 | ||
|
||
# RAY_IMAGE defines the default container image for Ray (used for testing) | ||
RAY_IMAGE ?= rayproject/ray:$(RAY_VERSION) | ||
|
||
##@ Development | ||
|
||
DEFAULTS_TEST_FILE := support/defaults.go | ||
|
||
.PHONY: defaults | ||
defaults: | ||
$(info Regenerating $(DEFAULTS_TEST_FILE)) | ||
@echo "package support" > $(DEFAULTS_TEST_FILE) | ||
@echo "" >> $(DEFAULTS_TEST_FILE) | ||
@echo "// ***********************" >> $(DEFAULTS_TEST_FILE) | ||
@echo "// DO NOT EDIT THIS FILE" >> $(DEFAULTS_TEST_FILE) | ||
@echo "// ***********************" >> $(DEFAULTS_TEST_FILE) | ||
@echo "" >> $(DEFAULTS_TEST_FILE) | ||
@echo "const (" >> $(DEFAULTS_TEST_FILE) | ||
@echo " CodeFlareSDKVersion = \"$(CODEFLARE_SDK_VERSION)\"" >> $(DEFAULTS_TEST_FILE) | ||
@echo " RayVersion = \"$(RAY_VERSION)\"" >> $(DEFAULTS_TEST_FILE) | ||
@echo " RayImage = \"$(RAY_IMAGE)\"" >> $(DEFAULTS_TEST_FILE) | ||
@echo "" >> $(DEFAULTS_TEST_FILE) | ||
@echo ")" >> $(DEFAULTS_TEST_FILE) | ||
@echo "" >> $(DEFAULTS_TEST_FILE) | ||
|
||
gofmt -w $(DEFAULTS_TEST_FILE) | ||
|
||
## Tool Binaries | ||
CONTROLLER_GEN ?= $(LOCALBIN)/controller-gen | ||
|
||
## Tool Versions | ||
CONTROLLER_TOOLS_VERSION ?= v0.9.2 | ||
|
||
|
||
## Location to install dependencies to | ||
LOCALBIN ?= $(shell pwd)/bin | ||
$(LOCALBIN): | ||
mkdir -p $(LOCALBIN) | ||
|
||
OPENSHIFT-GOIMPORTS ?= $(LOCALBIN)/openshift-goimports | ||
|
||
.PHONY: openshift-goimports | ||
openshift-goimports: $(OPENSHIFT-GOIMPORTS) ## Download openshift-goimports locally if necessary. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should bring the corresponding GH actions workflows there too. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
$(OPENSHIFT-GOIMPORTS): $(LOCALBIN) | ||
test -s $(LOCALBIN)/openshift-goimports || GOBIN=$(LOCALBIN) go install github.com/openshift-eng/openshift-goimports@latest | ||
|
||
.PHONY: imports | ||
imports: openshift-goimports ## Organize imports in go files using openshift-goimports. Example: make imports | ||
$(OPENSHIFT-GOIMPORTS) | ||
|
||
.PHONY: verify-imports | ||
verify-imports: openshift-goimports ## Run import verifications. | ||
./hack/verify-imports.sh $(OPENSHIFT-GOIMPORTS) | ||
|
||
.PHONY: controller-gen | ||
controller-gen: $(CONTROLLER_GEN) ## Download controller-gen locally if necessary. | ||
$(CONTROLLER_GEN): $(LOCALBIN) | ||
test -s $(LOCALBIN)/controller-gen || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_TOOLS_VERSION) | ||
|
||
.PHONY: manifests | ||
manifests: controller-gen ## Generate RBAC objects. | ||
$(CONTROLLER_GEN) rbac:roleName=manager-role webhook paths="./..." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
module github.com/project-codeflare/codeflare-common | ||
|
||
go 1.19 | ||
|
||
require ( | ||
github.com/onsi/gomega v1.28.0 | ||
github.com/openshift-online/ocm-sdk-go v0.1.373 | ||
github.com/openshift/api v0.0.0-20231012181603-8f468d7b55a8 | ||
github.com/openshift/client-go v0.0.0-20231005121823-e81400b97c46 | ||
github.com/project-codeflare/multi-cluster-app-dispatcher v1.36.0 | ||
github.com/ray-project/kuberay/ray-operator v0.0.0-20231013074931-1184bc872c08 | ||
k8s.io/api v0.28.2 | ||
k8s.io/apimachinery v0.28.2 | ||
k8s.io/client-go v0.28.2 | ||
) | ||
|
||
require ( | ||
github.com/aymerick/douceur v0.2.0 // indirect | ||
github.com/beorn7/perks v1.0.1 // indirect | ||
github.com/cenkalti/backoff/v4 v4.1.3 // indirect | ||
github.com/cespare/xxhash/v2 v2.1.2 // indirect | ||
github.com/davecgh/go-spew v1.1.1 // indirect | ||
github.com/emicklei/go-restful/v3 v3.10.1 // indirect | ||
github.com/go-logr/logr v1.2.4 // indirect | ||
github.com/go-openapi/jsonpointer v0.19.6 // indirect | ||
github.com/go-openapi/jsonreference v0.20.2 // indirect | ||
github.com/go-openapi/swag v0.22.3 // indirect | ||
github.com/gogo/protobuf v1.3.2 // indirect | ||
github.com/golang-jwt/jwt/v4 v4.4.1 // indirect | ||
github.com/golang/glog v1.0.0 // indirect | ||
github.com/golang/protobuf v1.5.3 // indirect | ||
github.com/google/gnostic-models v0.6.8 // indirect | ||
github.com/google/go-cmp v0.5.9 // indirect | ||
github.com/google/gofuzz v1.2.0 // indirect | ||
github.com/google/uuid v1.3.0 // indirect | ||
github.com/gorilla/css v1.0.0 // indirect | ||
github.com/imdario/mergo v0.3.12 // indirect | ||
github.com/josharian/intern v1.0.0 // indirect | ||
github.com/json-iterator/go v1.1.12 // indirect | ||
github.com/mailru/easyjson v0.7.7 // indirect | ||
github.com/matttproud/golang_protobuf_extensions v1.0.2 // indirect | ||
github.com/microcosm-cc/bluemonday v1.0.18 // indirect | ||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect | ||
github.com/modern-go/reflect2 v1.0.2 // indirect | ||
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect | ||
github.com/prometheus/client_golang v1.14.0 // indirect | ||
github.com/prometheus/client_model v0.3.0 // indirect | ||
github.com/prometheus/common v0.37.0 // indirect | ||
github.com/prometheus/procfs v0.8.0 // indirect | ||
github.com/spf13/pflag v1.0.5 // indirect | ||
golang.org/x/net v0.14.0 // indirect | ||
golang.org/x/oauth2 v0.8.0 // indirect | ||
golang.org/x/sys v0.11.0 // indirect | ||
golang.org/x/term v0.11.0 // indirect | ||
golang.org/x/text v0.12.0 // indirect | ||
golang.org/x/time v0.3.0 // indirect | ||
google.golang.org/appengine v1.6.7 // indirect | ||
google.golang.org/protobuf v1.30.0 // indirect | ||
gopkg.in/inf.v0 v0.9.1 // indirect | ||
gopkg.in/yaml.v2 v2.4.0 // indirect | ||
gopkg.in/yaml.v3 v3.0.1 // indirect | ||
k8s.io/klog/v2 v2.100.1 // indirect | ||
k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect | ||
k8s.io/utils v0.0.0-20230505201702-9f6742963106 // indirect | ||
sigs.k8s.io/controller-runtime v0.11.1 // indirect | ||
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect | ||
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect | ||
sigs.k8s.io/yaml v1.3.0 // indirect | ||
) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.