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

Argo CD CLI app diff/sync to local manifest always fails on **Windows** operating system #10945

Closed
3 tasks done
chris-codeflow opened this issue Oct 14, 2022 · 1 comment · Fixed by #10946
Closed
3 tasks done
Labels
bug Something isn't working

Comments

@chris-codeflow
Copy link
Contributor

Checklist:

  • I've searched in the docs and FAQ for my answer: https://bit.ly/argocd-faq.
  • I've included steps to reproduce the bug.
  • I've pasted the output of argocd version.

Describe the bug

Argo CD CLI app diff and app sync with --local flag doesn't work on Windows operating system.

To Reproduce

  1. Create and sync an app (referencing a Helm chart) from a Git repository.
  2. Clone the Git repository and make a change without committing it.
  3. Use the Argo CD CLI to either view the difference or sync the app using the --local flag (for example: argocd app diff test --local ./chart).

Expected behavior

The Argo CD CLI either shows the app manifest difference(s) between the live and local app manifest (if using argocd app diff) or can sync the app to match the local app manifest (if using argocd app sync).

Screenshots

The Argo CD CLI always displays an error stating that the values.yaml file (in the Git repo) resolved to outside of the repository root, as follows:

time="2022-10-14T14:55:37+01:00" level=fatal msg="value file 'values.yaml' resolved to outside repository root"

No combination of paths or use of the --local-repo-root option can resolve the error.

Version

argocd: v2.3.4+ac8b7df
  BuildDate: 2022-05-18T13:11:31Z
  GitCommit: ac8b7df9467ffcc0920b826c62c4b603a7bfed24
  GitTreeState: clean
  GoVersion: go1.17.9
  Compiler: gc
  Platform: windows/amd64
argocd-server: v2.4.11+3d9e9f2
  BuildDate: 2022-08-22T09:13:16Z
  GitCommit: 3d9e9f2f95b7801b90377ecfc4073e5f0f07205b
  GitTreeState: clean
  GoVersion: go1.18.5
  Compiler: gc
  Platform: linux/amd64
  Kustomize Version: v4.4.1 2021-11-11T23:36:27Z
  Helm Version: v3.8.1+g5cb9af4
  Kubectl Version: v0.23.1
  Jsonnet Version: v0.18.0

Logs

None

@chris-codeflow chris-codeflow added the bug Something isn't working label Oct 14, 2022
@chris-codeflow
Copy link
Contributor Author

I analyzed this bug and found the root cause in the file /util/io/path/resolved.go. Both the resolveSymbolicLinkRecursive and ResolveFilePath functions assume the directory separator to be the *nix / character, which is not the case for Windows operating systems.

I changed the functions to use string(os.PathSeparator) instead of the hard-coded string "/" and rebuilt the CLI for Windows. This resolved the issue. I will submit a PR for the fix.

alexmt pushed a commit that referenced this issue Oct 14, 2022
…al file paths (#10945) (#10946)

fix: Use os.PathSeparator instead of hard-coded string to resolve local file paths (#10945) (#10946)
alexmt pushed a commit that referenced this issue Oct 14, 2022
…al file paths (#10945) (#10946)

fix: Use os.PathSeparator instead of hard-coded string to resolve local file paths (#10945) (#10946)
alexmt pushed a commit that referenced this issue Oct 14, 2022
…al file paths (#10945) (#10946)

fix: Use os.PathSeparator instead of hard-coded string to resolve local file paths (#10945) (#10946)
alexmt pushed a commit that referenced this issue Oct 14, 2022
…al file paths (#10945) (#10946)

fix: Use os.PathSeparator instead of hard-coded string to resolve local file paths (#10945) (#10946)
alexmt pushed a commit that referenced this issue Oct 14, 2022
…al file paths (#10945) (#10946)

fix: Use os.PathSeparator instead of hard-coded string to resolve local file paths (#10945) (#10946)
thirunavukkarasu95 pushed a commit to thirunavukkarasu95/argo-cd that referenced this issue Oct 15, 2022
…al file paths (argoproj#10945) (argoproj#10946)

fix: Use os.PathSeparator instead of hard-coded string to resolve local file paths (argoproj#10945) (argoproj#10946)
Signed-off-by: tramanathan <thirunavukkarasu_ramanathan@intuit.com>
crenshaw-dev pushed a commit that referenced this issue Oct 17, 2022
* feat: UI Add copy to clipboard shortcut #10803

Signed-off-by: tramanathan <thirunavukkarasu_ramanathan@intuit.com>

* fix: Use os.PathSeparator instead of hard-coded string to resolve local file paths (#10945) (#10946)

fix: Use os.PathSeparator instead of hard-coded string to resolve local file paths (#10945) (#10946)
Signed-off-by: tramanathan <thirunavukkarasu_ramanathan@intuit.com>

* feat: UI Add copy to clipboard shortcut

Signed-off-by: tramanathan <thirunavukkarasu_ramanathan@intuit.com>

Signed-off-by: tramanathan <thirunavukkarasu_ramanathan@intuit.com>
Co-authored-by: tramanathan <thirunavukkarasu_ramanathan@intuit.com>
Co-authored-by: Chris Davis <chris@codeflow.org.uk>
crenshaw-dev added a commit that referenced this issue Oct 18, 2022
* fix: Resource list loading slowly due to Sync Wave sorting (#10932)

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com>

* chore: fix wrong annotation in function (#10923)

Signed-off-by: wujunwei <wjw3323@live.com>

Signed-off-by: wujunwei <wjw3323@live.com>
Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com>

* feat: add bcrypt support for argocd CLI (#10934)

* Adding bcrypt support for argocd CLI

Signed-off-by: Amey Totawar <ameysanjaykumar_totawar@intuit.com>

* Fixing linter issues

Signed-off-by: Amey Totawar <ameysanjaykumar_totawar@intuit.com>

* Nesting bcrypt under account instead of admin

Signed-off-by: Amey Totawar <ameysanjaykumar_totawar@intuit.com>

* Removing admin bcrypt docs

Signed-off-by: Amey Totawar <ameysanjaykumar_totawar@intuit.com>

* Update docs/faq.md

Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Signed-off-by: Amey Totawar <ameytotawar@gmail.com>

Signed-off-by: Amey Totawar <ameysanjaykumar_totawar@intuit.com>
Signed-off-by: Amey Totawar <ameytotawar@gmail.com>
Co-authored-by: Amey Totawar <ameysanjaykumar_totawar@intuit.com>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com>

* chore: improve error logs

Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com>

* chore: improve error logs

Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com>

* chore: implement signed images (#10925)

* consolidate checksums into one file

Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>

* sign container images

Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>

* sign container images

Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>

* remove id-token permissions

Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>

Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>
Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com>

* chore: delete old snyk reports (#10938)

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

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

* chore: rewording of misleading message (#10407)

Signed-off-by: Ryan Talbot <ryan-talbot@outlook.com>

Signed-off-by: Ryan Talbot <ryan-talbot@outlook.com>
Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com>

* chore: delete old snyk reports, 2nd attempt (#10950)

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

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

* chore: wrap error objects to include context (#10592) (#10940)

Signed-off-by: Niharika <ns8gupta@gmail.com>
Signed-off-by: Niharika <niharika_sahai@intuit.com>

Signed-off-by: Niharika <ns8gupta@gmail.com>
Signed-off-by: Niharika <niharika_sahai@intuit.com>
Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com>

* fix: Use os.PathSeparator instead of hard-coded string to resolve local file paths (#10945) (#10946)

fix: Use os.PathSeparator instead of hard-coded string to resolve local file paths (#10945) (#10946)
Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com>

* chore: improve error logs

Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com>

* chore: covered error log in controllers

 Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com>

Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com>

* chore: sign checksums file for release binaries (#10963)

Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>

Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>
Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com>

* [Bot] Update Snyk reports (#10953)

Signed-off-by: CI <ci@argoproj.com>

Signed-off-by: CI <ci@argoproj.com>
Co-authored-by: CI <ci@argoproj.com>
Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com>

* feat: make applicationset controller configurable in argocd-cmd-params (#10961)

Signed-off-by: toVersus <toversus2357@gmail.com>

Signed-off-by: toVersus <toversus2357@gmail.com>
Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com>

* docs: message is no longer truncated (#10962)

Signed-off-by: Shawn Toffel <shawn.toffel@gmail.com>

Signed-off-by: Shawn Toffel <shawn.toffel@gmail.com>
Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com>

* fix: addressed review comments

Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com>

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com>
Signed-off-by: wujunwei <wjw3323@live.com>
Signed-off-by: Amey Totawar <ameysanjaykumar_totawar@intuit.com>
Signed-off-by: Amey Totawar <ameytotawar@gmail.com>
Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Signed-off-by: Ryan Talbot <ryan-talbot@outlook.com>
Signed-off-by: Niharika <ns8gupta@gmail.com>
Signed-off-by: Niharika <niharika_sahai@intuit.com>
Signed-off-by: CI <ci@argoproj.com>
Signed-off-by: toVersus <toversus2357@gmail.com>
Signed-off-by: Shawn Toffel <shawn.toffel@gmail.com>
Co-authored-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
Co-authored-by: Adam <wjw3323@live.com>
Co-authored-by: Amey Totawar <ameytotawar@gmail.com>
Co-authored-by: Amey Totawar <ameysanjaykumar_totawar@intuit.com>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Co-authored-by: Smriti Prakash <smriti_prakash@intuit.com>
Co-authored-by: 34FathomBelow <34fathombelow@protonmail.com>
Co-authored-by: Ryan Talbot <4523072+RyanTalbot@users.noreply.github.com>
Co-authored-by: nsahai8 <ns8gupta@gmail.com>
Co-authored-by: Chris Davis <chris@codeflow.org.uk>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: CI <ci@argoproj.com>
Co-authored-by: Tsubasa Nagasawa <toversus2357@gmail.com>
Co-authored-by: Shawn Toffel <shawn.toffel+github@gmail.com>
nbjohnson pushed a commit to nbjohnson/argo-cd that referenced this issue Oct 18, 2022
…al file paths (argoproj#10945) (argoproj#10946)

fix: Use os.PathSeparator instead of hard-coded string to resolve local file paths (argoproj#10945) (argoproj#10946)
Signed-off-by: Nicholas Johnson <nbjohnson10@gmail.com>
nbjohnson pushed a commit to nbjohnson/argo-cd that referenced this issue Oct 18, 2022
* feat: UI Add copy to clipboard shortcut argoproj#10803

Signed-off-by: tramanathan <thirunavukkarasu_ramanathan@intuit.com>

* fix: Use os.PathSeparator instead of hard-coded string to resolve local file paths (argoproj#10945) (argoproj#10946)

fix: Use os.PathSeparator instead of hard-coded string to resolve local file paths (argoproj#10945) (argoproj#10946)
Signed-off-by: tramanathan <thirunavukkarasu_ramanathan@intuit.com>

* feat: UI Add copy to clipboard shortcut

Signed-off-by: tramanathan <thirunavukkarasu_ramanathan@intuit.com>

Signed-off-by: tramanathan <thirunavukkarasu_ramanathan@intuit.com>
Co-authored-by: tramanathan <thirunavukkarasu_ramanathan@intuit.com>
Co-authored-by: Chris Davis <chris@codeflow.org.uk>
Signed-off-by: Nicholas Johnson <nbjohnson10@gmail.com>
nbjohnson pushed a commit to nbjohnson/argo-cd that referenced this issue Oct 18, 2022
* fix: Resource list loading slowly due to Sync Wave sorting (argoproj#10932)

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com>

* chore: fix wrong annotation in function (argoproj#10923)

Signed-off-by: wujunwei <wjw3323@live.com>

Signed-off-by: wujunwei <wjw3323@live.com>
Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com>

* feat: add bcrypt support for argocd CLI (argoproj#10934)

* Adding bcrypt support for argocd CLI

Signed-off-by: Amey Totawar <ameysanjaykumar_totawar@intuit.com>

* Fixing linter issues

Signed-off-by: Amey Totawar <ameysanjaykumar_totawar@intuit.com>

* Nesting bcrypt under account instead of admin

Signed-off-by: Amey Totawar <ameysanjaykumar_totawar@intuit.com>

* Removing admin bcrypt docs

Signed-off-by: Amey Totawar <ameysanjaykumar_totawar@intuit.com>

* Update docs/faq.md

Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Signed-off-by: Amey Totawar <ameytotawar@gmail.com>

Signed-off-by: Amey Totawar <ameysanjaykumar_totawar@intuit.com>
Signed-off-by: Amey Totawar <ameytotawar@gmail.com>
Co-authored-by: Amey Totawar <ameysanjaykumar_totawar@intuit.com>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com>

* chore: improve error logs

Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com>

* chore: improve error logs

Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com>

* chore: implement signed images (argoproj#10925)

* consolidate checksums into one file

Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>

* sign container images

Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>

* sign container images

Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>

* remove id-token permissions

Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>

Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>
Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com>

* chore: delete old snyk reports (argoproj#10938)

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

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

* chore: rewording of misleading message (argoproj#10407)

Signed-off-by: Ryan Talbot <ryan-talbot@outlook.com>

Signed-off-by: Ryan Talbot <ryan-talbot@outlook.com>
Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com>

* chore: delete old snyk reports, 2nd attempt (argoproj#10950)

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

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

* chore: wrap error objects to include context (argoproj#10592) (argoproj#10940)

Signed-off-by: Niharika <ns8gupta@gmail.com>
Signed-off-by: Niharika <niharika_sahai@intuit.com>

Signed-off-by: Niharika <ns8gupta@gmail.com>
Signed-off-by: Niharika <niharika_sahai@intuit.com>
Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com>

* fix: Use os.PathSeparator instead of hard-coded string to resolve local file paths (argoproj#10945) (argoproj#10946)

fix: Use os.PathSeparator instead of hard-coded string to resolve local file paths (argoproj#10945) (argoproj#10946)
Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com>

* chore: improve error logs

Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com>

* chore: covered error log in controllers

 Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com>

Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com>

* chore: sign checksums file for release binaries (argoproj#10963)

Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>

Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>
Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com>

* [Bot] Update Snyk reports (argoproj#10953)

Signed-off-by: CI <ci@argoproj.com>

Signed-off-by: CI <ci@argoproj.com>
Co-authored-by: CI <ci@argoproj.com>
Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com>

* feat: make applicationset controller configurable in argocd-cmd-params (argoproj#10961)

Signed-off-by: toVersus <toversus2357@gmail.com>

Signed-off-by: toVersus <toversus2357@gmail.com>
Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com>

* docs: message is no longer truncated (argoproj#10962)

Signed-off-by: Shawn Toffel <shawn.toffel@gmail.com>

Signed-off-by: Shawn Toffel <shawn.toffel@gmail.com>
Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com>

* fix: addressed review comments

Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com>

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
Signed-off-by: Smriti Prakash <smriti_prakash@intuit.com>
Signed-off-by: wujunwei <wjw3323@live.com>
Signed-off-by: Amey Totawar <ameysanjaykumar_totawar@intuit.com>
Signed-off-by: Amey Totawar <ameytotawar@gmail.com>
Signed-off-by: Justin Marquis <34fathombelow@protonmail.com>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Signed-off-by: Ryan Talbot <ryan-talbot@outlook.com>
Signed-off-by: Niharika <ns8gupta@gmail.com>
Signed-off-by: Niharika <niharika_sahai@intuit.com>
Signed-off-by: CI <ci@argoproj.com>
Signed-off-by: toVersus <toversus2357@gmail.com>
Signed-off-by: Shawn Toffel <shawn.toffel@gmail.com>
Co-authored-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
Co-authored-by: Adam <wjw3323@live.com>
Co-authored-by: Amey Totawar <ameytotawar@gmail.com>
Co-authored-by: Amey Totawar <ameysanjaykumar_totawar@intuit.com>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Co-authored-by: Smriti Prakash <smriti_prakash@intuit.com>
Co-authored-by: 34FathomBelow <34fathombelow@protonmail.com>
Co-authored-by: Ryan Talbot <4523072+RyanTalbot@users.noreply.github.com>
Co-authored-by: nsahai8 <ns8gupta@gmail.com>
Co-authored-by: Chris Davis <chris@codeflow.org.uk>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: CI <ci@argoproj.com>
Co-authored-by: Tsubasa Nagasawa <toversus2357@gmail.com>
Co-authored-by: Shawn Toffel <shawn.toffel+github@gmail.com>
Signed-off-by: Nicholas Johnson <nbjohnson10@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant