Skip to content

Run git commit id Maven plugin only once#10521

Merged
kokosing merged 1 commit intotrinodb:masterfrom
nineinchnick:run-git-commit-plugin-once
Jan 10, 2022
Merged

Run git commit id Maven plugin only once#10521
kokosing merged 1 commit intotrinodb:masterfrom
nineinchnick:run-git-commit-plugin-once

Conversation

@nineinchnick
Copy link
Copy Markdown
Member

I ran a profiler and it turns out that this plugin takes up 10% of the wall time when building the whole project.

I'm also setting offline to true which is the default in the 5.0 version of this plugin: https://github.com/git-commit-id/git-commit-id-maven-plugin/releases/tag/v5.0.0 - this avoids talking to any remotes during the build, which we should not need.

From the docs:

When set to `true`, the plugin will not try to contact any remote repositories.
Any operations will only use the local state of the repo. If set to `false`, it will
execute `git fetch` operations e.g. to determine the `ahead` and `behind` branch
information.

@kokosing
Copy link
Copy Markdown
Member

I ran a profiler and it turns out that this plugin takes up 10% of the wall time when building the whole project.

How much % it takes now?

@kokosing
Copy link
Copy Markdown
Member

I'm also setting offline to true which is the default in the 5.0

Can we simply update to 5.0?

@nineinchnick
Copy link
Copy Markdown
Member Author

I ran a profiler and it turns out that this plugin takes up 10% of the wall time when building the whole project.

How much % it takes now?

Around 1%

I'm also setting offline to true which is the default in the 5.0

Can we simply update to 5.0?

I can give it a try, I'll open up a PR in airbase.

@kokosing kokosing merged commit b1ea134 into trinodb:master Jan 10, 2022
@kokosing
Copy link
Copy Markdown
Member

Thanks!

@github-actions github-actions bot added this to the 368 milestone Jan 10, 2022
@nineinchnick nineinchnick deleted the run-git-commit-plugin-once branch January 11, 2022 08:30
@nineinchnick
Copy link
Copy Markdown
Member Author

@kokosing we can't update git-commit-id to 5.0.0 since it drops support for Java 8 and Airbase still supports it: https://github.com/airlift/airbase#projectbuildtargetjdk

@ksobolew
Copy link
Copy Markdown
Contributor

@kokosing we can't update git-commit-id to 5.0.0 since it drops support for Java 8 and Airbase still supports it: https://github.com/airlift/airbase#projectbuildtargetjdk

Does it matter for Trino? The default Java version for all modules except some client-facing ones is 11, and it's the version used to build that actually matters anyway, I think.

@nineinchnick
Copy link
Copy Markdown
Member Author

No, but there are no other significant changes in the plugin. The change in the major version reflects a refactor/reorg so I don't think we should override the version only in Trino, because then we'd have to remember to make it in sync with Airbase again in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

4 participants