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

[RPM M1] Add rpm assemble/bundle code for opensearch using rpmbuild #1726

Conversation

peterzhuamazon
Copy link
Member

Description

Add rpm assemble/bundle code for opensearch using rpmbuild.
Adding rpm specific block so that cpio is used during extraction, and rpmbuild is used during build.
A specific opensearch spec file is provided, dashboards one will be committed in another PR.

Issues Resolved

Part of #1545

Check List

  • Commits are signed per the DCO using --signoff

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.

@codecov-commenter
Copy link

codecov-commenter commented Mar 9, 2022

Codecov Report

Merging #1726 (f010bb6) into main (c8cf15e) will decrease coverage by 0.16%.
The diff coverage is 84.12%.

Impacted file tree graph

@@             Coverage Diff              @@
##               main    #1726      +/-   ##
============================================
- Coverage     94.76%   94.59%   -0.17%     
- Complexity       14       17       +3     
============================================
  Files           168      170       +2     
  Lines          3512     3592      +80     
  Branches         26       26              
============================================
+ Hits           3328     3398      +70     
- Misses          181      191      +10     
  Partials          3        3              
Impacted Files Coverage Δ
src/assemble_workflow/dist.py 92.64% <75.00%> (-2.44%) ⬇️
src/assemble_workflow/bundle_rpm.py 83.67% <83.67%> (ø)
src/assemble_workflow/bundle.py 95.12% <100.00%> (+0.38%) ⬆️
src/assemble_workflow/dists.py 100.00% <100.00%> (ø)
src/run_build.py 91.11% <0.00%> (ø)
src/build_workflow/build_target.py 100.00% <0.00%> (ø)
src/assemble_workflow/bundle_recorder.py 100.00% <0.00%> (ø)
src/build_workflow/builder_from_source.py 100.00% <0.00%> (ø)
tests/jenkins/jobs/CreateReleaseTag_Jenkinsfile 100.00% <0.00%> (ø)
src/manifests/input_manifest.py 97.22% <0.00%> (+0.02%) ⬆️
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c8cf15e...f010bb6. Read the comment docs.

@peterzhuamazon peterzhuamazon changed the title Add rpm assemble/bundle code for opensearch using rpmbuild [RPM M1] Add rpm assemble/bundle code for opensearch using rpmbuild Mar 9, 2022
Signed-off-by: Peter Zhu <[email protected]>
@peterzhuamazon
Copy link
Member Author

Hi @dblock please review the code and I will add test cases later.

Thanks.

Copy link
Member

@dblock dblock left a comment

Choose a reason for hiding this comment

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

Needs passing tests and documentation updates.

scripts/components/OpenSearch-Dashboards/install.sh Outdated Show resolved Hide resolved
@peterzhuamazon peterzhuamazon requested review from dblock and a team March 11, 2022 03:50
Copy link
Member

@dblock dblock left a comment

Choose a reason for hiding this comment

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

The cd worries me. Can we merge without that?

@peterzhuamazon
Copy link
Member Author

@spotrh would you mind checking the spec file in this PR?

Thanks.

Note: as of now we are using bundled JDK per #1682 (comment)

And we are also thinking about using Adopt per community suggestions: opensearch-project/OpenSearch#2312 (comment)

zelinh
zelinh previously requested changes Mar 11, 2022
Copy link
Member

@zelinh zelinh left a comment

Choose a reason for hiding this comment

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

Block this PR for now until Spot review the spec files.

Copy link

@spotrh spotrh left a comment

Choose a reason for hiding this comment

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

Looks very good to me. I don't understand the tests well enough here to be sure, but I don't think there is any CI integration to confirm that the RPM was properly generated (or generated at all). Not a blocker for this, but probably something you want to do.

@peterzhuamazon
Copy link
Member Author

Looks very good to me. I don't understand the tests well enough here to be sure, but I don't think there is any CI integration to confirm that the RPM was properly generated (or generated at all). Not a blocker for this, but probably something you want to do.

Yes @spotrh we have plans to add tests and verifications here: #27
See milestone 5 / 6 about the steps we plan to do.

Thanks.

@peterzhuamazon peterzhuamazon dismissed zelinh’s stale review March 12, 2022 00:46

@spotrh has approved the PR now.

zelinh
zelinh previously requested changes Mar 12, 2022
Copy link
Member

@zelinh zelinh left a comment

Choose a reason for hiding this comment

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

Block this one from merging since we haven't generated the artifacts candidates for 1.3.0 release.

@peterzhuamazon peterzhuamazon dismissed zelinh’s stale review March 18, 2022 17:51

1.3.0 is released we can resume this now.

@peterzhuamazon peterzhuamazon merged commit d0189aa into opensearch-project:main Mar 18, 2022
@peterzhuamazon peterzhuamazon deleted the opensearch-assemble-distribution-rpmpkg branch March 18, 2022 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants