Skip to content

Validate Ksonnet apps through component dir presence#708

Merged
merenbach merged 6 commits intoargoproj:masterfrom
merenbach:594-better-ksonnet-detection
Oct 24, 2018
Merged

Validate Ksonnet apps through component dir presence#708
merenbach merged 6 commits intoargoproj:masterfrom
merenbach:594-better-ksonnet-detection

Conversation

@merenbach
Copy link
Contributor

Closes #594

@merenbach merenbach requested a review from alexmt October 19, 2018 22:38
Copy link
Member

@jessesuen jessesuen left a comment

Choose a reason for hiding this comment

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

Based on the code changes, this is not addressing the issue I filed in the bug. The problem is that we are blindly assuming any directory with an app.yaml is a ksonnet app dir, and including it in the app list API.

@merenbach
Copy link
Contributor Author

@jessesuen mea culpa! Great catch. I believe this is now addressed with the latest commit, which causes the Argo CD UI to only show the Helm charts, and no Ksonnet apps, in the example repo provided in the original bug.

Copy link
Member

Choose a reason for hiding this comment

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

Can we avoid a n^2 algorithm for identifying ksonnet apps? Maybe iterate ksonnet apps first, store them as candidates in a map, then validate that they have adjacent component directories while you iterate componentRes.

Copy link
Contributor Author

@merenbach merenbach Oct 23, 2018

Choose a reason for hiding this comment

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

Good call, Jesse! O(2n) algorithm in place now.

@codecov-io
Copy link

codecov-io commented Oct 24, 2018

Codecov Report

Merging #708 into master will increase coverage by 0.01%.
The diff coverage is 44.44%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #708      +/-   ##
==========================================
+ Coverage   21.51%   21.52%   +0.01%     
==========================================
  Files          39       39              
  Lines        6228     6229       +1     
==========================================
+ Hits         1340     1341       +1     
  Misses       4707     4707              
  Partials      181      181
Impacted Files Coverage Δ
reposerver/repository/repository.go 20.67% <44.44%> (+0.29%) ⬆️

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 dca1996...2d1bd24. Read the comment docs.

@merenbach merenbach changed the title Validate Ksonnet apps through contents Validate Ksonnet apps through component dir presence Oct 24, 2018
@merenbach merenbach dismissed jessesuen’s stale review October 24, 2018 17:23

Addressed concerns

@merenbach merenbach merged commit 1844be6 into argoproj:master Oct 24, 2018
@merenbach merenbach deleted the 594-better-ksonnet-detection branch October 24, 2018 17:59
@jessesuen
Copy link
Member

@merenbach this change broke listing of ksonnet apps completely. Was this tested?

image

@merenbach merenbach restored the 594-better-ksonnet-detection branch October 27, 2018 14:07
@merenbach
Copy link
Contributor Author

@merenbach this change broke listing of ksonnet apps completely. Was this tested?

image

@jessesuen have issued PR #730 to revert this merge. I tested this, but less effectively than I needed to, is what it looks like.

alexmt pushed a commit that referenced this pull request Oct 29, 2018
ppapapetrou76 pushed a commit to ppapapetrou76/argo-cd that referenced this pull request Aug 19, 2025
* Add option to skip the dryrun from the sync context

Signed-off-by: Nick Heijmink <nick.heijmink@alliander.com>

* Fix test by mocking the discovery

Signed-off-by: Nick Heijmink <nick.heijmink@alliander.com>

* Fix linting errors

Signed-off-by: Nick Heijmink <nick.heijmink@alliander.com>

* Fix skip dryrun const

---------

Signed-off-by: Nick Heijmink <nick.heijmink@alliander.com>
ppapapetrou76 pushed a commit to ppapapetrou76/argo-cd that referenced this pull request Aug 19, 2025
…#708)" (argoproj#730)

* Revert "Add option to skip the dryrun from the sync context (argoproj#708)"

This reverts commit 717b8bf.

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* format

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

---------

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Co-authored-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
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.

4 participants