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

Rework request handling in memory handler #1443

Merged

Conversation

NikitaSkrynnik
Copy link
Contributor

@NikitaSkrynnik NikitaSkrynnik commented Mar 29, 2023

Description

Issue link

#1425

How Has This Been Tested?

  • Added unit testing to cover
  • Tested manually
  • Tested by integration testing
  • Have not tested

Types of changes

  • Bug fix
  • New functionality
  • Documentation
  • Refactoring
  • CI

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>
Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>
@codecov
Copy link

codecov bot commented Mar 29, 2023

Codecov Report

❗ No coverage uploaded for pull request base (main@1c6df67). Click here to learn what that means.
Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1443   +/-   ##
=======================================
  Coverage        ?   70.30%           
=======================================
  Files           ?      242           
  Lines           ?    10999           
  Branches        ?        0           
=======================================
  Hits            ?     7733           
  Misses          ?     2767           
  Partials        ?      499           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

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

m := new(dns.Msg)
_ = rw.WriteMsg(m.SetRcode(msg, dns.RcodeSuccess))
} else {
rwWrapper := &responseWriter{ResponseWriter: rw}
Copy link
Member

Choose a reason for hiding this comment

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

  1. please remove responseWriter.

fanout should handler the server fail.

  1. add regression unit test

Copy link
Contributor Author

Choose a reason for hiding this comment

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

responseWriter doesn't check only fanout, but any handler that goes after memory handler. If we remove responseWriter we can get an error, because in some cases nothing will be written to rw.

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>
Copy link
Member

@denis-tingaikin denis-tingaikin left a comment

Choose a reason for hiding this comment

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

@glazychev-art Do you have any comments?

@denis-tingaikin denis-tingaikin merged commit 2502d93 into networkservicemesh:main Apr 10, 2023
nsmbot pushed a commit to networkservicemesh/cmd-admission-webhook-k8s that referenced this pull request Apr 10, 2023
…k@main

PR link: networkservicemesh/sdk#1443

Commit: 2502d93
Author: Nikita Skrynnik
Date: 2023-04-10 14:27:13 +0700
Message:
  - Rework request handling in memory handler (#1443)
* rework request handling in memory handler

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* cleanup

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* add test for proper handling of nonexistent records check

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

---------

Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/sdk-kernel that referenced this pull request Apr 10, 2023
…k@main

PR link: networkservicemesh/sdk#1443

Commit: 2502d93
Author: Nikita Skrynnik
Date: 2023-04-10 14:27:13 +0700
Message:
  - Rework request handling in memory handler (#1443)
* rework request handling in memory handler

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* cleanup

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* add test for proper handling of nonexistent records check

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

---------

Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/cmd-cluster-info-k8s that referenced this pull request Apr 10, 2023
…k@main

PR link: networkservicemesh/sdk#1443

Commit: 2502d93
Author: Nikita Skrynnik
Date: 2023-04-10 14:27:13 +0700
Message:
  - Rework request handling in memory handler (#1443)
* rework request handling in memory handler

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* cleanup

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* add test for proper handling of nonexistent records check

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

---------

Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/cmd-nse-remote-vlan that referenced this pull request Apr 10, 2023
…k@main

PR link: networkservicemesh/sdk#1443

Commit: 2502d93
Author: Nikita Skrynnik
Date: 2023-04-10 14:27:13 +0700
Message:
  - Rework request handling in memory handler (#1443)
* rework request handling in memory handler

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* cleanup

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* add test for proper handling of nonexistent records check

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

---------

Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/cmd-nsmgr-proxy that referenced this pull request Apr 10, 2023
…k@main

PR link: networkservicemesh/sdk#1443

Commit: 2502d93
Author: Nikita Skrynnik
Date: 2023-04-10 14:27:13 +0700
Message:
  - Rework request handling in memory handler (#1443)
* rework request handling in memory handler

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* cleanup

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* add test for proper handling of nonexistent records check

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

---------

Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/cmd-nsc-init that referenced this pull request Apr 10, 2023
…k@main

PR link: networkservicemesh/sdk#1443

Commit: 2502d93
Author: Nikita Skrynnik
Date: 2023-04-10 14:27:13 +0700
Message:
  - Rework request handling in memory handler (#1443)
* rework request handling in memory handler

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* cleanup

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* add test for proper handling of nonexistent records check

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

---------

Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/sdk-k8s that referenced this pull request Apr 10, 2023
…k@main

PR link: networkservicemesh/sdk#1443

Commit: 2502d93
Author: Nikita Skrynnik
Date: 2023-04-10 14:27:13 +0700
Message:
  - Rework request handling in memory handler (#1443)
* rework request handling in memory handler

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* cleanup

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* add test for proper handling of nonexistent records check

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

---------

Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/cmd-ipam-vl3 that referenced this pull request Apr 10, 2023
…k@main

PR link: networkservicemesh/sdk#1443

Commit: 2502d93
Author: Nikita Skrynnik
Date: 2023-04-10 14:27:13 +0700
Message:
  - Rework request handling in memory handler (#1443)
* rework request handling in memory handler

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* cleanup

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* add test for proper handling of nonexistent records check

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

---------

Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/cmd-map-ip-k8s that referenced this pull request Apr 10, 2023
…k@main

PR link: networkservicemesh/sdk#1443

Commit: 2502d93
Author: Nikita Skrynnik
Date: 2023-04-10 14:27:13 +0700
Message:
  - Rework request handling in memory handler (#1443)
* rework request handling in memory handler

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* cleanup

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* add test for proper handling of nonexistent records check

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

---------

Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/cmd-nsmgr that referenced this pull request Apr 10, 2023
…k@main

PR link: networkservicemesh/sdk#1443

Commit: 2502d93
Author: Nikita Skrynnik
Date: 2023-04-10 14:27:13 +0700
Message:
  - Rework request handling in memory handler (#1443)
* rework request handling in memory handler

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* cleanup

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* add test for proper handling of nonexistent records check

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

---------

Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/cmd-registry-proxy-dns that referenced this pull request Apr 10, 2023
…k@main

PR link: networkservicemesh/sdk#1443

Commit: 2502d93
Author: Nikita Skrynnik
Date: 2023-04-10 14:27:13 +0700
Message:
  - Rework request handling in memory handler (#1443)
* rework request handling in memory handler

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* cleanup

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* add test for proper handling of nonexistent records check

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

---------

Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/cmd-nse-vfio that referenced this pull request Apr 10, 2023
…k@main

PR link: networkservicemesh/sdk#1443

Commit: 2502d93
Author: Nikita Skrynnik
Date: 2023-04-10 14:27:13 +0700
Message:
  - Rework request handling in memory handler (#1443)
* rework request handling in memory handler

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* cleanup

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* add test for proper handling of nonexistent records check

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

---------

Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/cmd-registry-memory that referenced this pull request Apr 10, 2023
…k@main

PR link: networkservicemesh/sdk#1443

Commit: 2502d93
Author: Nikita Skrynnik
Date: 2023-04-10 14:27:13 +0700
Message:
  - Rework request handling in memory handler (#1443)
* rework request handling in memory handler

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* cleanup

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

* add test for proper handling of nonexistent records check

Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>

---------

Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants