-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Sync wave #1634
Merged
Merged
Sync wave #1634
Changes from 1 commit
Commits
Show all changes
445 commits
Select commit
Hold shift + click to select a range
5279600
k3s kubectl version
alexec d154ab5
argocd app list
alexec 5c10781
sudo k3s server --docker
alexec cdbbd9e
Merge branch 'master' into circleci
alexec 647e850
INSTALL_K3S_SKIP_START: true
alexec df521f5
--docker
alexec 703bdcf
stuff
alexec d03df5b
https://hooks.slack.com/services/T2G8RTHAM/BJKUFD3UK/C3MykGqtVLKFcSzM…
alexec d894f9d
link to cd.apps
alexec 7177cbb
commands
alexec b07acb2
- install_tools:
alexec 5932ee0
version: 2.1
alexec bb8ff0e
commands
alexec 737358d
cache
alexec 26dfac3
tidy up
alexec 4decafa
refactor
alexec fc16c50
restore_go_cache
alexec 46ca43b
dl-v3
alexec f7e75d5
e2e
alexec 666dff5
command: make cli
alexec 97f23e3
name: Make CLI
alexec 654859f
kubectx
alexec d0a1284
un-comment
alexec a474008
v11
alexec 1b31526
echo export PATH="`pwd`/dist:\$PATH" | tee -a $BASH_ENV
alexec 9214d39
rm print_system_info
alexec 7bca571
- store_test_results:
alexec 188b141
ARGOCD_OPTS
alexec fd7ea09
wait for argo cd
alexec bde8ee2
codegen
alexec 3011e38
--retry-connrefused
alexec 28547c7
nolint
alexec f8c80a0
codegen
alexec e9f8355
jobs + codegen
alexec 306653a
stat
alexec ac2bcf3
sleep 30
alexec b6eb743
stat 2
alexec 2e97fbc
sudo make start-e2e
alexec 2740aa8
names
alexec d23b531
environment
alexec 49a7b6c
remove thing
alexec 189e564
go env
alexec b19f6df
go-swagger
alexec e86841d
env
alexec 5989d83
go v1.11.10
alexec fc5aa8f
/usr/local/go
alexec d7b2fdd
faster
alexec 6f9b79e
workspace
alexec 9fc3be4
Remove checked out code
alexec 8689924
Update config.yml
alexec 6ed289c
clean
alexec 33ee07b
swagger
alexec 959320a
Merge branch 'master' into sync-wave
alexec e9a27ea
pre-commit
alexec d73d555
go version
alexec 866f6dd
Update config.yml
alexec 93b2741
TODOs
alexec b287260
Update config.yml
alexec 86b2885
changes
alexec 5cf5871
echo "export PATH=\$GOPATH/bin:\$PATH" | tee -a $BASH_ENV
alexec 62fa1a9
ogging
alexec e052672
go diagnotics
alexec 5b3f8c7
Golang diagnostics
alexec ab8ef2d
simple
alexec c920429
GOROOT
alexec de1ce92
/home/circleci/sdk/go1.11.4
alexec b094bb5
one or more tasks are running
alexec c34f0fb
swagger
alexec 45f1b56
no sudo make
alexec 37f45c2
go-v14
alexec 3f7ab9e
logging
alexec 841076e
GOPATH back
alexec ec36ee8
bits
alexec 32ba288
:!
alexec bf9a505
bits
alexec e9f00be
vendor-v4
alexec 1013d32
sudo chmod a+rw /etc/rancher/k3s/k3s.yaml.lock
alexec b0ae1f0
logging
alexec 4ed1801
chmod -R
alexec b6ded8e
sudo chmod -R a+rw /etc/rancher/k3s
alexec 6434b27
changes
alexec e99ff6b
Gopkg.lock
alexec 72e28a9
sleep 60
alexec 3650fcd
add a build step
alexec 2347efb
more check
alexec 55ec43a
970b561bbc525ee84641edf295de3d30b5746c1b7f6ca333de37655cad160789
alexec 36f1c3d
indent
alexec 67d44a2
print
alexec 1b87ce8
vendor-v5
alexec e40a202
changes
alexec 91124ca
changes
alexec fa8843e
:!Gopkg.lock
alexec c7411ab
tests pass
alexec e76be02
some test CLI
alexec dcc5ef3
test CLI
alexec 076df4a
kubectl version
alexec c5e8174
test selective sync
alexec 43a513c
selective sync does not run hooks
alexec b539073
make CLI before starting Argo
alexec 36c59c2
pruning required test
alexec 4cc261c
start each process
alexec 1228260
revert change
alexec 4eb3302
ops
alexec 433e617
Info -> Debug
alexec edd026b
env
alexec 8da3e25
guard
alexec ea984a8
create ns/apply manifests
alexec 7520289
kubectl config view
alexec b2fd585
skip hook
alexec 87e8e33
fix
alexec 39ebaad
k3s
alexec 882e0c8
kubeconfig.yml
alexec 78ed43e
cat ~/.kube/config
alexec 9107ec9
kubectl config view
alexec febfc3a
remove log colors
alexec 0f260e0
go-v14-master
alexec 0bf2b79
https://localhost:6443
alexec 04079a5
/var/lib/rancher/k3s/server/tls/localhost.crt
alexec 8763f39
/var/lib/rancher/k3s/server/tls/token-ca.crt
alexec c9ac54e
hostname
alexec 44bc8ca
>
alexec cea3864
sed
alexec 80e83b5
update-ca-certificates
alexec f0f2e3d
/var/lib/rancher/k3s/server/tls/token-ca.crt
alexec cae0008
6443
alexec d2141c1
curl -v https://`hostname`:6443
alexec 7de4199
cat /etc/hosts
alexec 2d812f8
sudo echo "127.0.0.1 `hostname`" >> /etc/hosts
alexec 48e1a4d
tee
alexec 9a30ffb
delete
alexec 802a3d5
env
alexec 6af7a0b
you@example.com
alexec 87e6af2
indent
alexec 6225b16
indent 2
alexec d68adf4
remove pull
alexec 284aba7
smoke test CLI
alexec 2679324
smoke test
alexec 5bf98bd
delay make cli
alexec b3a2a57
deal with nil health
alexec f03d0c2
sleep
alexec 5e59240
remove unused code
alexec f12f653
corrected comments
alexec f30a8fa
sleep 60
alexec ceee3fa
clean-up
alexec f890502
cleanup
alexec 0572f10
cleanup
alexec 1b62a5d
ci
alexec e31c053
sleep 30
alexec 740d65c
cover
alexec 07a5020
hooks
alexec 4d26f10
horrible hook tests
alexec 80740f4
print err
alexec ad46b91
testns
alexec e62a1bc
reordec
alexec f2f3770
zero
alexec d7e15a0
comments
alexec 74b9ccb
adds test
alexec c686707
KUBERNETES_SERVICE_HOST
alexec d292df9
comment
alexec e5cb8b2
--kubeconfig
alexec 8da87ac
--kubeconfig
alexec 3fec0f6
print env
alexec d77a93b
comp issue
alexec 8d35e7d
deprecate hook
alexec 5a170d1
logging
alexec f7e2c65
fixed test
alexec c5ec9a2
changes
alexec 0db138a
ARGOCD_FAKE_IN_CLUSTER: "true"
alexec 94b9c84
tests
alexec 6ff6a6d
Merge branch 'master' into circleci
alexec b3ddcf4
imports
alexec 3222393
changes
alexec fb1ab00
master
alexec bb86bce
refactor
alexec d755880
skip tests on CI
alexec ee4b07b
adde check on private repo
alexec 9b3ec87
degraded
alexec 4dbcffc
configure git
alexec 44b205a
comment
alexec 608a038
install jq from dl rather than apt
alexec 235ee15
git test
alexec a079740
reorder
alexec 5b1689f
deep copy
alexec 9ceb8a7
remove print changes
alexec 1a5ad02
long dir
alexec 19e14a4
logging
alexec b034a41
pass test maybe?
alexec 4f945d4
Merge branch 'circleci' into sync-wave
alexec 6e6c711
fixes
alexec 3a0ca02
gofmt
alexec 6f15ecb
imports
alexec 13eebd1
fix bugs
alexec c93869c
tweaks
alexec d554c23
delete more
alexec 4732cb0
sync
alexec cad7dc1
TestResourceAction passess locally
alexec 1d2a841
fix typo
alexec b88080c
fix deletion
alexec dca1f7b
Merge branch 'master' into sync-wave
alexec 834e173
Merge branch 'master' into sync-wave
alexec 1f62a5c
fixed one test
alexec bfd287b
String
alexec 9d2900c
bits
alexec 1c172f1
fixes stuff
alexec 0d15c3f
Merge branch 'master' into sync-wave
alexec bcd9fdd
fixes test
alexec 70c87f3
adds "Hook bool" to state.go
alexec 69027bc
adds ""title": "the type of the hook, empty for not-hook..." to swagg…
alexec cbf0a15
adds ""github.com/argoproj/argo-cd/test/e2e/fixture"" to hook_test.go
alexec 5596bd1
fixes CLI
alexec ad6bb57
code review comments
alexec eb33a05
adds "successful := true" to sync.go
alexec 10fcdfe
adds "// https://github.com/helm/helm/blob/master/pkg/ti..." to sync_…
alexec bff650d
adds ""PodDisruptionBudget"," to sync_tasks.go
alexec 56ffbd7
ignore Helm hooks
alexec 3161ace
adds "" to git_test.go
alexec 435c4da
ignore Helm hooks
alexec 9b14184
adds ""github.com/argoproj/argo-cd/util/resource"" to ignore.go
alexec 47f6541
lint
alexec 7bc6b7a
lint
alexec 59b00d2
adds "ignore := liveObj != nil && (hookutil.IsHook(liveO..." to healt…
alexec c045181
Merge branch 'master' into sync-wave
alexec 2d92e46
"lint" to appcontroller_test.go
alexec 7c0802d
bug fixes and tidy up
alexec 313ab02
fix bug
alexec 74c2ae1
ignore hooks in selective sync
alexec 9a86103
docs
alexec b179464
""testing"" to appcontroller_test.go
alexec 8404ccf
"func TestSelectiveSyncDoesNotRunHooks(t *testing.T..." to selective_…
alexec f90b461
Merge branch 'master' into sync-wave
alexec 59da0a7
goimports
alexec 51ec7fa
"goimports -local github.com/argoproj/argo-cd -w $(..." to Makefile
alexec 137f5b0
keep latest messages
alexec e3e3b41
removes dotimports
alexec 7c51860
"goimports -local github.com/argoproj/argo-cd -w $(..." to Makefile
alexec b352366
" || !resource.Ignore(obj)) {..." to app.go
alexec 6da9974
"assert.Equal(t, ResourceResult{Version: "v1", Kind..." to hook_test.go
alexec f43656e
"// the magic one make sure none of the above entri..." to sync_tasks.go
alexec adbf19b
"# golangci-lint does not do a go job of formatting..." to Makefile
alexec e8f16e7
Merge branch 'master' into sync-wave
alexec cebff13
""title": "the type of the hook, empty for not-hook..." to swagger.json
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
changes
- Loading branch information
commit 6434b27b2e6394101d4b92a095afe57c1680a0a9
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -271,7 +271,7 @@ func (sc *syncContext) sync() { | |
|
||
sc.setOperationPhase(OperationRunning, fmt.Sprintf("running phase='%s' wave=%d", phase, wave)) | ||
|
||
sc.log.WithFields(log.Fields{"tasks": tasks}).Info("wet run") | ||
sc.log.WithFields(log.Fields{"tasks": tasks}).Info("wet-run") | ||
if !sc.runTasks(tasks, false) { | ||
sc.setOperationPhase(OperationFailed, "one or more objects failed to apply") | ||
} | ||
|
@@ -293,7 +293,7 @@ func (sc *syncContext) skipHooks() bool { | |
} | ||
|
||
func (sc *syncContext) containsResource(resourceState managedResource) bool { | ||
return (resourceState.Live != nil && argo.ContainsSyncResource(resourceState.Live.GetName(), resourceState.Live.GroupVersionKind(), sc.syncResources)) || | ||
return !sc.isSelectiveSync() || (resourceState.Live != nil && argo.ContainsSyncResource(resourceState.Live.GetName(), resourceState.Live.GroupVersionKind(), sc.syncResources)) || | ||
(resourceState.Target != nil && argo.ContainsSyncResource(resourceState.Target.GetName(), resourceState.Target.GroupVersionKind(), sc.syncResources)) | ||
} | ||
|
||
|
@@ -304,7 +304,7 @@ func (sc *syncContext) getSyncTasks() (tasks syncTasks, successful bool) { | |
|
||
for _, resource := range sc.compareResult.managedResources { | ||
// TODO tests | ||
if sc.isSelectiveSync() && !sc.containsResource(resource) { | ||
if !sc.containsResource(resource) { | ||
continue | ||
} | ||
obj := resource.Target | ||
|
@@ -332,7 +332,7 @@ func (sc *syncContext) getSyncTasks() (tasks syncTasks, successful bool) { | |
// or formulated at the time of the operation (metadata.generateName). If user specifies | ||
// metadata.generateName, then we will generate a formulated metadata.name before submission. | ||
|
||
// TODO - test | ||
// TODO - test (probably a bug here) | ||
if task.targetObj.GetName() == "" { | ||
postfix := strings.ToLower(fmt.Sprintf("%s-%s-%d", sc.syncRes.Revision[0:7], task.phase, sc.opState.StartedAt.UTC().Unix())) | ||
generateName := task.targetObj.GetGenerateName() | ||
|
@@ -350,6 +350,7 @@ func (sc *syncContext) getSyncTasks() (tasks syncTasks, successful bool) { | |
} | ||
|
||
for _, task := range tasks { | ||
// TODO - no version? | ||
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. This is based on existing code, which ignored the version. Was that correct? |
||
_, result := sc.syncRes.Resources.Find(task.group(), task.kind(), task.namespace(), task.name(), task.phase) | ||
if result != nil { | ||
task.syncStatus = result.SyncStatus | ||
|
@@ -365,7 +366,7 @@ func (sc *syncContext) getSyncTasks() (tasks syncTasks, successful bool) { | |
// skip verification during `kubectl apply --dry-run` since we expect the CRD | ||
// to be created during app synchronization. | ||
if apierr.IsNotFound(err) && sc.hasCRDOfGroupKind(task.group(), task.kind()) { | ||
sc.log.WithFields(log.Fields{"task": task.String()}).Info("skip dry-run for customq resource") | ||
sc.log.WithFields(log.Fields{"task": task.String()}).Info("skip dry-run for custom resource") | ||
task.skipDryRun = true | ||
} else { | ||
sc.setResourceResult(task, ResultCodeSyncFailed, "", err.Error()) | ||
|
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
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.
I've put most of the logging at debug level, what should we raise to info level?