You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by Tom Beerbower <tb...@hortonworks.com> on 2014/10/14 05:34:20 UTC

Review Request 26676: Views: Masked property not encoded on newly created instance

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/26676/
-----------------------------------------------------------

Review request for Ambari, Nate Cole and Srimanth Gunturi.


Bugs: AMBARI-7768
    https://issues.apache.org/jira/browse/AMBARI-7768


Repository: ambari


Description
-------

Masked view param is not encoded when the view-instance gets created. Due to this, the decoded value is being decoded again, resulting in garbled values.


Diffs
-----

  ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewInstanceResourceProvider.java 9a48b41 
  ambari-server/src/main/java/org/apache/ambari/server/view/ViewContextImpl.java 0254113 
  ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java b1cec01 
  ambari-server/src/test/java/org/apache/ambari/server/view/ViewRegistryTest.java e6a20b3 

Diff: https://reviews.apache.org/r/26676/diff/


Testing
-------

Unit tests updated.

All tests pass.


Thanks,

Tom Beerbower


Re: Review Request 26676: Views: Masked property not encoded on newly created instance

Posted by Nate Cole <nc...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/26676/#review56520
-----------------------------------------------------------

Ship it!


Ship It!

- Nate Cole


On Oct. 14, 2014, 9:48 a.m., Tom Beerbower wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/26676/
> -----------------------------------------------------------
> 
> (Updated Oct. 14, 2014, 9:48 a.m.)
> 
> 
> Review request for Ambari, Nate Cole and Srimanth Gunturi.
> 
> 
> Bugs: AMBARI-7768
>     https://issues.apache.org/jira/browse/AMBARI-7768
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Masked view param is not encoded when the view-instance gets created. Due to this, the decoded value is being decoded again, resulting in garbled values.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewInstanceResourceProvider.java 9a48b41 
>   ambari-server/src/main/java/org/apache/ambari/server/view/ViewContextImpl.java 0254113 
>   ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java b1cec01 
>   ambari-server/src/test/java/org/apache/ambari/server/view/ViewRegistryTest.java e6a20b3 
> 
> Diff: https://reviews.apache.org/r/26676/diff/
> 
> 
> Testing
> -------
> 
> Manual testing.
> 
> Unit tests updated.  All tests pass.
> 
> ...
> 
> Results :
> 
> Tests run: 2168, Failures: 0, Errors: 0, Skipped: 16
> 
> ...
> 
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 31:57.991s
> [INFO] Finished at: Tue Oct 14 07:09:56 EDT 2014
> [INFO] Final Memory: 31M/225M
> [INFO] ------------------------------------------------------------------------
> 
> 
> Thanks,
> 
> Tom Beerbower
> 
>


Re: Review Request 26676: Views: Masked property not encoded on newly created instance

Posted by Tom Beerbower <tb...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/26676/
-----------------------------------------------------------

(Updated Oct. 14, 2014, 1:48 p.m.)


Review request for Ambari, Nate Cole and Srimanth Gunturi.


Changes
-------

try again...


Bugs: AMBARI-7768
    https://issues.apache.org/jira/browse/AMBARI-7768


Repository: ambari


Description
-------

Masked view param is not encoded when the view-instance gets created. Due to this, the decoded value is being decoded again, resulting in garbled values.


Diffs (updated)
-----

  ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewInstanceResourceProvider.java 9a48b41 
  ambari-server/src/main/java/org/apache/ambari/server/view/ViewContextImpl.java 0254113 
  ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java b1cec01 
  ambari-server/src/test/java/org/apache/ambari/server/view/ViewRegistryTest.java e6a20b3 

Diff: https://reviews.apache.org/r/26676/diff/


Testing
-------

Manual testing.

Unit tests updated.  All tests pass.

...

Results :

Tests run: 2168, Failures: 0, Errors: 0, Skipped: 16

...

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 31:57.991s
[INFO] Finished at: Tue Oct 14 07:09:56 EDT 2014
[INFO] Final Memory: 31M/225M
[INFO] ------------------------------------------------------------------------


Thanks,

Tom Beerbower


Re: Review Request 26676: Views: Masked property not encoded on newly created instance

Posted by Tom Beerbower <tb...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/26676/
-----------------------------------------------------------

(Updated Oct. 14, 2014, 1:40 p.m.)


Review request for Ambari, Nate Cole and Srimanth Gunturi.


Changes
-------

updated test results


Bugs: AMBARI-7768
    https://issues.apache.org/jira/browse/AMBARI-7768


Repository: ambari


Description
-------

Masked view param is not encoded when the view-instance gets created. Due to this, the decoded value is being decoded again, resulting in garbled values.


Diffs
-----

  ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewInstanceResourceProvider.java 9a48b41 
  ambari-server/src/main/java/org/apache/ambari/server/view/ViewContextImpl.java 0254113 
  ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java b1cec01 
  ambari-server/src/test/java/org/apache/ambari/server/view/ViewRegistryTest.java e6a20b3 

Diff: https://reviews.apache.org/r/26676/diff/


Testing (updated)
-------

Manual testing.

Unit tests updated.  All tests pass.

...

Results :

Tests run: 2168, Failures: 0, Errors: 0, Skipped: 16

...

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 31:57.991s
[INFO] Finished at: Tue Oct 14 07:09:56 EDT 2014
[INFO] Final Memory: 31M/225M
[INFO] ------------------------------------------------------------------------


Thanks,

Tom Beerbower


Re: Review Request 26676: Views: Masked property not encoded on newly created instance

Posted by Tom Beerbower <tb...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/26676/
-----------------------------------------------------------

(Updated Oct. 14, 2014, 1:38 p.m.)


Review request for Ambari, Nate Cole and Srimanth Gunturi.


Changes
-------

Update with review changes.


Bugs: AMBARI-7768
    https://issues.apache.org/jira/browse/AMBARI-7768


Repository: ambari


Description
-------

Masked view param is not encoded when the view-instance gets created. Due to this, the decoded value is being decoded again, resulting in garbled values.


Diffs (updated)
-----

  ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewInstanceResourceProvider.java 9a48b41 
  ambari-server/src/main/java/org/apache/ambari/server/view/ViewContextImpl.java 0254113 
  ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java b1cec01 
  ambari-server/src/test/java/org/apache/ambari/server/view/ViewRegistryTest.java e6a20b3 

Diff: https://reviews.apache.org/r/26676/diff/


Testing
-------

Unit tests updated.

All tests pass.


Thanks,

Tom Beerbower


Re: Review Request 26676: Views: Masked property not encoded on newly created instance

Posted by Tom Beerbower <tb...@hortonworks.com>.

> On Oct. 14, 2014, 11:28 a.m., Nate Cole wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/view/ViewContextImpl.java, lines 209-211
> > <https://reviews.apache.org/r/26676/diff/1/?file=720284#file720284line209>
> >
> >     Is this a big deal enough to rethrow?  What happens from a SystemException from here - is anything in an invalid state?

It's in putInstanceData(String key, String value) on the view context.  It basically means that you can't set instance data on a view instance so it should be rethrown.  Good catch.


> On Oct. 14, 2014, 11:28 a.m., Nate Cole wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java, line 934
> > <https://reviews.apache.org/r/26676/diff/1/?file=720285#file720285line934>
> >
> >     Minor, but method name starting with capitalized? (Times 3 for each overloaded)

Doh!  Staying up too late.


- Tom


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/26676/#review56505
-----------------------------------------------------------


On Oct. 14, 2014, 3:34 a.m., Tom Beerbower wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/26676/
> -----------------------------------------------------------
> 
> (Updated Oct. 14, 2014, 3:34 a.m.)
> 
> 
> Review request for Ambari, Nate Cole and Srimanth Gunturi.
> 
> 
> Bugs: AMBARI-7768
>     https://issues.apache.org/jira/browse/AMBARI-7768
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Masked view param is not encoded when the view-instance gets created. Due to this, the decoded value is being decoded again, resulting in garbled values.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewInstanceResourceProvider.java 9a48b41 
>   ambari-server/src/main/java/org/apache/ambari/server/view/ViewContextImpl.java 0254113 
>   ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java b1cec01 
>   ambari-server/src/test/java/org/apache/ambari/server/view/ViewRegistryTest.java e6a20b3 
> 
> Diff: https://reviews.apache.org/r/26676/diff/
> 
> 
> Testing
> -------
> 
> Unit tests updated.
> 
> All tests pass.
> 
> 
> Thanks,
> 
> Tom Beerbower
> 
>


Re: Review Request 26676: Views: Masked property not encoded on newly created instance

Posted by Nate Cole <nc...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/26676/#review56505
-----------------------------------------------------------

Ship it!


Just minor nits.


ambari-server/src/main/java/org/apache/ambari/server/view/ViewContextImpl.java
<https://reviews.apache.org/r/26676/#comment96874>

    Is this a big deal enough to rethrow?  What happens from a SystemException from here - is anything in an invalid state?



ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java
<https://reviews.apache.org/r/26676/#comment96873>

    Minor, but method name starting with capitalized? (Times 3 for each overloaded)


- Nate Cole


On Oct. 13, 2014, 11:34 p.m., Tom Beerbower wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/26676/
> -----------------------------------------------------------
> 
> (Updated Oct. 13, 2014, 11:34 p.m.)
> 
> 
> Review request for Ambari, Nate Cole and Srimanth Gunturi.
> 
> 
> Bugs: AMBARI-7768
>     https://issues.apache.org/jira/browse/AMBARI-7768
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Masked view param is not encoded when the view-instance gets created. Due to this, the decoded value is being decoded again, resulting in garbled values.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewInstanceResourceProvider.java 9a48b41 
>   ambari-server/src/main/java/org/apache/ambari/server/view/ViewContextImpl.java 0254113 
>   ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java b1cec01 
>   ambari-server/src/test/java/org/apache/ambari/server/view/ViewRegistryTest.java e6a20b3 
> 
> Diff: https://reviews.apache.org/r/26676/diff/
> 
> 
> Testing
> -------
> 
> Unit tests updated.
> 
> All tests pass.
> 
> 
> Thanks,
> 
> Tom Beerbower
> 
>