Skip to content
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

Added --async flag to argocd app sync #1738

Merged
merged 5 commits into from
Jun 14, 2019
Merged

Conversation

simster7
Copy link
Member

#1728. Short and sweet: async sync! Includes test

@codecov
Copy link

codecov bot commented Jun 13, 2019

Codecov Report

Merging #1738 into master will increase coverage by 0.06%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1738      +/-   ##
==========================================
+ Coverage    34.2%   34.27%   +0.06%     
==========================================
  Files          77       77              
  Lines       11444    11447       +3     
==========================================
+ Hits         3914     3923       +9     
+ Misses       6988     6978      -10     
- Partials      542      546       +4
Impacted Files Coverage Δ
cmd/argocd/commands/app.go 0.77% <0%> (-0.01%) ⬇️
controller/appcontroller.go 39.72% <0%> (+1.39%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 05097f3...68c6e00. Read the comment docs.

@codecov
Copy link

codecov bot commented Jun 13, 2019

Codecov Report

Merging #1738 into master will decrease coverage by <.01%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1738      +/-   ##
==========================================
- Coverage    34.2%   34.19%   -0.01%     
==========================================
  Files          77       77              
  Lines       11444    11447       +3     
==========================================
  Hits         3914     3914              
- Misses       6988     6991       +3     
  Partials      542      542
Impacted Files Coverage Δ
cmd/argocd/commands/app.go 0.77% <0%> (-0.01%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 05097f3...49a75cb. Read the comment docs.

@alexec alexec self-requested a review June 13, 2019 20:18
Copy link
Contributor

@alexec alexec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @simster7 - great stuff - thank you.

I've made some suggestions to tweaking the tests.

assert.NoError(t, err)
resources, err := kube.SplitYAML(manifests)
assert.NoError(t, err)
manipulateApplicationResources(t, app)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually don't think you should extract this func, I don't think you need it for your test. I'll explain why in my next comment.

test/e2e/app_management_test.go Show resolved Hide resolved
test/e2e/app_management_test.go Show resolved Hide resolved
@@ -63,6 +63,10 @@ func (a *Actions) PatchApp(patch string) *Actions {
func (a *Actions) Sync() *Actions {
args := []string{"app", "sync", a.context.name, "--timeout", "5"}

if a.context.async {
args = append(args, "--async")
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great stuff!

res, _ = fixture.RunCli("app", "sync", app.Name, "--label", "this-label=does-not-exist")
_, _ = fixture.RunCli("app", "sync", app.Name, "--label", fmt.Sprintf("app.kubernetes.io/instance=%s", app.Name))
}).
Expect(SyncStatusIs(SyncStatusCodeSynced)).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@alexec alexec merged commit 770832b into argoproj:master Jun 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants