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

fix: nil pointer in GC #2055

Merged
merged 3 commits into from
Jan 24, 2020
Merged

fix: nil pointer in GC #2055

merged 3 commits into from
Jan 24, 2020

Conversation

alexec
Copy link
Contributor

@alexec alexec commented Jan 24, 2020

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this is a chore.
  • The title of the PR is (a) conventional, (b) states what changed, and (c) suffixes the related issues number. E.g. "fix(controller): Updates such and such. Fixes #1234".
  • I have written unit and/or e2e tests for my change. PRs without these are unlike to be merged.
  • Optional. I've added My organization is added to the README.
  • I've signed the CLA and required builds are green.

This PR adds:

  1. Fixes the nil deref in the GC.
  2. Adds a new no-db test suite and set-up options, e.g. make start DB=no-db

@alexec alexec requested a review from sarabala1979 January 24, 2020 17:27
@@ -55,7 +55,7 @@ func (wfc *WorkflowController) updateConfig(cm *apiv1.ConfigMap) error {
}
}
wfc.session = nil
wfc.offloadNodeStatusRepo = nil
wfc.offloadNodeStatusRepo = sqldb.ExplosiveOffloadNodeStatusRepo
wfc.wfArchive = sqldb.NullWorkflowArchive
persistence := wfc.Config.Persistence
Copy link
Member

Choose a reason for hiding this comment

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

We need to do nil check here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no - at this line of code wc.Config cannot be nil

Copy link
Member

Choose a reason for hiding this comment

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

ok

@alexec alexec marked this pull request as ready for review January 24, 2020 17:33
@codecov
Copy link

codecov bot commented Jan 24, 2020

Codecov Report

❗ No coverage uploaded for pull request base (master@4ac1156). Click here to learn what that means.
The diff coverage is 0%.

Impacted file tree graph

@@           Coverage Diff            @@
##             master   #2055   +/-   ##
========================================
  Coverage          ?   8.78%           
========================================
  Files             ?      61           
  Lines             ?   34576           
  Branches          ?       0           
========================================
  Hits              ?    3037           
  Misses            ?   31148           
  Partials          ?     391
Impacted Files Coverage Δ
workflow/controller/config_controller.go 14.04% <0%> (ø)

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 4ac1156...ca4b095. Read the comment docs.

@alexec alexec merged commit b408e7c into argoproj:master Jan 24, 2020
@alexec alexec deleted the no-db branch January 24, 2020 18:08
sarabala1979 pushed a commit that referenced this pull request Jan 24, 2020
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.

2 participants