Skip to content

Conversation

@vakalapa
Copy link
Contributor

NPM currently deletes all the ipsets when an existing namespace is updated. This fix selectively deletes or adds only the changed labels for an existing Namespace.

@vakalapa vakalapa changed the title Supporting Namespace label updates [NPM] Supporting Namespace label updates Jan 29, 2021
@codecov
Copy link

codecov bot commented Jan 29, 2021

Codecov Report

Merging #773 (606a5e7) into master (2bc809e) will increase coverage by 0.09%.
The diff coverage is 56.66%.

@@            Coverage Diff             @@
##           master     #773      +/-   ##
==========================================
+ Coverage   41.79%   41.88%   +0.09%     
==========================================
  Files         142      142              
  Lines       13763    13843      +80     
==========================================
+ Hits         5752     5798      +46     
- Misses       7293     7322      +29     
- Partials      718      723       +5     


npMgr.Lock()
if err := npMgr.AddNamespace(oldNsObj); err != nil {
t.Errorf("TestAddNamespaceLabel failed @ npMgr.AddNamespace")
Copy link
Contributor

@csfmomo csfmomo Jan 29, 2021

Choose a reason for hiding this comment

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

PR looks good to me. For these tests, is there anyway that we check the new namespace label has been added or delete besides no error happens?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed this.

@vakalapa vakalapa merged commit 599ea8f into master Feb 5, 2021
@vakalapa vakalapa deleted the vakr/namespaceupdate branch February 5, 2021 16:55
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.

3 participants