[Brainstorming] Failing build when deprecated APIs are used in scripts?

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

[Brainstorming] Failing build when deprecated APIs are used in scripts?

vmassol
Administrator
Hi devs,

I'd like to discuss about introducing a checker in the tests to fail the test if there's a warning message about a deprecated APIs being used in scripts.

For example:

```
23:59:28.308 [main] INFO  org.xwiki.test.ui.TestDebugger - GroupIT-addUserAndSubgroupToGroup started
23:59:32.593 [Exec Stream Pumper] ERROR o.x.t.i.XWikiLogOutputStream - 2019-03-28 23:59:32,593 [http://localhost:8080/xwiki/bin/view/XWiki/XWikiPreferences?xpage=getgroups&offset=1&limit=15&reqNo=1] WARN  o.x.v.i.DefaultVelocityEngine  - Deprecated usage of method [com.xpn.xwiki.plugin.rightsmanager.RightsManagerPluginApi.countAllMembersNamesForGroup] in 21:/templates/getgroups.vm@62,37
23:59:35.824 [Exec Stream Pumper] ERROR o.x.t.i.XWikiLogOutputStream - 2019-03-28 23:59:35,824 [http://localhost:8080/xwiki/bin/view/XWiki/XWikiPreferences?xpage=getgroups&offset=1&limit=15&reqNo=2] WARN  o.x.v.i.DefaultVelocityEngine  - Deprecated usage of method [com.xpn.xwiki.plugin.rightsmanager.RightsManagerPluginApi.countAllMembersNamesForGroup] in 18:/templates/getgroups.vm@62,37
23:59:41.349 [Exec Stream Pumper] ERROR o.x.t.i.XWikiLogOutputStream - 2019-03-28 23:59:41,348 [http://localhost:8080/xwiki/bin/view/XWiki/XWikiPreferences?xpage=getgroups&offset=1&limit=15&reqNo=3] WARN  o.x.v.i.DefaultVelocityEngine  - Deprecated usage of method [com.xpn.xwiki.plugin.rightsmanager.RightsManagerPluginApi.countAllMembersNamesForGroup] in 21:/templates/getgroups.vm@62,37
23:59:58.503 [main] INFO  org.xwiki.test.ui.TestDebugger - GroupIT-addUserAndSubgroupToGroup passed
```

Rationale:
* This adds warnings in the xwiki logs when users navigate to those pages which isn’t nice.
* It also helps reducing the number of deprecated methods we use (I have the feeling this is not reducing) and helps us move towards being able to move the deprecated code to legacy.

WDYT?

Thanks
-Vincent
Reply | Threaded
Open this post in threaded view
|

Re: [Brainstorming] Failing build when deprecated APIs are used in scripts?

Simon Urli
Hi Vincent,

On 29/03/2019 10:27, Vincent Massol wrote:

> Hi devs,
>
> I'd like to discuss about introducing a checker in the tests to fail the test if there's a warning message about a deprecated APIs being used in scripts.
>
> For example:
>
> ```
> 23:59:28.308 [main] INFO  org.xwiki.test.ui.TestDebugger - GroupIT-addUserAndSubgroupToGroup started
> 23:59:32.593 [Exec Stream Pumper] ERROR o.x.t.i.XWikiLogOutputStream - 2019-03-28 23:59:32,593 [http://localhost:8080/xwiki/bin/view/XWiki/XWikiPreferences?xpage=getgroups&offset=1&limit=15&reqNo=1] WARN  o.x.v.i.DefaultVelocityEngine  - Deprecated usage of method [com.xpn.xwiki.plugin.rightsmanager.RightsManagerPluginApi.countAllMembersNamesForGroup] in 21:/templates/getgroups.vm@62,37
> 23:59:35.824 [Exec Stream Pumper] ERROR o.x.t.i.XWikiLogOutputStream - 2019-03-28 23:59:35,824 [http://localhost:8080/xwiki/bin/view/XWiki/XWikiPreferences?xpage=getgroups&offset=1&limit=15&reqNo=2] WARN  o.x.v.i.DefaultVelocityEngine  - Deprecated usage of method [com.xpn.xwiki.plugin.rightsmanager.RightsManagerPluginApi.countAllMembersNamesForGroup] in 18:/templates/getgroups.vm@62,37
> 23:59:41.349 [Exec Stream Pumper] ERROR o.x.t.i.XWikiLogOutputStream - 2019-03-28 23:59:41,348 [http://localhost:8080/xwiki/bin/view/XWiki/XWikiPreferences?xpage=getgroups&offset=1&limit=15&reqNo=3] WARN  o.x.v.i.DefaultVelocityEngine  - Deprecated usage of method [com.xpn.xwiki.plugin.rightsmanager.RightsManagerPluginApi.countAllMembersNamesForGroup] in 21:/templates/getgroups.vm@62,37
> 23:59:58.503 [main] INFO  org.xwiki.test.ui.TestDebugger - GroupIT-addUserAndSubgroupToGroup passed
> ```
>
> Rationale:
> * This adds warnings in the xwiki logs when users navigate to those pages which isn’t nice.
> * It also helps reducing the number of deprecated methods we use (I have the feeling this is not reducing) and helps us move towards being able to move the deprecated code to legacy.
>
> WDYT?

