Modify

Opened 5 years ago

Closed 21 months ago

#18230 closed defect (fixed)

pt_assistant uses error code 3701 which is also used by RightAngleBuildingTest

Reported by: GerdP Owned by: Biswesh
Priority: normal Milestone:
Component: Plugin pt_assistant Version:
Keywords: ignore Cc: taylor.smock

Description

The current implementation to ignore errors expects that the error key is somehow unique. Unfortunately there seems to be no method to verify that and I just found a conflict.
The code 3701 is used by RightAngleBuildingTest and by plugin pt_assistent.
In fact, it seems to be used for two different kinds of errors in pt_assistent:
I see different sources in pt_assisten with code 3701:

./validation/BicycleFootRouteValidatorTest.java:    public static final int ERROR_CODE_CONTINUITY = 3701;
./validation/PTAssistantValidatorTest.java:    public static final int ERROR_CODE_FROM_TO_ROUTE_TAG = 3701;

The plugins directory contains two plugins which use TestError, pt_assistant and wikipedia.
I think pt_assistant uses range 3700..3799, wikipedia seems to reserve 30000..31000, not just
30000..30100.

IIGTR pt_assistant is newer than RightAngleBuildingTest, so it should probably be changed to use a different range.
Maybe we can somehow log a warning when a plugin creates a TestError with a code < 30000?

Attachments (1)

18230-fix-ignore-codes.patch (4.4 KB ) - added by GerdP 5 years ago.
patch for plugin

Download all attachments as: .zip

Change History (8)

by GerdP, 5 years ago

patch for plugin

comment:1 by GerdP, 5 years ago

18230-fix-ignore-codes.patch changes the error codes produced by the plugin pt_assistant to use the range 30700..30799 instead of 3701..3799.
It would be good to be able to fix ignore list entries for the code 3702..3799.
I see only one way to handle this:

  • The modified plugin adds similar ignore list entries in the range 30702 .. 30799 for those with codes 3702..3799
  • The RightAngleBuildingTest is also changed to use a new range, e.g. 4000..4100
  • The code range 3700 .. 3799 must never be used again
  • In one year or so we may remove the entries for 3700..3799
Last edited 5 years ago by GerdP (previous) (diff)

comment:2 by skyper, 2 years ago

Cc: taylor.smock added

@Taylor:
Did you fix this while fixing the other duplicates of error code a few weeks ago?

comment:3 by taylor.smock, 2 years ago

Looking at #21423, I was waiting on feedback, and forgot about it. So we still have the duplicate error codes.

Thanks for reminding me. I'll set the milestone for #21423 to 22.09 so I don't forget about it.

comment:4 by taylor.smock, 23 months ago

In 18637/josm:

See #18230: Move RightAngleBuildingTest error code to 4101 from 3701.

This is due to clashing with an error code from pt_assistant.

See also #21423: Ensure validator codes are unique -- replace missed
since xxx with since 18636.

comment:5 by gaben, 23 months ago

Summary: pt_assistent uses error code 3701 which is also used by RightAngleBuildingTestpt_assistant uses error code 3701 which is also used by RightAngleBuildingTest

comment:6 by skyper, 22 months ago

Guess this was fixed with r18637.

comment:7 by taylor.smock, 21 months ago

Resolution: fixed
Status: newclosed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Biswesh.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.