-
Notifications
You must be signed in to change notification settings - Fork 218
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
Clean up manifests #510
Clean up manifests #510
Conversation
/assign @terrytangyuan |
@terrytangyuan Or we push the latest image with mpi-operator/.github/workflows/mpi-operator-docker-image-publish.yml Lines 29 to 33 in 05ac6ad
cc: @alculquicondor Updated I modified the CI to push the latest image with the |
d38ff6b
to
df5496b
Compare
@@ -31,6 +31,7 @@ jobs: | |||
type=ref,event=pr | |||
type=semver,pattern={{version}} | |||
type=semver,pattern={{major}}.{{minor}} | |||
type=raw,latest |
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.
but wouldn't this affect every tag?
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.
Does that mean the existing latest
tag image is overwritten?
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.
IIUC, by doing this the latest tag would always be overriden with every push. I think we should do this manually for new releases only.
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.
Makes sense. What do you think about replacing the image tag with master
in the following to avoid this confusing?
newTag: latest |
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.
that sounds better to me.
The manifests that are part of a release should have the specific release tag.
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.
Sounds good. I would update this PR.
df5496b
to
77989c6
Compare
@alculquicondor Updated. |
Can we update https://github.com/kubeflow/mpi-operator#installation to indicate that this will install the latest development version?
|
Makes sense. It is helpful. |
77989c6
to
1f4c681
Compare
@alculquicondor I updated the docs. |
git clone https://github.com/kubeflow/mpi-operator | ||
cd mpi-operator | ||
kubectl apply -f deploy/v2beta1/mpi-operator.yaml | ||
kubectl apply -f https://raw.githubusercontent.com/kubeflow/mpi-operator/master/deploy/v2beta1/mpi-operator.yaml |
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.
this file still says latest actually
mpi-operator/deploy/v2beta1/mpi-operator.yaml
Line 483 in 382da78
image: mpioperator/mpi-operator:latest |
regenerate the file
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 plan to generate that manifest in #509.
Do you prefer to regenerate the manifests in this PR?
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.
yes please
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.
Sure. I close #508 and regenerate manifests in this PR.
1f4c681
to
f30ee74
Compare
f30ee74
to
8df35aa
Compare
- name: generate codes | ||
run: make verify-generate |
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.
As discussed in #509 (review), we verify generated codes.
Makefile
Outdated
@@ -106,9 +110,13 @@ tidy: | |||
lint: bin/golangci-lint ## Run golangci-lint linter | |||
$(GOLANGCI_LINT) run --new-from-rev=origin/master --go 1.19 | |||
|
|||
# Generate deploy/v2beta1/mpi-operator.yaml | |||
all-in-one: kustomize crd |
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.
all-in-one
sounds very cryptic. What about manifest
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.
Sounds good.
plural: mpijobs | ||
shortNames: |
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.
should we add the shortname via kubebuilder markers? https://book.kubebuilder.io/reference/markers/crd.html
I say no, given that these names are too short to be meaningful
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 agree with you. I also think we don't need these shortNames.
Let me know what other members think.
cc: @terrytangyuan
type: object | ||
required: | ||
- Launcher | ||
additionalProperties: |
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 are losing the knowledge about Launcher and Worker here.
But this is a problem with the API structs themselves.
We shouldn't be using a map https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#lists-of-named-subobjects-preferred-over-maps
Maybe we can fix it in a v2(beta2) API, but it would be nice to fix other training job objects, like so:
type MPIReplicaSpecs struct {
Launcher common.ReplicaSpec `json:"launcher"`
Worker common.ReplicaSpec `json:"worker"`
}
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.
Looks good.
IIRC, we plan to remove dependencies with kubeflow/common in the future altogether.
So we will be able to fix this after that.
Either way, I create an issue to keep tracking this.
f9589f8
to
a1d0bf9
Compare
@alculquicondor This PR is ready for review. PTAL. |
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.
/lgtm
@@ -40,7 +40,7 @@ const ( | |||
|
|||
// initializeMPIJobStatuses initializes the ReplicaStatuses for MPIJob. | |||
func initializeMPIJobStatuses(mpiJob *kubeflow.MPIJob, mtype kubeflow.MPIReplicaType) { | |||
replicaType := kubeflow.MPIReplicaType(mtype) | |||
replicaType := mtype |
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.
just remove this line?
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.
Makes sense.
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.
Done.
Signed-off-by: Yuki Iwai <yuki.iwai.tz@gmail.com>
a1d0bf9
to
37967bc
Compare
Addressed comments and squashed commits into one. |
/lgtm |
/assign @terrytangyuan |
@terrytangyuan Can you add a approve label to this PR? We need this improvement for the v0.4.0 release. |
Let me try my new powers 😂 /approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alculquicondor 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 |
Great power 🚀 |
Signed-off-by: Yuki Iwai yuki.iwai.tz@gmail.com
I cleaned up manifests in the following:
make crd
target so that we can add the latest CRD to the manifests directory.deploy/v2beta1/mpi-operator.yaml
.Our operator images at dockerhub:
latest
: https://hub.docker.com/layers/mpioperator/mpi-operator/latest/images/sha256-3ccfa8d8b7bf97836b291f5cadb39afec4b3612acddb4a5f81ecccdfaede92f9?context=exploremaster
: https://hub.docker.com/layers/mpioperator/mpi-operator/master/images/sha256-84749d84196f15fa61b2a2786ae625b4b85dd750dd4dd5e39970d4985ebfc70a?context=exploreFixes: #508