Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build timestamp when displaying powsybl version #2911

Merged
merged 1 commit into from
Feb 28, 2024

Conversation

antoinebhs
Copy link
Contributor

@antoinebhs antoinebhs commented Feb 27, 2024

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

Does this PR already have an issue describing the problem?

No

What kind of change does this PR introduce?

#2778 introduced a regression when displaying the Powsybl versions.

What is the current behavior?

For example, when running the network-store-server, it displays:

2024-02-27T15:17:48.777+01:00  INFO 522297 --- [           main] c.p.n.s.s.NetworkStoreStartupRunner      : Powsybl versions:
+-----------------------+-----------------------+------------+------------------------------------------+------------------------+
| Repository name       | Maven project version | Git branch | Git version                              | Build timestamp        |
+-----------------------+-----------------------+------------+------------------------------------------+------------------------+
| powsybl-network-store | 1.8.0                 | UNKNOWN    | b05b4893bc334768b5e8651578179672be872150 | +56050-12-11T11:59:15Z |
| powsybl-core          | 6.1.2                 | UNKNOWN    | 2c718501f831c24059fd54f15240544e0d7c045c | +56031-03-09T20:10:56Z |
+-----------------------+-----------------------+------------+------------------------------------------+------------------------+

with an incorrect build timestamp.

What is the new behavior (if this is a feature change)?
When changing the conversion expecting a timestamp in milliseconds as described in https://www.mojohaus.org/buildnumber-maven-plugin/create-timestamp-mojo.html#timestampFormat, the timestamp displays correctly:

2024-02-27T15:07:20.904+01:00  INFO 512615 --- [           main] c.p.n.s.s.NetworkStoreStartupRunner      : Powsybl versions:
+-----------------------+-----------------------+------------+------------------------------------------+--------------------------+
| Repository name       | Maven project version | Git branch | Git version                              | Build timestamp          |
+-----------------------+-----------------------+------------+------------------------------------------+--------------------------+
| powsybl-network-store | 1.8.0                 | UNKNOWN    | b05b4893bc334768b5e8651578179672be872150 | 2024-01-30T15:49:40.755Z |
| powsybl-core          | 6.3.0-SNAPSHOT        | main       | 88eaca4bef31e5a334ffa27c6c5b68c4ff511d3d | 2024-02-27T14:00:00.212Z |
+-----------------------+-----------------------+------------+------------------------------------------+--------------------------+

Does this PR introduce a breaking change or deprecate an API?

  • Yes
  • No

Signed-off-by: BOUHOURS Antoine <antoine.bouhours@rte-france.com>
Copy link

@antoinebhs antoinebhs requested a review from rolnico February 27, 2024 14:37
@flo-dup flo-dup merged commit 0c17579 into main Feb 28, 2024
6 checks passed
@flo-dup flo-dup deleted the fix-buildtimestamp-version branch February 28, 2024 16:08
olperr1 pushed a commit that referenced this pull request Mar 6, 2024
Signed-off-by: BOUHOURS Antoine <antoine.bouhours@rte-france.com>
(cherry picked from commit 0c17579)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants