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

proxy: add nil check for fix-misdirected #2040

Merged
merged 2 commits into from Mar 30, 2021

Conversation

calebdoxsey
Copy link
Contributor

Summary

The fix-misdirected.lua script would sometimes result in an error message due to the dynamic metadata returning a nil table. Adding a nil check should fix the issue.

I also added a unit test for this.

Related issues

Fixes #2038

Checklist

  • reference any related issues
  • updated docs
  • updated unit tests
  • updated UPGRADING.md
  • add appropriate tag (improvement / bug / etc)
  • ready for review

@calebdoxsey calebdoxsey added the bug Something isn't working label Mar 29, 2021
@calebdoxsey calebdoxsey requested a review from a team as a code owner March 29, 2021 22:47
@calebdoxsey calebdoxsey requested a review from wasaga March 29, 2021 22:47
@codeclimate
Copy link

codeclimate bot commented Mar 29, 2021

Code Climate has analyzed commit c631b32 and detected 0 issues on this pull request.

View more on Code Climate.

Copy link
Contributor

@desimone desimone left a comment

Choose a reason for hiding this comment

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

LGTM! Clever testing too.

@codecov
Copy link

codecov bot commented Mar 30, 2021

Codecov Report

Merging #2040 (c631b32) into master (80c55dd) will decrease coverage by 0.0%.
The diff coverage is n/a.

@@           Coverage Diff            @@
##           master   #2040     +/-   ##
========================================
- Coverage    59.3%   59.3%   -0.1%     
========================================
  Files         158     158             
  Lines       10863   10863             
========================================
- Hits         6447    6446      -1     
- Misses       3675    3676      +1     
  Partials      741     741             
Impacted Files Coverage Δ
pkg/storage/inmemory/backend.go 86.7% <0.0%> (-3.7%) ⬇️
internal/databroker/config_source.go 54.3% <0.0%> (-1.8%) ⬇️
internal/databroker/server.go 50.9% <0.0%> (+0.9%) ⬆️
internal/controlplane/xdsmgr/xdsmgr.go 77.4% <0.0%> (+1.9%) ⬆️

@calebdoxsey calebdoxsey merged commit 76bc7a7 into master Mar 30, 2021
@calebdoxsey calebdoxsey deleted the cdoxsey/2038-lua-index-nil branch March 30, 2021 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

control plane: lua cannot index nil value error
2 participants