You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ariatosca.apache.org by mxmrlv <gi...@git.apache.org> on 2017/05/07 14:21:05 UTC

[GitHub] incubator-ariatosca pull request #125: ARIA-165 Make node name suffix UUIDs ...

GitHub user mxmrlv opened a pull request:

    https://github.com/apache/incubator-ariatosca/pull/125

    ARIA-165 Make node name suffix UUIDs become more readable

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/apache/incubator-ariatosca ARIA-165-Make-node-name-suffix-UUIDs-become-more-readable

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-ariatosca/pull/125.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #125
    
----
commit a783fcd2d4e6740718a3ede804bee4419bec238c
Author: max-orlov <ma...@gigaspaces.com>
Date:   2017-05-07T12:13:09Z

    wip

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-ariatosca pull request #125: ARIA-165 Make node name suffix UUIDs ...

Posted by ran-z <gi...@git.apache.org>.
Github user ran-z commented on a diff in the pull request:

    https://github.com/apache/incubator-ariatosca/pull/125#discussion_r115431168
  
    --- Diff: aria/modeling/service_template.py ---
    @@ -549,9 +549,14 @@ def as_raw(self):
                 ('requirement_templates', formatting.as_raw_list(self.requirement_templates))))
     
         def instantiate(self, container):
    -        context = ConsumptionContext.get_thread_local()
             from . import models
    -        name = context.modeling.generate_node_id(self.name)
    +        import pydevd; pydevd.settrace('localhost', suspend=False)
    --- End diff --
    
    poo


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-ariatosca pull request #125: ARIA-165 Make node name suffix UUIDs ...

Posted by mxmrlv <gi...@git.apache.org>.
Github user mxmrlv commented on a diff in the pull request:

    https://github.com/apache/incubator-ariatosca/pull/125#discussion_r115427582
  
    --- Diff: aria/modeling/service_template.py ---
    @@ -549,9 +549,13 @@ def as_raw(self):
                 ('requirement_templates', formatting.as_raw_list(self.requirement_templates))))
     
         def instantiate(self, container):
    -        context = ConsumptionContext.get_thread_local()
             from . import models
    -        name = context.modeling.generate_node_id(self.name)
    +        if self.nodes:
    +            latest_node_index = self.nodes[-1].name.rsplit('_', 1)[1]
    --- End diff --
    
    Pretty sure sql orders according to the indexed column


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-ariatosca pull request #125: ARIA-165 Make node name suffix UUIDs ...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/incubator-ariatosca/pull/125


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-ariatosca pull request #125: ARIA-165 Make node name suffix UUIDs ...

Posted by ran-z <gi...@git.apache.org>.
Github user ran-z commented on a diff in the pull request:

    https://github.com/apache/incubator-ariatosca/pull/125#discussion_r115431430
  
    --- Diff: aria/modeling/service_template.py ---
    @@ -549,9 +549,14 @@ def as_raw(self):
                 ('requirement_templates', formatting.as_raw_list(self.requirement_templates))))
     
         def instantiate(self, container):
    -        context = ConsumptionContext.get_thread_local()
             from . import models
    -        name = context.modeling.generate_node_id(self.name)
    +        import pydevd; pydevd.settrace('localhost', suspend=False)
    +        if self.nodes:
    +            highest_name_suffix = max(self.nodes, key=lambda n: n.name).name.rsplit('_', 1)[1]
    --- End diff --
    
    im not sure this would work;
    note that `mynode_2` will come after `mynode_11` :|


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-ariatosca pull request #125: ARIA-165 Make node name suffix UUIDs ...

Posted by ran-z <gi...@git.apache.org>.
Github user ran-z commented on a diff in the pull request:

    https://github.com/apache/incubator-ariatosca/pull/125#discussion_r115426507
  
    --- Diff: aria/modeling/service_template.py ---
    @@ -549,9 +549,13 @@ def as_raw(self):
                 ('requirement_templates', formatting.as_raw_list(self.requirement_templates))))
     
         def instantiate(self, container):
    -        context = ConsumptionContext.get_thread_local()
             from . import models
    -        name = context.modeling.generate_node_id(self.name)
    +        if self.nodes:
    +            latest_node_index = self.nodes[-1].name.rsplit('_', 1)[1]
    +            index = int(latest_node_index) + 1
    +        else:
    +            index = 0
    --- End diff --
    
    i'd start from index=1 actually


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-ariatosca pull request #125: ARIA-165 Make node name suffix UUIDs ...

Posted by ran-z <gi...@git.apache.org>.
Github user ran-z commented on a diff in the pull request:

    https://github.com/apache/incubator-ariatosca/pull/125#discussion_r115427157
  
    --- Diff: aria/modeling/service_template.py ---
    @@ -549,9 +549,13 @@ def as_raw(self):
                 ('requirement_templates', formatting.as_raw_list(self.requirement_templates))))
     
         def instantiate(self, container):
    -        context = ConsumptionContext.get_thread_local()
             from . import models
    -        name = context.modeling.generate_node_id(self.name)
    +        if self.nodes:
    +            latest_node_index = self.nodes[-1].name.rsplit('_', 1)[1]
    --- End diff --
    
    is the nodes list guaranteed to be ordered?
    if not then we need to find the max
    
    either way, i'd change `latest` to `highest`


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---