Skip to content

Conversation

mayzhang2000
Copy link
Contributor

… add.

Signed-off-by: May Zhang may_zhang@intuit.com

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).
  • 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).

fixes: #7441

… add.

Signed-off-by: May Zhang <may_zhang@intuit.com>
@codecov
Copy link

codecov bot commented Oct 14, 2021

Codecov Report

Merging #7445 (77e5321) into master (d7d8fe3) will decrease coverage by 0.00%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7445      +/-   ##
==========================================
- Coverage   41.32%   41.31%   -0.01%     
==========================================
  Files         161      161              
  Lines       21590    21593       +3     
==========================================
  Hits         8921     8921              
- Misses      11408    11411       +3     
  Partials     1261     1261              
Impacted Files Coverage Δ
server/cluster/cluster.go 22.51% <0.00%> (-0.36%) ⬇️

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 d7d8fe3...77e5321. Read the comment docs.

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.

It seems we don't even check the error. Instead of checking for clust == nil I think this should be written as:

clust, err := s.db.CreateCluster(ctx, c)
if err != nil {
	if status.Convert(err).Code() == codes.AlreadyExists {
...
	} else {
		return err
	}
}

Signed-off-by: May Zhang <may_zhang@intuit.com>
@mayzhang2000
Copy link
Contributor Author

Thank you @jessesuen! Code is updated.

@jessesuen jessesuen merged commit f0cd21a into argoproj:master Oct 17, 2021
@alexmt alexmt added the hacktoberfest-accepted Accepted Hacktoberfest contribution label Oct 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest hacktoberfest-accepted Accepted Hacktoberfest contribution
Projects
None yet
Development

Successfully merging this pull request may close these issues.

invalid memory address or nil pointer dereference on cluster addition
4 participants