openwhisk-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [openwhisk] rabbah opened a new issue #4620: subjects view has legacy code
Date Thu, 12 Sep 2019 18:21:46 GMT
rabbah opened a new issue #4620: subjects view has legacy code
URL: https://github.com/apache/openwhisk/issues/4620
 
 
   PR #4611 factors out the name of the subjects view so that it's versioned (similar to the
main entities views). This allows for a transition to updated views. In particular the existing
subject view has legacy code that is dead code.
   
   The existing view:
   ```
   function (doc) {
     if(doc.uuid && doc.key && !doc.blocked) {
       var v = {namespace: doc.subject, uuid: doc.uuid, key: doc.key};
       emit([doc.subject], v);
       emit([doc.uuid, doc.key], v);
     }
     if(doc.namespaces && !doc.blocked) {
       doc.namespaces.forEach(function(namespace) {
         var v = {_id: namespace.name + '/limits', namespace: namespace.name, uuid: namespace.uuid,
key: namespace.key};
         emit([namespace.name], v);
         emit([namespace.uuid, namespace.key], v);
       });
     }
   }
   ```
   
   In particular this is dead code:
   ```
     if(doc.uuid && doc.key && !doc.blocked) {
       var v = {namespace: doc.subject, uuid: doc.uuid, key: doc.key};
       emit([doc.subject], v);
       emit([doc.uuid, doc.key], v);
     }
   ```
   
   Once #4611 is merged, we should create a new subject.v2 view without that code block.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message