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

chore: remove useless lines from argocd_repo_server.go #14154

Merged
merged 1 commit into from
Jun 30, 2023

Conversation

chanhz
Copy link
Contributor

@chanhz chanhz commented Jun 21, 2023

Note on DCO:

If the DCO action in the integration test fails, one or more of your commits are not signed off. Please click on the Details link next to the DCO action for instructions on how to resolve this.

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).
  • The title of the PR conforms to the Toolchain Guide
  • 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).
  • My new feature complies with the feature status guidelines.
  • I have added a brief description of why this PR is necessary and/or what this PR solves.

Please see Contribution FAQs if you have questions about your pull-request.

@codecov
Copy link

codecov bot commented Jun 21, 2023

Codecov Report

Patch coverage has no change and project coverage change: +0.17 🎉

Comparison is base (2170f3a) 49.60% compared to head (bf833f0) 49.78%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #14154      +/-   ##
==========================================
+ Coverage   49.60%   49.78%   +0.17%     
==========================================
  Files         256      261       +5     
  Lines       43829    44672     +843     
==========================================
+ Hits        21741    22238     +497     
- Misses      19950    20249     +299     
- Partials     2138     2185      +47     

see 26 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Comment on lines 202 to 204
if cmdutil.LogFormat == "" {
cmdutil.LogFormat = os.Getenv("ARGOCD_REPO_SERVER_LOGLEVEL")
cmdutil.LogFormat = os.Getenv("ARGOCD_REPO_SERVER_LOGFORMAT")
}
Copy link
Member

Choose a reason for hiding this comment

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

@ishitasequeira do you remember what these 3 lines were for from f533ed1 ?

Looks to me like line 205 is always gonna overwrite this value.

Copy link
Member

Choose a reason for hiding this comment

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

It's from a very long time. But looks like we might have missed catching that. I think we can completely remove lines 202-204, that is the entire if check.

Copy link
Member

Choose a reason for hiding this comment

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

@chanhz would you mind updating the PR to delete all 3 lines?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure, thx for quick response.

Comment on lines 202 to 204
if cmdutil.LogFormat == "" {
cmdutil.LogFormat = os.Getenv("ARGOCD_REPO_SERVER_LOGLEVEL")
cmdutil.LogFormat = os.Getenv("ARGOCD_REPO_SERVER_LOGFORMAT")
}
Copy link
Member

Choose a reason for hiding this comment

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

It's from a very long time. But looks like we might have missed catching that. I think we can completely remove lines 202-204, that is the entire if check.

@chanhz chanhz changed the title chore: fix argocd_repo_server read logFormat from ENV chore: remove useless read ARGOCD_REPO_SERVER_LOGLEVEL env Jun 23, 2023
@ishitasequeira
Copy link
Member

@chanhz , you would have to fix the go build. Seems like unused import os is causing the issue.

@chanhz chanhz changed the title chore: remove useless read ARGOCD_REPO_SERVER_LOGLEVEL env chore: remove useless lines from argocd_repo_server.go Jun 25, 2023
@crenshaw-dev crenshaw-dev enabled auto-merge (squash) June 26, 2023 14:00
@crenshaw-dev
Copy link
Member

@chanhz can you fix DCO?

auto-merge was automatically disabled June 28, 2023 06:18

Head branch was pushed to by a user without write access

@pasha-codefresh pasha-codefresh merged commit 1801664 into argoproj:master Jun 30, 2023
yyzxw pushed a commit to yyzxw/argo-cd that referenced this pull request Aug 9, 2023
@suzaku suzaku mentioned this pull request Aug 15, 2023
tesla59 pushed a commit to tesla59/argo-cd that referenced this pull request Dec 16, 2023
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