Is it possible to start by doing this in a specific job and see the result?
If there's not much to fix then we can fix them and add this to the main
build.

I'm a bit afraid that we reproduce what happens with wcag: lots of
failing test coming and not much bandwidth to fix them all so starting
to "accept" failing tests where we shouldn't.

Simon
>
> Thanks
> -Vincent
>

--
Simon Urli
Software Engineer at XWiki SAS
[hidden email]
More about us at http://www.xwiki.com
Reply | Threaded
Open this post in threaded view
|

Re: [Brainstorming] Failing build when deprecated APIs are used in scripts?

vmassol
Administrator


> On 29 Mar 2019, at 10:33, Simon Urli <[hidden email]> wrote:
>
> Hi Vincent,
>
> On 29/03/2019 10:27, Vincent Massol wrote:
>> Hi devs,
>> I'd like to discuss about introducing a checker in the tests to fail the test if there's a warning message about a deprecated APIs being used in scripts.
>> For example:
>> ```
>> 23:59:28.308 [main] INFO  org.xwiki.test.ui.TestDebugger - GroupIT-addUserAndSubgroupToGroup started
>> 23:59:32.593 [Exec Stream Pumper] ERROR o.x.t.i.XWikiLogOutputStream - 2019-03-28 23:59:32,593 [http://localhost:8080/xwiki/bin/view/XWiki/XWikiPreferences?xpage=getgroups&offset=1&limit=15&reqNo=1] WARN  o.x.v.i.DefaultVelocityEngine  - Deprecated usage of method [com.xpn.xwiki.plugin.rightsmanager.RightsManagerPluginApi.countAllMembersNamesForGroup] in 21:/templates/getgroups.vm@62,37
>> 23:59:35.824 [Exec Stream Pumper] ERROR o.x.t.i.XWikiLogOutputStream - 2019-03-28 23:59:35,824 [http://localhost:8080/xwiki/bin/view/XWiki/XWikiPreferences?xpage=getgroups&offset=1&limit=15&reqNo=2] WARN  o.x.v.i.DefaultVelocityEngine  - Deprecated usage of method [com.xpn.xwiki.plugin.rightsmanager.RightsManagerPluginApi.countAllMembersNamesForGroup] in 18:/templates/getgroups.vm@62,37
>> 23:59:41.349 [Exec Stream Pumper] ERROR o.x.t.i.XWikiLogOutputStream - 2019-03-28 23:59:41,348 [http://localhost:8080/xwiki/bin/view/XWiki/XWikiPreferences?xpage=getgroups&offset=1&limit=15&reqNo=3] WARN  o.x.v.i.DefaultVelocityEngine  - Deprecated usage of method [com.xpn.xwiki.plugin.rightsmanager.RightsManagerPluginApi.countAllMembersNamesForGroup] in 21:/templates/getgroups.vm@62,37
>> 23:59:58.503 [main] INFO  org.xwiki.test.ui.TestDebugger - GroupIT-addUserAndSubgroupToGroup passed
>> ```
>> Rationale:
>> * This adds warnings in the xwiki logs when users navigate to those pages which isn’t nice.
>> * It also helps reducing the number of deprecated methods we use (I have the feeling this is not reducing) and helps us move towards being able to move the deprecated code to legacy.
>> WDYT?
>
> Is it possible to start by doing this in a specific job and see the result?
> If there's not much to fix then we can fix them and add this to the main build.
>
> I'm a bit afraid that we reproduce what happens with wcag: lots of failing test coming and not much bandwidth to fix them all so starting to "accept" failing tests where we shouldn’t.

We can do what we usually do for checks: we have the ability to enable/disable them per module. So the strategy is:

* Enable the check by default
* Set it to not execute for all modules
* Check which modules pass when it’s enabled and remove the property from their pom.xml. This allows to no longer have deprecation regressions in that module.
* Then start fixing the deprecations module per module and remove the property there too.

But first, we need to decide if we agree about doing this. Do you agree?

Thanks
-Vincent

>
> Simon
>> Thanks
>> -Vincent
>
> --
> Simon Urli
> Software Engineer at XWiki SAS
> [hidden email]
> More about us at http://www.xwiki.com

Reply | Threaded
Open this post in threaded view
|

Re: [Brainstorming] Failing build when deprecated APIs are used in scripts?

vmassol
Administrator


> On 29 Mar 2019, at 10:37, Vincent Massol <[hidden email]> wrote:
>
>
>
>> On 29 Mar 2019, at 10:33, Simon Urli <[hidden email]> wrote:
>>
>> Hi Vincent,
>>
>> On 29/03/2019 10:27, Vincent Massol wrote:
>>> Hi devs,
>>> I'd like to discuss about introducing a checker in the tests to fail the test if there's a warning message about a deprecated APIs being used in scripts.
>>> For example:
>>> ```
>>> 23:59:28.308 [main] INFO  org.xwiki.test.ui.TestDebugger - GroupIT-addUserAndSubgroupToGroup started
>>> 23:59:32.593 [Exec Stream Pumper] ERROR o.x.t.i.XWikiLogOutputStream - 2019-03-28 23:59:32,593 [http://localhost:8080/xwiki/bin/view/XWiki/XWikiPreferences?xpage=getgroups&offset=1&limit=15&reqNo=1] WARN  o.x.v.i.DefaultVelocityEngine  - Deprecated usage of method [com.xpn.xwiki.plugin.rightsmanager.RightsManagerPluginApi.countAllMembersNamesForGroup] in 21:/templates/getgroups.vm@62,37
>>> 23:59:35.824 [Exec Stream Pumper] ERROR o.x.t.i.XWikiLogOutputStream - 2019-03-28 23:59:35,824 [http://localhost:8080/xwiki/bin/view/XWiki/XWikiPreferences?xpage=getgroups&offset=1&limit=15&reqNo=2] WARN  o.x.v.i.DefaultVelocityEngine  - Deprecated usage of method [com.xpn.xwiki.plugin.rightsmanager.RightsManagerPluginApi.countAllMembersNamesForGroup] in 18:/templates/getgroups.vm@62,37
>>> 23:59:41.349 [Exec Stream Pumper] ERROR o.x.t.i.XWikiLogOutputStream - 2019-03-28 23:59:41,348 [http://localhost:8080/xwiki/bin/view/XWiki/XWikiPreferences?xpage=getgroups&offset=1&limit=15&reqNo=3] WARN  o.x.v.i.DefaultVelocityEngine  - Deprecated usage of method [com.xpn.xwiki.plugin.rightsmanager.RightsManagerPluginApi.countAllMembersNamesForGroup] in 21:/templates/getgroups.vm@62,37
>>> 23:59:58.503 [main] INFO  org.xwiki.test.ui.TestDebugger - GroupIT-addUserAndSubgroupToGroup passed
>>> ```
>>> Rationale:
>>> * This adds warnings in the xwiki logs when users navigate to those pages which isn’t nice.
>>> * It also helps reducing the number of deprecated methods we use (I have the feeling this is not reducing) and helps us move towards being able to move the deprecated code to legacy.
>>> WDYT?
>>
>> Is it possible to start by doing this in a specific job and see the result?
>> If there's not much to fix then we can fix them and add this to the main build.
>>
>> I'm a bit afraid that we reproduce what happens with wcag: lots of failing test coming and not much bandwidth to fix them all so starting to "accept" failing tests where we shouldn’t.
>
> We can do what we usually do for checks: we have the ability to enable/disable them per module. So the strategy is:
>
> * Enable the check by default
> * Set it to not execute for all modules
> * Check which modules pass when it’s enabled and remove the property from their pom.xml. This allows to no longer have deprecation regressions in that module.
> * Then start fixing the deprecations module per module and remove the property there too.

