Skip to content

Insert project info in configuration files - #3254

Merged
t2gran merged 3 commits into
opentripplanner:dev-2.xfrom
entur:otp2_enable_project_info_conf_substitution
Nov 22, 2020
Merged

t2gran merged 3 commits into
opentripplanner:dev-2.xfrom
entur:otp2_enable_project_info_conf_substitution

Conversation

@t2gran

@t2gran t2gran commented Nov 19, 2020 •

Copy link
Copy Markdown
Member

There is not issue for this PR. The PR provide:

  • a cleanup of the MavenInfo class in OTP
  • Cleanup: The serialVersionUID in a class should change when the class change, not depend on the Maven version
    number. The serialized graph on the other hand can have a check on the Maven version number to see if two graphs
    are complient.
  • MavenInfo is renamed ProjectInfo - it holds info avout the Maven project version as well as som Git info.
  • Documentation on the environment substitution. This is just mentioned in the Configuration.md, but not clearly
    described, now it is.
  • Include ProjectInfo in the configuration substitution as well as the environmental variables substitution.
  • I have changed the 3 version number from incremental to patch, using the terminology on wikipedia. incremental is used by Maven, but not as the 3rd version number.

To be completed by pull request submitter:

  • issue: No
  • roadmap: No
  • tests: Yes, Unit tests on all new features are added.
  • formatting: Yes
  • documentation: Yes
  • changelog: Yes.

To be completed by @opentripplanner/plc:

  • reviews and approvals by 2 members, ideally from different organizations
  • after merging: update the relevant card on the roadmap

@t2gran t2gran added !Improvement A functional improvement or micro feature !Documentation Improve documentation targeting users and/or developers. labels Nov 19, 2020
@t2gran t2gran added this to the 2.1 milestone Nov 19, 2020
@t2gran
t2gran requested a review from a team November 19, 2020 15:30

@abyrd abyrd left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me. It's always a bit of a maintenance risk having to manually update serialVersionUID anytime a class's structure changes. But of course the existing approach using the project version number doesn't really work either.

@t2gran

t2gran commented Nov 22, 2020

Copy link
Copy Markdown
Member Author

It's always a bit of a maintenance risk having to manually update serialVersionUID anytime a class's structure changes. But of course the existing approach using the project version number doesn't really work either.

I agree. I have not experienced that this is a real problem in OTP. OTP serialization frequently fails - most of the time for good reasons. I do not think it is important to do this kind of fine grid management. We do a test on the version number, and I think that that is enough. When we remember we should probably increment the serialVersionUID. So, I think we should use the "De facto standard" here. If we want to improve on this, we could start to increment the patch part of the version number every time the graph is not backward compatible. That would be very useful.

@t2gran
t2gran merged commit f9a6058 into opentripplanner:dev-2.x Nov 22, 2020
@t2gran
t2gran deleted the otp2_enable_project_info_conf_substitution branch November 22, 2020 23:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

!Documentation Improve documentation targeting users and/or developers. !Improvement A functional improvement or micro feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants