Skip to content

Conversation

@thisishwan2
Copy link
Contributor

Hello. This is a PR for issue #10592

I modified the return err to fmt.Errorf().
This is my first open source activity. Please let me know if there is anything wrong.!

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.
  • 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.
  • Optional. My organization is added to USERS.md.
  • Optional. For bug fixes, I've indicated what older releases this fix should be cherry-picked into (this may or may not happen depending on risk/complexity).

@thisishwan2 thisishwan2 requested a review from a team as a code owner July 24, 2024 18:14
@bunnyshell
Copy link

bunnyshell bot commented Jul 24, 2024

❌ Preview Environment deleted from Bunnyshell

Available commands (reply to this comment):

  • 🚀 /bns:deploy to deploy the environment

@bunnyshell
Copy link

bunnyshell bot commented Jul 24, 2024

❌ Preview Environment deleted from Bunnyshell

Available commands (reply to this comment):

  • 🚀 /bns:deploy to deploy the environment

Copy link
Member

@crenshaw-dev crenshaw-dev left a comment

Choose a reason for hiding this comment

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

Thanks! Requested one small change.

@thisishwan2
Copy link
Contributor Author

thisishwan2 commented Jul 25, 2024

Thank you, I'll change it!
and i have a question.
In github action, Integration tests fail, should I change the test code to match the actual code??

@blakepettersson
Copy link
Member

@thisishwan2 yes you'll need to update the unit tests and integration tests accordingly.

@thisishwan2
Copy link
Contributor Author

@blakepettersson thank you!

@codecov
Copy link

codecov bot commented Jul 25, 2024

Codecov Report

Attention: Patch coverage is 14.28571% with 6 lines in your changes missing coverage. Please review.

Project coverage is 50.70%. Comparing base (929e855) to head (2c03062).
Report is 498 commits behind head on master.

Files with missing lines Patch % Lines
applicationset/generators/cluster.go 25.00% 3 Missing ⚠️
...cationset/controllers/applicationset_controller.go 0.00% 2 Missing ⚠️
applicationset/generators/duck_type.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #19197      +/-   ##
==========================================
- Coverage   50.71%   50.70%   -0.02%     
==========================================
  Files         316      316              
  Lines       43495    43495              
==========================================
- Hits        22059    22053       -6     
- Misses      18922    18930       +8     
+ Partials     2514     2512       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

files, err := g.repos.GetFiles(context.TODO(), appSetGenerator.Git.RepoURL, appSetGenerator.Git.Revision, requestedPath.Path, noRevisionCache, verifyCommit)
if err != nil {
return nil, err
return nil, fmt.Errorf("%w", err)
Copy link
Member

Choose a reason for hiding this comment

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

Is this intentionally a no-op? If so, I think we should just stick with return nil, err

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, that's right, because when I tested it, err actually returned "error generating params from git: paths error"
If I format with fmt.errorf ("error getting files from Git repository: %w", err") like the previous commit, it will actually return "error generating params from git: error getting files from Git repository: paths error".
Return to return nil, err?

Copy link
Member

Choose a reason for hiding this comment

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

Yep, I think the old way is fine for this one.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I changed it!

thisishwan2 and others added 4 commits July 26, 2024 11:10
Signed-off-by: thisishwan2 <[email protected]>
Co-authored-by: Michael Crenshaw <[email protected]>
Signed-off-by: thisishwan2 <[email protected]>
Signed-off-by: thisishwan2 <[email protected]>
Signed-off-by: thisishwan2 <[email protected]>
@crenshaw-dev crenshaw-dev enabled auto-merge (squash) July 26, 2024 02:13
@crenshaw-dev crenshaw-dev merged commit 889c36c into argoproj:master Jul 26, 2024
rhyswilliamsza pushed a commit to rhyswilliamsza/argo-cd that referenced this pull request Aug 12, 2024
* chore: improve error logs

Signed-off-by: thisishwan2 <[email protected]>

* chore: format change

Co-authored-by: Michael Crenshaw <[email protected]>
Signed-off-by: thisishwan2 <[email protected]>
Signed-off-by: thisishwan2 <[email protected]>

* chore: change format message

Signed-off-by: thisishwan2 <[email protected]>

* chore: Rollback of error formats for generateParamsForGitFiles function

Signed-off-by: thisishwan2 <[email protected]>

---------

Signed-off-by: thisishwan2 <[email protected]>
Signed-off-by: thisishwan2 <[email protected]>
Co-authored-by: Michael Crenshaw <[email protected]>
Signed-off-by: Rhys Williams <[email protected]>
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.

3 participants