Feat: add workflow record actions (#2733)

* Feat: add application revision actions

* refactor workflow record and application revision

* generate doc

* fix rebase

* fix rebase

* delete comment

* fix comment

* delete suspend status

* use apply instead of update

* find latest comlete revision if the revision is not specified

* delete name

* fix primary key
This commit is contained in:
Tianxin Dong
2021-11-20 13:05:52 +08:00
committed by GitHub
parent 54eb662959
commit ff405cd62a
15 changed files with 1099 additions and 321 deletions
@@ -55,7 +55,6 @@ import (
"github.com/oam-dev/kubevela/pkg/oam/testutil"
"github.com/oam-dev/kubevela/pkg/oam/util"
common2 "github.com/oam-dev/kubevela/pkg/utils/common"
wfTypes "github.com/oam-dev/kubevela/pkg/workflow/types"
)
// TODO: Refactor the tests to not copy and paste duplicated code 10 times
@@ -2089,7 +2088,7 @@ var _ = Describe("Test Application Controller", func() {
app := appwithNoTrait.DeepCopy()
app.Name = "vela-test-app-trace"
app.SetNamespace(ns.Name)
app.Annotations = map[string]string{wfTypes.AnnotationPublishVersion: "v134"}
app.Annotations = map[string]string{oam.AnnotationPublishVersion: "v134"}
Expect(k8sClient.Create(ctx, ns)).Should(BeNil())
Expect(k8sClient.Create(ctx, app)).Should(BeNil())
@@ -2116,7 +2115,7 @@ var _ = Describe("Test Application Controller", func() {
web.Spec.Replicas = pointer.Int32(0)
Expect(k8sClient.Update(ctx, web)).Should(BeNil())
checkApp.Annotations[wfTypes.AnnotationPublishVersion] = "v135"
checkApp.Annotations[oam.AnnotationPublishVersion] = "v135"
Expect(k8sClient.Update(ctx, checkApp)).Should(BeNil())
testutil.ReconcileOnceAfterFinalizer(reconciler, reconcile.Request{NamespacedName: appKey})
checkApp = &v1beta1.Application{}