You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by aledsage <gi...@git.apache.org> on 2015/08/30 13:09:15 UTC

[GitHub] incubator-brooklyn pull request: Handle class-renames in persisted...

GitHub user aledsage opened a pull request:

    https://github.com/apache/incubator-brooklyn/pull/872

    Handle class-renames in persisted state (Work In Progress)

    For handling the class renames that have happened between `0.7.0` and now (e.g. for producing a `0.8.0-M1` or a `0.8.0` GA).
    
    This is work in progress - it will allow early review and also the opportunity for someone else to pick it up while I'm on holiday (@ahgittin @neykov !). It is not yet tested with a real brooklyn instance!
    
    Note that the long list of class renames was (mostly) auto-generated using https://github.com/brooklyncentral/version-differ. That is a very early stage tool for comparing two versions of a repo to find what classes have been moved. It writes out the changes + the ambiguous files, and also writes out the confidence of that change (based on the similarity of the source, ignoring license/imports).
    
    I'm considering extending the above tool to write out details of new/deleted methods, the absence of `@since`, the addition of `@deprecated`, etc. If we do that, then this would be useful for auto-generating more detailed release notes.
    
    I didn't use a combination of `git` and `gawk` because git wasn't aware for quite a few files that it was a move - presumably because the imports had change substantially, there was too much change for it to infer that it was the same file.

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

    $ git pull https://github.com/aledsage/incubator-brooklyn feature/persistence-class-rename-handling

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

    https://github.com/apache/incubator-brooklyn/pull/872.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 #872
    
----
commit 3167af95c8ef25fa5bf787c34a73af2d7361b6bb
Author: Aled Sage <al...@gmail.com>
Date:   2015-08-30T11:03:01Z

    Handle class-renames in persisted state

----


---
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-brooklyn pull request: Handle class-renames in persisted...

Posted by ahgittin <gi...@git.apache.org>.
Github user ahgittin commented on the pull request:

    https://github.com/apache/incubator-brooklyn/pull/872#issuecomment-136355879
  
    BTW @aledsage with `git diff` you can use `-M` to be more generous when detecting renames; and you'll also need to increase `merge.renameLimit` because normally it defaults to 100 files.


---
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-brooklyn pull request: Handle class-renames in persisted...

Posted by ahgittin <gi...@git.apache.org>.
Github user ahgittin commented on the pull request:

    https://github.com/apache/incubator-brooklyn/pull/872#issuecomment-136421250
  
    Incorporated into #873 which fixes some minor but fatal flaws in this (untested) but essentially keeps all the real work which was done here.  This should close automatically when that is merged BTW.


---
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-brooklyn pull request: Handle class-renames in persisted...

Posted by aledsage <gi...@git.apache.org>.
Github user aledsage commented on the pull request:

    https://github.com/apache/incubator-brooklyn/pull/872#issuecomment-136129135
  
    Note that we went for handling the class-renames in xstream deserialization. And in catalog-loading where it has fallen back to classpath-based loading.
    
    The alternative would have been to transform the persisted state (e.g. using xslt). However, the classname can appear in many different ways / places within the xml, which makes it hard to reliably transform. One can't just do a regex conversion because the classname might have been used as part of a sensor / config key name (which has not been changed).


---
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-brooklyn pull request: Handle class-renames in persisted...

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

    https://github.com/apache/incubator-brooklyn/pull/872


---
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-brooklyn pull request: Handle class-renames in persisted...

Posted by ahgittin <gi...@git.apache.org>.
Github user ahgittin commented on the pull request:

    https://github.com/apache/incubator-brooklyn/pull/872#issuecomment-136355002
  
    I'm working on this.  A few minor mistakes (the path to the `deserializedClassNames.properties`), but I've fixed them.  Now it's failing because some classes are loaded elsewhere (in `RebindIteration`, calling to `Reflections`) so I'm refactoring to pass the map in there.


---
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.
---