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

Apply reproducible builds to plugins #4746

Merged
merged 2 commits into from
Oct 14, 2022

Conversation

inglor
Copy link
Contributor

@inglor inglor commented Oct 12, 2022

Description

As per gradle docs apply gradle configuration to remove timestamps and package with same order for all plugins. This is required from reproducible builds

Issues Resolved

This PR is a result of opensearch-project/opensearch-plugin-template-java#38 discussion.

Check List

  • New functionality includes testing.
    • All tests pass
  • [-] New functionality has been documented.
    • [-] New functionality has javadoc added
  • Commits are signed per the DCO using --signoff
  • Commit changes are listed out in CHANGELOG.md file (See: Changelog)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@inglor inglor requested review from a team and reta as code owners October 12, 2022 07:23
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@dblock
Copy link
Member

dblock commented Oct 13, 2022

Can we have a rudimentary test for this, please? You also need an entry in CHANGELOG.

As per gradle [docs] add support to remove timestamps and package with
same order which is required from [reproducible] builds

This is a result of the discussion in
opensearch-project/opensearch-plugin-template-java#38
to apply for all plugins going forward.

[docs]:
https://docs.gradle.org/current/userguide/working_with_files.html#sec:reproducible_archives
[reproducible]: https://reproducible-builds.org/

Signed-off-by: Leonidas Spyropoulos <artafinde@archlinux.org>
@inglor
Copy link
Contributor Author

inglor commented Oct 14, 2022

Can we have a rudimentary test for this, please? You also need an entry in CHANGELOG.

Added a basic test and included the change in Changelog :)

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@codecov-commenter
Copy link

Codecov Report

Merging #4746 (885ff84) into main (d708860) will increase coverage by 0.05%.
The diff coverage is 100.00%.

@@             Coverage Diff              @@
##               main    #4746      +/-   ##
============================================
+ Coverage     70.69%   70.75%   +0.05%     
+ Complexity    57732    57724       -8     
============================================
  Files          4687     4687              
  Lines        277290   277293       +3     
  Branches      40376    40376              
============================================
+ Hits         196042   196186     +144     
+ Misses        64947    64718     -229     
- Partials      16301    16389      +88     
Impacted Files Coverage Δ
.../opensearch/gradle/plugin/PluginBuildPlugin.groovy 36.28% <100.00%> (+8.10%) ⬆️
...n/indices/forcemerge/ForceMergeRequestBuilder.java 0.00% <0.00%> (-75.00%) ⬇️
...ava/org/opensearch/action/NoSuchNodeException.java 0.00% <0.00%> (-50.00%) ⬇️
...ch/transport/ReceiveTimeoutTransportException.java 50.00% <0.00%> (-50.00%) ⬇️
...opensearch/persistent/PersistentTasksExecutor.java 22.22% <0.00%> (-44.45%) ⬇️
.../indices/forcemerge/TransportForceMergeAction.java 25.00% <0.00%> (-33.34%) ⬇️
...regations/metrics/AbstractHyperLogLogPlusPlus.java 63.79% <0.00%> (-25.87%) ⬇️
...a/org/opensearch/index/mapper/MapperException.java 75.00% <0.00%> (-25.00%) ⬇️
...ensearch/client/indices/DetailAnalyzeResponse.java 20.54% <0.00%> (-24.66%) ⬇️
.../search/aggregations/bucket/range/ParsedRange.java 67.50% <0.00%> (-23.75%) ⬇️
... and 495 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@dblock dblock merged commit e44158d into opensearch-project:main Oct 14, 2022
@dblock dblock added the backport 2.x Backport to 2.x branch label Oct 14, 2022
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.x failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-2.x 2.x
# Navigate to the new working tree
cd .worktrees/backport-2.x
# Create a new branch
git switch --create backport/backport-4746-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 e44158d4d10d4f8905895ffa50bf9398b8550667
# Push it to GitHub
git push --set-upstream origin backport/backport-4746-to-2.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.x

Then, create a pull request where the base branch is 2.x and the compare/head branch is backport/backport-4746-to-2.x.

ashking94 pushed a commit to ashking94/OpenSearch that referenced this pull request Nov 7, 2022
As per gradle [docs] add support to remove timestamps and package with
same order which is required from [reproducible] builds

This is a result of the discussion in
opensearch-project/opensearch-plugin-template-java#38
to apply for all plugins going forward.

[docs]:
https://docs.gradle.org/current/userguide/working_with_files.html#sec:reproducible_archives
[reproducible]: https://reproducible-builds.org/

Signed-off-by: Leonidas Spyropoulos <artafinde@archlinux.org>

Signed-off-by: Leonidas Spyropoulos <artafinde@archlinux.org>
Co-authored-by: Daniel (dB.) Doubrovkine <dblock@amazon.com>
inglor added a commit to inglor/OpenSearch that referenced this pull request Nov 16, 2022
As per gradle [docs] add support to remove timestamps and package with
same order which is required from [reproducible] builds

This is a result of the discussion in
opensearch-project/opensearch-plugin-template-java#38
to apply for all plugins going forward.

[docs]:
https://docs.gradle.org/current/userguide/working_with_files.html#sec:reproducible_archives
[reproducible]: https://reproducible-builds.org/

Signed-off-by: Leonidas Spyropoulos <artafinde@archlinux.org>
Co-authored-by: Daniel (dB.) Doubrovkine <dblock@amazon.com>
(cherry picked from commit e44158d)
@inglor
Copy link
Contributor Author

inglor commented Nov 16, 2022

I opened the backport manually since the automatic way failed due to changelog.md conflicts.

#5281

reta pushed a commit that referenced this pull request Nov 16, 2022
As per gradle [docs] add support to remove timestamps and package with
same order which is required from [reproducible] builds

This is a result of the discussion in
opensearch-project/opensearch-plugin-template-java#38
to apply for all plugins going forward.

[docs]:
https://docs.gradle.org/current/userguide/working_with_files.html#sec:reproducible_archives
[reproducible]: https://reproducible-builds.org/

Signed-off-by: Leonidas Spyropoulos <artafinde@archlinux.org>
Co-authored-by: Daniel (dB.) Doubrovkine <dblock@amazon.com>
(cherry picked from commit e44158d)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x Backport to 2.x branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants