Skip to content

chore: update workflow and make controller method tryStartWorker private #4

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
merged 1 commit into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@ jobs:

- name: Semantic Release
id: semantic
uses: cycjimmy/semantic-release-action@v3.4.1
uses: cycjimmy/semantic-release-action@v4
with:
semantic_version: 18
extra_plugins: |
@semantic-release/release-notes-generator@^10
@semantic-release/github@^8
Expand All @@ -38,10 +37,8 @@ jobs:
- id: meta
uses: docker/metadata-action@v4
with:
images: |
tensorfusion/tensor-fusion-operator
tags: |
type=semver,pattern={{needs.release.outputs.version}}
images: tensorfusion/tensor-fusion-operator
tags: type=semver,pattern=${{needs.release.outputs.version}}
- name: Login to DockerHub
uses: docker/login-action@v2
with:
Expand All @@ -54,4 +51,5 @@ jobs:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
no-cache: true
4 changes: 2 additions & 2 deletions internal/controller/tensorfusionconnection_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ func (r *TensorFusionConnectionReconciler) Reconcile(ctx context.Context, req ct
}

// Start worker job
phase, err := r.TryStartWorker(ctx, connection, types.NamespacedName{Name: connection.Name, Namespace: connection.Namespace})
phase, err := r.tryStartWorker(ctx, connection, types.NamespacedName{Name: connection.Name, Namespace: connection.Namespace})
if err != nil {
log.Error(err, "Failed to start worker pod")
return ctrl.Result{}, err
Expand All @@ -140,7 +140,7 @@ func (r *TensorFusionConnectionReconciler) Reconcile(ctx context.Context, req ct
return ctrl.Result{}, nil
}

func (r *TensorFusionConnectionReconciler) TryStartWorker(ctx context.Context, connection *tfv1.TensorFusionConnection, namespacedName types.NamespacedName) (corev1.PodPhase, error) {
func (r *TensorFusionConnectionReconciler) tryStartWorker(ctx context.Context, connection *tfv1.TensorFusionConnection, namespacedName types.NamespacedName) (corev1.PodPhase, error) {
// Try to get the Pod
pod := &corev1.Pod{}
if err := r.Get(ctx, namespacedName, pod); err != nil {
Expand Down
Loading