Opened 4 years ago

Closed 9 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


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/    public static final int ERROR_CODE_CONTINUITY = 3701;
./validation/    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

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 4 years ago.
patch for plugin

Download all attachments as: .zip

Change History (8)

Changed 4 years ago by GerdP

patch for plugin

comment:1 Changed 4 years ago by GerdP

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 4 years ago by GerdP (previous) (diff)

comment:2 Changed 15 months ago by skyper

Cc: taylor.smock added

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

comment:3 Changed 15 months ago by taylor.smock

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 Changed 11 months ago by taylor.smock

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 Changed 11 months ago by gaben

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 Changed 10 months ago by skyper

Guess this was fixed with r18637.

comment:7 Changed 9 months ago by taylor.smock

Resolution: fixed
Status: newclosed

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Biswesh.
as The resolution will be set.
The resolution will be deleted.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.