mirror of
https://github.com/kubevela/kubevela.git
synced 2026-08-23 22:46:53 +00:00
applicaiton supports specifying different versions of Definition (#1597)
* app support specify the version of definition * add e2e-test * add docs * add helm related test * fix doc * add more test * fix docs
This commit is contained in:
@@ -721,7 +721,7 @@ func (h *appHandler) handleRollout(ctx context.Context) (reconcile.Result, error
|
||||
// targetRevision should always points to LatestRevison
|
||||
targetRevision := h.app.Status.LatestRevision.Name
|
||||
var srcRevision string
|
||||
target, _ := oamutil.ExtractRevisionNum(targetRevision)
|
||||
target, _ := oamutil.ExtractRevisionNum(targetRevision, "-")
|
||||
// if target == 1 this is a initial scale operation, sourceRevision should be empty
|
||||
// otherwise source revision always is targetRevision - 1
|
||||
if target > 1 {
|
||||
|
||||
@@ -369,7 +369,7 @@ func (h historiesByRevision) Len() int { return len(h) }
|
||||
func (h historiesByRevision) Swap(i, j int) { h[i], h[j] = h[j], h[i] }
|
||||
func (h historiesByRevision) Less(i, j int) bool {
|
||||
// the appRevision is generated by vela, the error always is nil, so ignore it
|
||||
ir, _ := util.ExtractRevisionNum(h[i].Name)
|
||||
ij, _ := util.ExtractRevisionNum(h[j].Name)
|
||||
ir, _ := util.ExtractRevisionNum(h[i].Name, "-")
|
||||
ij, _ := util.ExtractRevisionNum(h[j].Name, "-")
|
||||
return ir < ij
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user