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

[sdk#999] Make sandbox entries restartable #1002

Conversation

Bolodya1997
Copy link

Description

Makes sandbox entries cancelable and restartable:

  • RegistryEntry
  • NSMgrEntry
  • EndpointEntry

Issue link

#999

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 functionallity
  • Documentation
  • Refactoring
  • CI

@Bolodya1997 Bolodya1997 force-pushed the sdk#999/sandbox-restartable branch from 63c3a1b to fa7af68 Compare June 29, 2021 10:37
@Bolodya1997 Bolodya1997 marked this pull request as draft June 29, 2021 10:40
@Bolodya1997 Bolodya1997 marked this pull request as ready for review June 29, 2021 13:51
@Bolodya1997 Bolodya1997 self-assigned this Jun 30, 2021
@@ -102,3 +102,15 @@ func CheckURLFree(u *url.URL) bool {
}
return err == nil
}

// CloneURL clones given url
Copy link
Member

Choose a reason for hiding this comment

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

  1. I'm not sure that CloneURL should be located in grpcutils.
  2. Can we use struts instead pointers to get rid of CloneURL?

Copy link
Author

Choose a reason for hiding this comment

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

@denis-tingaikin

  1. I'm not sure that CloneURL should be located in grpcutils.

I agree, both CloneURL and CheckURLFree are only used in tests, but:

  1. I am afraid of creating some general testutils package, because it can urgently turn into some very dirty package with lots of different methods.
  2. We probably can add urlutils package for these, but I am not sure that it would be better than storing them in grpcutils.

Any thoughts on this?

  1. Can we use struts instead pointers to get rid of CloneURL?

Here we need to refactor nsmgr, client, registryclient, connect packages to use URL struct as a connectTo - it would change API and so affect all deployments without any actual need for them (because it is a test specific case).
We cannot make it on the sandbox side, because in all cases this connectTo is passed via the non-sandbox options.
So for me it still looks like that using CloneURL in tests is the better solution.

Thoughts?

Copy link
Author

Choose a reason for hiding this comment

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

Moved to sandbox.

pkg/tools/sandbox/restartable_server.go Show resolved Hide resolved
Vladimir Popov added 4 commits July 12, 2021 09:41
Signed-off-by: Vladimir Popov <vladimir.popov@xored.com>
Signed-off-by: Vladimir Popov <vladimir.popov@xored.com>
Signed-off-by: Vladimir Popov <vladimir.popov@xored.com>
Signed-off-by: Vladimir Popov <vladimir.popov@xored.com>
@Bolodya1997 Bolodya1997 marked this pull request as draft July 12, 2021 08:30
Signed-off-by: Vladimir Popov <vladimir.popov@xored.com>
@Bolodya1997 Bolodya1997 force-pushed the sdk#999/sandbox-restartable branch from e0ffc1a to 59adaf8 Compare July 12, 2021 09:57
@Bolodya1997 Bolodya1997 marked this pull request as ready for review July 12, 2021 10:05
@denis-tingaikin denis-tingaikin merged commit ee5abae into networkservicemesh:main Jul 12, 2021
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.

4 participants