-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
feat: Add version to offload nodes. Fixes #1944 and #1946 #1974
Merged
Merged
Changes from all commits
Commits
Show all changes
508 commits
Select commit
Hold shift + click to select a range
59c0aed
search
alexec daa5bd2
docs + help
alexec e31737a
Merge branch 'master' into apiserverimpl
simster7 678d5ae
Fix imports
simster7 8962a47
Fixes:
simster7 4556caf
error boundary + loading
alexec aa73fe2
Can create workflow tempaltes from UI
simster7 75d2f07
removed dup delete fields
alexec 06ffb49
lint
alexec 39803ec
vendor
alexec e84719f
ui
alexec 8f72da8
layout
alexec 49910f5
rm yamljs
alexec d46ed75
Fixed NoAuth issue
sarabala1979 619c8aa
Merge branch 'apiserverimpl' of https://github.com/argoproj/argo into…
sarabala1979 850669f
reduce workflow size
alexec a265031
ok
alexec 079029b
continue
alexec bbb8434
continue
alexec 008d19c
Remove leading space
whynowy ab84060
namespace filter
alexec 2922c89
added missing labels
alexec 350069e
help
alexec cf3c842
error boundary
alexec f5ce107
change creation endpoints
alexec 494ef47
lint
alexec 99b296a
refactor db logic removing unused methods
alexec 156bafb
tidy up
alexec fea29e7
Cron Workflow UI Core
simster7 53a83d2
Cron Workflows app layer
simster7 1c94ed9
Upgrade argo-ui dependency
simster7 737aab3
deps
alexec 3dbf433
Merge branch 'apiserverimpl' of github.com:argoproj/argo into apiserv…
alexec 4d598eb
fix: stack overflow error
alexec b902a28
Enhanced log command for workflow
sarabala1979 77b677b
Merge branch 'apiserverimpl' of https://github.com/argoproj/argo into…
sarabala1979 1714828
adds support to list cron workflows
alexec 39c1bf9
enhance cron list
alexec 551ec35
lint
alexec 8bbc8ec
add getter cron workflows
alexec f7141c1
add delete for cron workflows
alexec 442852c
small changes
alexec d310a9e
Re-instated namespace for creation URLs.
alexec 14628e7
Add Created on Cronworkflow
sarabala1979 66a29f8
Merge branch 'apiserverimpl' of https://github.com/argoproj/argo into…
sarabala1979 92ac216
Merge branch 'apiserverimpl' of https://github.com/argoproj/argo into…
sarabala1979 c77bfab
fix-up
alexec d17e2d2
remove ResubmitArchivedWorkflom
alexec 7cb6e49
tidy up
alexec b53a5e0
remove namespace from archive apis
alexec a5f922f
fix
alexec 302330d
updated cron ui
alexec d54459a
fix phases
alexec 399f129
clean up deps
alexec eacda3c
ruthless pruning of dependencies
alexec aba7c84
Refactored Auth Token functionality
sarabala1979 45646fd
Merge branch 'apiserverimpl' of https://github.com/argoproj/argo into…
sarabala1979 61f7f7f
bug fix
alexec dfafb96
Delete Untitled
sarabala1979 9f838e2
test permission
whynowy b71e630
fix
alexec 58353ae
Update manifests to ERSION
alexec bc8c31d
Update manifests to ERSION
alexec c424743
Update manifests to apiserverimpl
alexec eb04bd5
release
alexec 1a926a0
bits
alexec f1c53bf
1
alexec e0f9dd9
1
alexec e8a0c9e
commen
alexec e3a40c2
lint
alexec 6b793af
lint
alexec 2498147
codegen
alexec dd5d521
faster
alexec 79e0659
makefile
alexec 9b09bec
goimports
alexec c5e278c
VERSION
alexec 918eaa5
typo
alexec c5140af
makefile
alexec 631c848
finished missing test
alexec 6903277
corrected flag name
alexec efb9ab3
add TODO
alexec 66e180c
manifests
alexec ea7d0d0
refactored
sarabala1979 bd42919
Merge branch 'apiserverimpl' of https://github.com/argoproj/argo into…
sarabala1979 6f7ec53
snapshot
alexec aa18841
v1
alexec 85f8e39
ubuntu-1604:201903-01
alexec 5712a70
catch errors
alexec c9ecf82
upload assets
alexec f65cd6e
dep ensure
alexec 87ce187
remove bug in upload-asset.sh
alexec 2f79f24
lint
alexec 84a68c6
re-instate v0
alexec 4131e5d
only pull images ifNotPresent, so not being able to reach Docker Hub …
alexec a98a00b
try fix
alexec 2a0d7d7
fix: sed invalid
alexec 6f277da
debugging
alexec 1625138
push
alexec 139b09f
downloading
alexec d776cc4
fix install
alexec 6f1209b
fix: should not delete artifacts
alexec 1025669
add manifests
alexec 898f974
skip tests
alexec 2ac5bf6
latest
alexec 22b836f
latest
alexec b66d299
increase timeout
alexec 823ba8b
yamls
alexec 96f1ec9
quick-start
alexec 3560bb9
yamls
alexec defda9e
chore: remove make of clis
alexec 1f79091
Merge tag 'apiserverimpl' of github.com:argoproj/argo into apiserverimpl
alexec d676c67
Merge branch 'apiserverimpl' of github.com:argoproj/argo into apiserv…
alexec bf12b53
install kustomize
alexec 0307e2e
codegen
alexec 912be93
k3
alexec 629ce06
docs: update releasing.md
alexec c0905a1
chore: add missing .codecov.yaml
alexec 257a841
chore: try to install kustomize .. again
alexec edd21f7
chore: add `make pre-push`
alexec fbac0cd
fix: chmod pre-push hook
alexec d79bc93
/.vendor-new
alexec 87cb8e2
delete .vendor-new if exists
alexec c75a496
chore: create dist dir
alexec 68ac298
rename file
alexec 93500b1
run e2e test pre-push
alexec 6ea8c5d
pf
alexec dbd33cc
mkdir dist for CI
alexec e793564
added TODO for argo-server role
alexec e4e4b2e
re-order CI config
alexec 6e42c2c
fix: try fix pf
alexec ca48000
fix: background portforward on CI
alexec 1575035
feat: upload swagger assets to release
alexec 0ec6e94
updated manifests
alexec 5f5f187
remove redundancy
alexec d0946e5
add pre-commit target
alexec d154ede
added readinessProbe
alexec 3fc61e6
add GCP authprovider and fixed in list call
sarabala1979 5ac8b0c
fixed lint
sarabala1979 8a21c24
Merge branch 'apiserverimpl' of https://github.com/argoproj/argo into…
sarabala1979 4302c43
lint
alexec 54ab1bc
chore: logging
alexec ac8a62f
listen on 0.0.0.0:2746
alexec 90a7931
added v2 token
alexec 0c81d73
feat: add argo-server service account
alexec c9ce631
updated roles
alexec d5da88d
re-order build
alexec 640e8d1
ci: fix build
alexec 90a9d07
update manifests
alexec f6e4551
revert
alexec 41e2189
do not scale down deployment, maybe this will fix CI
alexec 8010e69
adds --force-namespace-isolation to controller
alexec 962065c
typo
alexec 191f1bb
namespace
alexec a47759e
1m
alexec 607cfd9
namespace: argo
alexec c25cbff
adds --force-namespace-isolation
alexec 4b3e965
FORCE_NAMESPACE_ISOLATION
alexec 5d31a06
logging
alexec 37d5c45
bug
alexec 145eb6d
logging
alexec a24db6b
fix namespace
alexec eba9582
add delay
alexec fd0dc30
run smoke tests before e2e on CI
alexec aa7d7c5
add debug logging
alexec 3280038
added guard of condition
alexec e2b8166
simplify update
alexec 6f49e62
fix: send offloaded node status to watch
alexec 2b88dca
test: add wait for workflow to be deleted
alexec 0ae6b19
test: print more diagnostics on failure
alexec 29fb493
chore: spelling
alexec fafdd9b
chore: remove debug logging
alexec ae99a28
test: watch should return offloaded node status
alexec 0f89ff7
chore: added comments
alexec 50acdbc
cron isolated informer
alexec 6a325a5
roles
alexec 4ee7602
get nodes
alexec a9de24a
lint
alexec 5334c60
stuff
alexec bb004b1
postgres.host=localhost
alexec 89805df
Incorporated Jesse Initial Comments
sarabala1979 c1ea1bd
Merge branch 'apiserverimpl' of https://github.com/argoproj/argo into…
sarabala1979 96cfc44
Update workflow_server_test.go
sarabala1979 2b0f786
Update workflow_server_test.go
sarabala1979 80b230c
Update workflow_server_test.go
sarabala1979 9e4bba9
incorporated Jesse comments
sarabala1979 f2bc0c8
Merge branch 'master' into apiserverimpl
simster7 79ed7ff
New CLI tests
simster7 51dcb1c
Merge branch 'master' into apiserverimpl
simster7 db68dbd
Adds diagnostics to tests.
alexec 43ac0ec
Minor test rework
simster7 18058f5
Merge branch 'apiserverimpl' of https://github.com/argoproj/argo into…
simster7 cc166ea
Removed Kubeservice
sarabala1979 f840729
Merge branch 'apiserverimpl' of https://github.com/argoproj/argo into…
sarabala1979 38d20e0
Fix CronWorkflow tests
simster7 bbbadcb
Merge branch 'apiserverimpl' of https://github.com/argoproj/argo into…
simster7 c4ae91c
disable forcing off offloading
alexec 01c6e9e
Add workflow create verb to namespace install
simster7 690e05a
Skip legacy test
simster7 960d962
add github action
alexec bc1092b
fix links
alexec 19185f7
fix for code review comment
alexec 5aa433a
remove quick start
alexec adbfffe
fix version
alexec bc3da04
Merge branch 'apiserverimpl' of github.com:argoproj/argo into apiserv…
alexec b4a7e05
reinstate behaviour of Dockerfile
alexec 4b3e827
Added WorkflowTemplate test infra and smoke test
simster7 f8378db
Merge branch 'apiserverimpl' of https://github.com/argoproj/argo into…
simster7 7d89014
logging
alexec 6caa777
re-order more flakey task earlier
alexec 1cd7124
Dockerfile
alexec 64d15e4
lock yarn for speed
alexec 08d76c3
update watch
alexec 33f3b41
Merge branch 'master' into apiserverimpl
alexec a6b421c
post-merge fixes
alexec e2d4a7f
work!
alexec b61fe1a
more logging
alexec 5c89895
feat: Enable MAX_WORKFLOW_SIZE. Closes #1946
alexec 57c9396
feat: Add resourceversion to offload and archive tables. Fixes #1944
alexec e5fb64c
Update README.md
alexec 3246a9c
add version to offloaded nodes
alexec 77257ea
Merge branch 'nos' of github.com:alexec/argo into nos
alexec e219d5f
Merge branch 'master' into nos
alexec 0b2c519
Fixes
alexec 9df5a18
fix test
alexec b259813
Merge branch 'master' into nos
alexec d56fccc
Merge branch 'master' into nos
alexec d75819f
Merge remote-tracking branch 'origin/master' into nos
alexec 644625b
trigger ci
alexec ba55e46
feat: add clustername to tables
alexec 93a2fcd
Merge remote-tracking branch 'origin/master' into nos
alexec 71109e7
changes
alexec 3a8dcff
fix SQL syntax error
alexec 4cf579f
fix: logic error
alexec c87fcb8
slightly longer timeout
alexec 0a23c5f
pointer for slice
alexec 698f4ae
only print diagnostics for e2e tests
alexec 01a1c5b
correct README.md
alexec 321189a
fix e2e tests
alexec 89c8e6d
Merge branch 'master' into nos
alexec 6e70609
codegen
alexec 9ffbab4
Merge branch 'master' into nos
alexec 9870772
fix: post-merge error
alexec 46527bc
Merge branch 'master' into nos
alexec 07ccbf1
Merge
alexec b852c54
Merge branch 'nos' of github.com:alexec/argo into nos
alexec e74f1e2
Merge branch 'master' into nos
alexec 3de1820
feat(sql): post merge fixes
alexec 8594d92
Merge branch 'master' into nos
alexec 2bac47f
lint
alexec 24a68d8
code review comments
alexec 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 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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,11 @@ | ||
package sqldb | ||
|
||
import "upper.io/db.v3/lib/sqlbuilder" | ||
|
||
// represent a straight forward change that is compatible with all database providers | ||
type ansiSQLChange string | ||
|
||
func (s ansiSQLChange) Apply(session sqlbuilder.Database) error { | ||
_, err := session.Exec(string(s)) | ||
return err | ||
} |
This file contains 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,56 @@ | ||
package sqldb | ||
|
||
import ( | ||
"fmt" | ||
|
||
log "github.com/sirupsen/logrus" | ||
"upper.io/db.v3" | ||
"upper.io/db.v3/lib/sqlbuilder" | ||
) | ||
|
||
type backfillClusterName struct { | ||
clusterName string | ||
tableName string | ||
} | ||
|
||
func (s backfillClusterName) String() string { | ||
return fmt.Sprintf("backfillClusterName{%s,%s}", s.clusterName, s.tableName) | ||
} | ||
|
||
func (s backfillClusterName) Apply(session sqlbuilder.Database) error { | ||
log.WithField("clustername", s.clusterName).Info("Back-filling cluster name") | ||
rs, err := session. | ||
Select("uid"). | ||
From(s.tableName). | ||
Where(db.Cond{"clustername": nil}). | ||
Query() | ||
if err != nil { | ||
return err | ||
} | ||
for rs.Next() { | ||
uid := "" | ||
err := rs.Scan(&uid) | ||
if err != nil { | ||
return err | ||
} | ||
logCtx := log.WithFields(log.Fields{"clustername": s.clusterName, "uid": uid}) | ||
logCtx.Info("Back-filling cluster name") | ||
res, err := session. | ||
Update(s.tableName). | ||
Set("clustername", s.clusterName). | ||
Where(db.Cond{"clustername": nil}). | ||
And(db.Cond{"uuid": uid}). | ||
Exec() | ||
if err != nil { | ||
return err | ||
} | ||
rowsAffected, err := res.RowsAffected() | ||
if err != nil { | ||
return err | ||
} | ||
if rowsAffected != 1 { | ||
logCtx.WithField("rowsAffected", rowsAffected).Warn("Expected exactly one row affected") | ||
} | ||
} | ||
return nil | ||
} |
This file contains 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,66 @@ | ||
package sqldb | ||
|
||
import ( | ||
"encoding/json" | ||
"fmt" | ||
|
||
log "github.com/sirupsen/logrus" | ||
"upper.io/db.v3" | ||
"upper.io/db.v3/lib/sqlbuilder" | ||
|
||
wfv1 "github.com/argoproj/argo/pkg/apis/workflow/v1alpha1" | ||
) | ||
|
||
type backfillNodes struct { | ||
tableName string | ||
} | ||
|
||
func (s backfillNodes) String() string { | ||
return fmt.Sprintf("backfillNodes{%s}", s.tableName) | ||
} | ||
|
||
func (s backfillNodes) Apply(session sqlbuilder.Database) error { | ||
log.Info("Backfill node status") | ||
rs, err := session.SelectFrom(s.tableName). | ||
Columns("workflow"). | ||
Where(db.Cond{"version": nil}). | ||
Query() | ||
if err != nil { | ||
return err | ||
} | ||
for rs.Next() { | ||
workflow := "" | ||
err := rs.Scan(&workflow) | ||
if err != nil { | ||
return err | ||
} | ||
var wf *wfv1.Workflow | ||
err = json.Unmarshal([]byte(workflow), &wf) | ||
if err != nil { | ||
return err | ||
} | ||
marshalled, version, err := nodeStatusVersion(wf.Status.Nodes) | ||
if err != nil { | ||
return err | ||
} | ||
logCtx := log.WithFields(log.Fields{"name": wf.Name, "namespace": wf.Namespace, "version": version}) | ||
logCtx.Info("Back-filling node status") | ||
res, err := session.Update(archiveTableName). | ||
Set("version", wf.ResourceVersion). | ||
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. Also this line - the archive table doesn't have a version column |
||
Set("nodes", marshalled). | ||
Where(db.Cond{"name": wf.Name}). | ||
And(db.Cond{"namespace": wf.Namespace}). | ||
Exec() | ||
if err != nil { | ||
return err | ||
} | ||
rowsAffected, err := res.RowsAffected() | ||
if err != nil { | ||
return err | ||
} | ||
if rowsAffected != 1 { | ||
logCtx.WithField("rowsAffected", rowsAffected).Warn("Expected exactly one row affected") | ||
} | ||
} | ||
return nil | ||
} |
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.
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 this line read the following? (as there is no uuid column)
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 - though why exactly any SQL framework would not throw some kind of exception at this clear error is beyond me 😠 😠 😠 😠
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.
actually - maybe this code never runs
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.
It's running for me on migrating a legacy database ...
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.
did it migrate successfully? give that it'l likely that every record should have "default" it may be just luckily - though I ask again - who writes framework that allows such a big error thought?
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.
no reviewing the code - this backfill is really implemented stupidly - I think I'll make a patch fix and then a re-write
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.
#2141