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

Added version qualifier support for OpenSearch. #1731

Merged
merged 1 commit into from
Mar 9, 2022

Conversation

dblock
Copy link
Member

@dblock dblock commented Mar 9, 2022

Signed-off-by: dblock dblock@dblock.org

Description

Adds an optional build version qualifier to the input manifest that is passed onto OpenSearch, which already supports qualified version numbers (currently only alpha, beta and rc).

Issues Resolved

Part of #1632.

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.

Signed-off-by: dblock <dblock@dblock.org>
@dblock dblock requested a review from a team as a code owner March 9, 2022 18:31
@codecov-commenter
Copy link

codecov-commenter commented Mar 9, 2022

Codecov Report

Merging #1731 (8babdde) into main (969b77a) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##               main    #1731      +/-   ##
============================================
+ Coverage     94.78%   94.79%   +0.01%     
  Complexity       17       17              
============================================
  Files           169      169              
  Lines          3525     3536      +11     
  Branches         26       26              
============================================
+ Hits           3341     3352      +11     
  Misses          181      181              
  Partials          3        3              
Impacted Files Coverage Δ
src/build_workflow/builder_from_source.py 100.00% <ø> (ø)
src/run_build.py 91.11% <ø> (ø)
src/build_workflow/build_target.py 100.00% <100.00%> (ø)
src/manifests/input_manifest.py 97.22% <100.00%> (+0.02%) ⬆️

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 969b77a...8babdde. Read the comment docs.

@@ -7,6 +7,7 @@ ci:
build:
name: OpenSearch
version: 2.0.0
qualifier: alpha1
Copy link
Member

Choose a reason for hiding this comment

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

What will be the qualifier for GA or prod artifact? Will this field be empty?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, we'll just remove this.

Copy link
Member

Choose a reason for hiding this comment

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

In that case this gradle command having a null or empty value for qualifier will not be an issue?
https://github.com/opensearch-project/opensearch-build/pull/1731/files#diff-004d8135f0e1267ff669721dc64b44f84729dc6fe871c6c2ef02eb9d1e04959dR75

Copy link
Member Author

Choose a reason for hiding this comment

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

It doesn't seem like it would be a problem, similarly we don't always pass a value for -Dbuild.snapshot=.

Copy link
Member

Choose a reason for hiding this comment

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

Okay. Also do we need to have a check to allow only certain values as a qualifier?

Copy link
Contributor

Choose a reason for hiding this comment

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

^Maybe not. This qualifier check logic is already handled downstream in the component build, so adding it here seems redundant and creates two sources of truth. So good to skip imo.

Copy link
Member

Choose a reason for hiding this comment

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

Looks like it only supports (alpha|beta|rc)

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure if plugins build script inherits the qualifier check logic as well (?) If not, it might make sense to add here.

Copy link
Member Author

Choose a reason for hiding this comment

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

Build will fail downstream, but probably makes sense to have a check here to fail on PRs to the manifest (fail earlier). Will add in a future PR.

scripts/components/OpenSearch/build.sh Show resolved Hide resolved
@dblock dblock merged commit eb5e8c4 into opensearch-project:main Mar 9, 2022
@dblock dblock deleted the add-qualifier-support branch March 9, 2022 21:38
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.

4 participants