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

feat: Support XDG Base directory standard (#7638) #7791

Merged
merged 3 commits into from Jan 12, 2022
Merged

feat: Support XDG Base directory standard (#7638) #7791

merged 3 commits into from Jan 12, 2022

Conversation

sagikazarmark
Copy link
Contributor

@sagikazarmark sagikazarmark commented Nov 27, 2021

Closes #7638

Changes were tested manually (there were no tests covering this feature before, I can provide tests if necessary).

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this does not need to be in the release notes.
  • The title of the PR states what changed and the related issues number (used for the release note).
  • I've included "Closes [ISSUE #]" or "Fixes [ISSUE #]" in the description to automatically close the associated issue.
  • I've updated both the CLI and UI to expose my feature, or I plan to submit a second PR with them.
  • Does this PR require documentation updates?
  • I've updated documentation as required by this PR.
  • Optional. My organization is added to USERS.md.
  • I have signed off all my commits as required by DCO
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • My build is green (troubleshooting builds).

@codecov
Copy link

codecov bot commented Dec 1, 2021

Codecov Report

Merging #7791 (d98c716) into master (722fe92) will decrease coverage by 0.02%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7791      +/-   ##
==========================================
- Coverage   41.53%   41.51%   -0.03%     
==========================================
  Files         174      174              
  Lines       22703    22715      +12     
==========================================
  Hits         9430     9430              
- Misses      11932    11944      +12     
  Partials     1341     1341              
Impacted Files Coverage Δ
util/localconfig/localconfig.go 2.75% <0.00%> (-0.35%) ⬇️

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 722fe92...d98c716. Read the comment docs.

@sagikazarmark
Copy link
Contributor Author

Hm, the test failure is interesting. I can imagine two solutions:

  • Adjust the generated docs
  • Add a ARGOCD_CONFIG_DIR env var to retain the current content

The latter probably makes more sense. WDYT?

@sagikazarmark
Copy link
Contributor Author

Let me know which solution you prefer

/cc @jessesuen

@sagikazarmark
Copy link
Contributor Author

Ping

I'd love to finish this PR, but I need a decision on the above.

@jannfis
Copy link
Member

jannfis commented Dec 19, 2021

Thanks for this PR @sagikazarmark.

The CLI docs are autogenerated by https://github.com/argoproj/argo-cd/blob/master/tools/cmd-docs/main.go
For consistency in generated output, it sets HOME to /home/user here:

os.Setenv("HOME", "/home/user")

I guess with this change, we need to also set XDG_CONFIG_HOME to /home/user/.config. And then you need to run make codegen (or simply, make clidocsgen) and commit these changes to your PR's branch.

@sagikazarmark
Copy link
Contributor Author

Thanks for the help @jannfis !

I made the necessary changes.

@sagikazarmark
Copy link
Contributor Author

Build is still breaking. :\

The lint break seems unrelated (some URL in the helm docs yields 404). The other one seems related, but I can't really say what the problem is.

Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
Copy link
Member

@jannfis jannfis left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks @sagikazarmark !

@jannfis jannfis merged commit 57e0ffc into argoproj:master Jan 12, 2022
@sagikazarmark sagikazarmark deleted the xdg-config branch January 12, 2022 10:38
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.

Support XDG Base directory standard
2 participants