Forget to mention that this strategy allows new modules to have the check on by default.

Thanks
-Vincent

>
> But first, we need to decide if we agree about doing this. Do you agree?
>
> Thanks
> -Vincent
>
>>
>> Simon
>>> Thanks
>>> -Vincent
>>
>> --
>> Simon Urli
>> Software Engineer at XWiki SAS
>> [hidden email]
>> More about us at http://www.xwiki.com

Reply | Threaded
Open this post in threaded view
|

Re: [Brainstorming] Failing build when deprecated APIs are used in scripts?

vmassol
Administrator
In reply to this post by vmassol
On this same topic, I thought I had fixed all places calling Document#getName() but apparently not:

ghts] WARN  o.x.v.i.DefaultVelocityEngine  - Deprecated usage of getter [com.xpn.xwiki.api.Document.getName] in 20:/templates/getusersandgroups.vm@146,46
10:47:06.975 [Exec Stream Pumper] ERROR o.x.t.i.XWikiLogOutputStream - 2019-03-29 10:47:06,975 [http://host.testcontainers.internal:8080/xwiki/bin/get/testCreateAndDeleteGroup/WebHome?xpage=getusersandgroups&offset=1&limit=10&reqNo=1&uorg=groups&wiki=local&clsname=XWiki.XWikiRights] WARN  o.x.v.i.DefaultVelocityEngine  - Deprecated usage of getter [com.xpn.xwiki.api.Document.getName] in 17:/templates/getusersandgroups.vm@146,46
10:47:10.741 [Exec Stream Pumper] ERROR o.x.t.i.XWikiLogOutputStream - 2019-03-29 10:47:10,741 [http://host.testcontainers.internal:8080/xwiki/bin/view/XWiki/XWikiPreferences?xpage=getgroups&offset=1&limit=15&reqNo=1] WARN  o.x.v.i.DefaultVelocityEngine  - Deprecated usage of getter [com.xpn.xwiki.api.Document.getName] in 242:/templates/getgroups.vm@38,24
10:47:10.745 [Exec Stream Pumper] ERROR o.x.t.i.XWikiLogOutputStream - 2019-03-29 10:47:10,745 [http://host.testcontainers.internal:8080/xwiki/bin/view/XWiki/XWikiPreferences?xpage=getgroups&offset=1&limit=15&reqNo=1] WARN  o.x.v.i.DefaultVelocityEngine  - Deprecated usage of method [com.xpn.xwiki.plugin.rightsmanager.RightsManagerPluginApi.countAllMembersNamesForGroup] in 242:/templates/getgroups.vm@62,37
10:47:15.140 [Exec Stream Pumper] ERROR o.x.t.i.XWikiLogOutputStream - 2019-03-29 10:47:15,140 [http://host.testcontainers.internal:8080/xwiki/bin/get/XWiki/XWikiPreferences?xpage=getusersandgroups&offset=1&limit=10&reqNo=1&uorg=groups&wiki=local&clsname=XWiki.XWikiGlobalRights] WARN  o.x.v.i.DefaultVelocityEngine  - Deprecated usage of getter [com.xpn.xwiki.api.Document.getName] in 17:/templates/getusersandgroups.vm@146,46
10:47:16.595 [Exec Stream Pumper] ERROR o.x.t.i.XWikiLogOutputStream - 2019-03-29 10:47:16,595 [http://host.testcontainers.internal:8080/xwiki/bin/get/testCreateAndDeleteGroup/WebHome?xpage=getusersandgroups&offset=1&limit=10&reqNo=1&uorg=groups&wiki=local&clsname=XWiki.XWikiRights] WARN  o.x.v.i.DefaultVelocityEngine  - Deprecated usage of getter [com.xpn.xwiki.api.Document.getName] in 17:/templates/getusersandgroups.vm@146,46

And it’s not failing our jobs…

Thanks
-Vincent

> On 29 Mar 2019, at 10:27, Vincent Massol <[hidden email]> wrote:
>
> Hi devs,
>
> I'd like to discuss about introducing a checker in the tests to fail the test if there's a warning message about a deprecated APIs being used in scripts.
>
> For example:
>
> ```
> 23:59:28.308 [main] INFO  org.xwiki.test.ui.TestDebugger - GroupIT-addUserAndSubgroupToGroup started
> 23:59:32.593 [Exec Stream Pumper] ERROR o.x.t.i.XWikiLogOutputStream - 2019-03-28 23:59:32,593 [http://localhost:8080/xwiki/bin/view/XWiki/XWikiPreferences?xpage=getgroups&offset=1&limit=15&reqNo=1] WARN  o.x.v.i.DefaultVelocityEngine  - Deprecated usage of method [com.xpn.xwiki.plugin.rightsmanager.RightsManagerPluginApi.countAllMembersNamesForGroup] in 21:/templates/getgroups.vm@62,37
> 23:59:35.824 [Exec Stream Pumper] ERROR o.x.t.i.XWikiLogOutputStream - 2019-03-28 23:59:35,824 [http://localhost:8080/xwiki/bin/view/XWiki/XWikiPreferences?xpage=getgroups&offset=1&limit=15&reqNo=2] WARN  o.x.v.i.DefaultVelocityEngine  - Deprecated usage of method [com.xpn.xwiki.plugin.rightsmanager.RightsManagerPluginApi.countAllMembersNamesForGroup] in 18:/templates/getgroups.vm@62,37
> 23:59:41.349 [Exec Stream Pumper] ERROR o.x.t.i.XWikiLogOutputStream - 2019-03-28 23:59:41,348 [http://localhost:8080/xwiki/bin/view/XWiki/XWikiPreferences?xpage=getgroups&offset=1&limit=15&reqNo=3] WARN  o.x.v.i.DefaultVelocityEngine  - Deprecated usage of method [com.xpn.xwiki.plugin.rightsmanager.RightsManagerPluginApi.countAllMembersNamesForGroup] in 21:/templates/getgroups.vm@62,37
> 23:59:58.503 [main] INFO  org.xwiki.test.ui.TestDebugger - GroupIT-addUserAndSubgroupToGroup passed
> ```
>
> Rationale:
> * This adds warnings in the xwiki logs when users navigate to those pages which isn’t nice.
> * It also helps reducing the number of deprecated methods we use (I have the feeling this is not reducing) and helps us move towards being able to move the deprecated code to legacy.
>
> WDYT?
>
> Thanks
> -Vincent

Reply | Threaded
Open this post in threaded view
|

Re: [Brainstorming] Failing build when deprecated APIs are used in scripts?

Simon Urli
In reply to this post by vmassol


On 29/03/2019 10:37, Vincent Massol wrote:

>
>
>> On 29 Mar 2019, at 10:33, Simon Urli <[hidden email]> wrote:
>>
>> Hi Vincent,
>>
>> On 29/03/2019 10:27, Vincent Massol wrote:
>>> Hi devs,
>>> I'd like to discuss about introducing a checker in the tests to fail the test if there's a warning message about a deprecated APIs being used in scripts.
>>> For example:
>>> ```
>>> 23:59:28.308 [main] INFO  org.xwiki.test.ui.TestDebugger - GroupIT-addUserAndSubgroupToGroup started
>>> 23:59:32.593 [Exec Stream Pumper] ERROR o.x.t.i.XWikiLogOutputStream - 2019-03-28 23:59:32,593 [http://localhost:8080/xwiki/bin/view/XWiki/XWikiPreferences?xpage=getgroups&offset=1&limit=15&reqNo=1] WARN  o.x.v.i.DefaultVelocityEngine  - Deprecated usage of method [com.xpn.xwiki.plugin.rightsmanager.RightsManagerPluginApi.countAllMembersNamesForGroup] in 21:/templates/getgroups.vm@62,37
>>> 23:59:35.824 [Exec Stream Pumper] ERROR o.x.t.i.XWikiLogOutputStream - 2019-03-28 23:59:35,824 [http://localhost:8080/xwiki/bin/view/XWiki/XWikiPreferences?xpage=getgroups&offset=1&limit=15&reqNo=2] WARN  o.x.v.i.DefaultVelocityEngine  - Deprecated usage of method [com.xpn.xwiki.plugin.rightsmanager.RightsManagerPluginApi.countAllMembersNamesForGroup] in 18:/templates/getgroups.vm@62,37
>>> 23:59:41.349 [Exec Stream Pumper] ERROR o.x.t.i.XWikiLogOutputStream - 2019-03-28 23:59:41,348 [http://localhost:8080/xwiki/bin/view/XWiki/XWikiPreferences?xpage=getgroups&offset=1&limit=15&reqNo=3] WARN  o.x.v.i.DefaultVelocityEngine  - Deprecated usage of method [com.xpn.xwiki.plugin.rightsmanager.RightsManagerPluginApi.countAllMembersNamesForGroup] in 21:/templates/getgroups.vm@62,37
>>> 23:59:58.503 [main] INFO  org.xwiki.test.ui.TestDebugger - GroupIT-addUserAndSubgroupToGroup passed
>>> ```
>>> Rationale:
>>> * This adds warnings in the xwiki logs when users navigate to those pages which isn’t nice.
>>> * It also helps reducing the number of deprecated methods we use (I have the feeling this is not reducing) and helps us move towards being able to move the deprecated code to legacy.
>>> WDYT?
>>
>> Is it possible to start by doing this in a specific job and see the result?
>> If there's not much to fix then we can fix them and add this to the main build.
>>
>> I'm a bit afraid that we reproduce what happens with wcag: lots of failing test coming and not much bandwidth to fix them all so starting to "accept" failing tests where we shouldn’t.
>
> We can do what we usually do for checks: we have the ability to enable/disable them per module. So the strategy is:
>
> * Enable the check by default
> * Set it to not execute for all modules
> * Check which modules pass when it’s enabled and remove the property from their pom.xml. This allows to no longer have deprecation regressions in that module.
> * Then start fixing the deprecations module per module and remove the property there too.
>
> But first, we need to decide if we agree about doing this. Do you agree?

I agree on adding a check yes.
And ok with a strategy that allows us to fix it by module.

Simon

>
> Thanks
> -Vincent
>
>>
>> Simon
>>> Thanks
>>> -Vincent
>>
>> --
>> Simon Urli
>> Software Engineer at XWiki SAS
>> [hidden email]
>> More about us at http://www.xwiki.com
>

--
Simon Urli
Software Engineer at XWiki SAS
[hidden email]
More about us at http://www.xwiki.com
Reply | Threaded
Open this post in threaded view
|

Re: [Brainstorming] Failing build when deprecated APIs are used in scripts?

Thomas Mortagne
Administrator
In reply to this post by vmassol
+1

I'm pretty sure we used to have something like this.

On Fri, Mar 29, 2019 at 10:27 AM Vincent Massol <[hidden email]> wrote:

>
> Hi devs,
>
> I'd like to discuss about introducing a checker in the tests to fail the test if there's a warning message about a deprecated APIs being used in scripts.
>
> For example:
>
> ```
> 23:59:28.308 [main] INFO  org.xwiki.test.ui.TestDebugger - GroupIT-addUserAndSubgroupToGroup started
> 23:59:32.593 [Exec Stream Pumper] ERROR o.x.t.i.XWikiLogOutputStream - 2019-03-28 23:59:32,593 [http://localhost:8080/xwiki/bin/view/XWiki/XWikiPreferences?xpage=getgroups&offset=1&limit=15&reqNo=1] WARN  o.x.v.i.DefaultVelocityEngine  - Deprecated usage of method [com.xpn.xwiki.plugin.rightsmanager.RightsManagerPluginApi.countAllMembersNamesForGroup] in 21:/templates/getgroups.vm@62,37
> 23:59:35.824 [Exec Stream Pumper] ERROR o.x.t.i.XWikiLogOutputStream - 2019-03-28 23:59:35,824 [http://localhost:8080/xwiki/bin/view/XWiki/XWikiPreferences?xpage=getgroups&offset=1&limit=15&reqNo=2] WARN  o.x.v.i.DefaultVelocityEngine  - Deprecated usage of method [com.xpn.xwiki.plugin.rightsmanager.RightsManagerPluginApi.countAllMembersNamesForGroup] in 18:/templates/getgroups.vm@62,37
> 23:59:41.349 [Exec Stream Pumper] ERROR o.x.t.i.XWikiLogOutputStream - 2019-03-28 23:59:41,348 [http://localhost:8080/xwiki/bin/view/XWiki/XWikiPreferences?xpage=getgroups&offset=1&limit=15&reqNo=3] WARN  o.x.v.i.DefaultVelocityEngine  - Deprecated usage of method [com.xpn.xwiki.plugin.rightsmanager.RightsManagerPluginApi.countAllMembersNamesForGroup] in 21:/templates/getgroups.vm@62,37
> 23:59:58.503 [main] INFO  org.xwiki.test.ui.TestDebugger - GroupIT-addUserAndSubgroupToGroup passed
> ```
>
> Rationale:
> * This adds warnings in the xwiki logs when users navigate to those pages which isn’t nice.
> * It also helps reducing the number of deprecated methods we use (I have the feeling this is not reducing) and helps us move towards being able to move the deprecated code to legacy.
>
> WDYT?
>
> Thanks
> -Vincent



--
Thomas Mortagne
Reply | Threaded
Open this post in threaded view
|

Re: [Brainstorming] Failing build when deprecated APIs are used in scripts?

Marius Dumitru Florea
In reply to this post by vmassol
+1

Thanks,
Marius

On Fri, Mar 29, 2019 at 11:27 AM Vincent Massol <[hidden email]> wrote:

> Hi devs,
>
> I'd like to discuss about introducing a checker in the tests to fail the
> test if there's a warning message about a deprecated APIs being used in
> scripts.
>
> For example:
>
> ```
> 23:59:28.308 [main] INFO  org.xwiki.test.ui.TestDebugger -
> GroupIT-addUserAndSubgroupToGroup started
> 23:59:32.593 [Exec Stream Pumper] ERROR o.x.t.i.XWikiLogOutputStream -
> 2019-03-28 23:59:32,593 [
> http://localhost:8080/xwiki/bin/view/XWiki/XWikiPreferences?xpage=getgroups&offset=1&limit=15&reqNo=1]
> WARN  o.x.v.i.DefaultVelocityEngine  - Deprecated usage of method
> [com.xpn.xwiki.plugin.rightsmanager.RightsManagerPluginApi.countAllMembersNamesForGroup]
> in 21:/templates/getgroups.vm@62,37
> 23:59:35.824 [Exec Stream Pumper] ERROR o.x.t.i.XWikiLogOutputStream -
> 2019-03-28 23:59:35,824 [
> http://localhost:8080/xwiki/bin/view/XWiki/XWikiPreferences?xpage=getgroups&offset=1&limit=15&reqNo=2]
> WARN  o.x.v.i.DefaultVelocityEngine  - Deprecated usage of method
> [com.xpn.xwiki.plugin.rightsmanager.RightsManagerPluginApi.countAllMembersNamesForGroup]
> in 18:/templates/getgroups.vm@62,37
> 23:59:41.349 [Exec Stream Pumper] ERROR o.x.t.i.XWikiLogOutputStream -
> 2019-03-28 23:59:41,348 [
> http://localhost:8080/xwiki/bin/view/XWiki/XWikiPreferences?xpage=getgroups&offset=1&limit=15&reqNo=3]
> WARN  o.x.v.i.DefaultVelocityEngine  - Deprecated usage of method
> [com.xpn.xwiki.plugin.rightsmanager.RightsManagerPluginApi.countAllMembersNamesForGroup]
> in 21:/templates/getgroups.vm@62,37
> 23:59:58.503 [main] INFO  org.xwiki.test.ui.TestDebugger -
> GroupIT-addUserAndSubgroupToGroup passed
> ```
>
> Rationale:
> * This adds warnings in the xwiki logs when users navigate to those pages
> which isn’t nice.
> * It also helps reducing the number of deprecated methods we use (I have
> the feeling this is not reducing) and helps us move towards being able to
> move the deprecated code to legacy.
>
> WDYT?
>
> Thanks
> -Vincent
Reply | Threaded
Open this post in threaded view
|

Re: [Brainstorming] Failing build when deprecated APIs are used in scripts?

Alex Cotiugă
+1

Thanks,
Alex

On Wed, Apr 3, 2019 at 11:29 AM Marius Dumitru Florea <
[hidden email]> wrote:

> +1
>
> Thanks,
> Marius
>
> On Fri, Mar 29, 2019 at 11:27 AM Vincent Massol <[hidden email]>
> wrote:
>
> > Hi devs,
> >
> > I'd like to discuss about introducing a checker in the tests to fail the
> > test if there's a warning message about a deprecated APIs being used in
> > scripts.
> >
> > For example:
> >
> > ```
> > 23:59:28.308 [main] INFO  org.xwiki.test.ui.TestDebugger -
> > GroupIT-addUserAndSubgroupToGroup started
> > 23:59:32.593 [Exec Stream Pumper] ERROR o.x.t.i.XWikiLogOutputStream -
> > 2019-03-28 23:59:32,593 [
> >
> http://localhost:8080/xwiki/bin/view/XWiki/XWikiPreferences?xpage=getgroups&offset=1&limit=15&reqNo=1
> ]
> > WARN  o.x.v.i.DefaultVelocityEngine  - Deprecated usage of method
> >
> [com.xpn.xwiki.plugin.rightsmanager.RightsManagerPluginApi.countAllMembersNamesForGroup]
> > in 21:/templates/getgroups.vm@62,37
> > 23:59:35.824 [Exec Stream Pumper] ERROR o.x.t.i.XWikiLogOutputStream -
> > 2019-03-28 23:59:35,824 [
> >
> http://localhost:8080/xwiki/bin/view/XWiki/XWikiPreferences?xpage=getgroups&offset=1&limit=15&reqNo=2
> ]
> > WARN  o.x.v.i.DefaultVelocityEngine  - Deprecated usage of method
> >
> [com.xpn.xwiki.plugin.rightsmanager.RightsManagerPluginApi.countAllMembersNamesForGroup]
> > in 18:/templates/getgroups.vm@62,37
> > 23:59:41.349 [Exec Stream Pumper] ERROR o.x.t.i.XWikiLogOutputStream -
> > 2019-03-28 23:59:41,348 [
> >
> http://localhost:8080/xwiki/bin/view/XWiki/XWikiPreferences?xpage=getgroups&offset=1&limit=15&reqNo=3
> ]
> > WARN  o.x.v.i.DefaultVelocityEngine  - Deprecated usage of method
> >
> [com.xpn.xwiki.plugin.rightsmanager.RightsManagerPluginApi.countAllMembersNamesForGroup]
> > in 21:/templates/getgroups.vm@62,37
> > 23:59:58.503 [main] INFO  org.xwiki.test.ui.TestDebugger -
> > GroupIT-addUserAndSubgroupToGroup passed
> > ```
> >
> > Rationale:
> > * This adds warnings in the xwiki logs when users navigate to those pages
> > which isn’t nice.
> > * It also helps reducing the number of deprecated methods we use (I have
> > the feeling this is not reducing) and helps us move towards being able to
> > move the deprecated code to legacy.
> >
> > WDYT?
> >
> > Thanks
> > -Vincent
>