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

Enable patch releases by fetching some components from existing distribution. #789

Merged
merged 4 commits into from
Nov 2, 2021

Conversation

dblock
Copy link
Member

@dblock dblock commented Oct 22, 2021

Signed-off-by: dblock dblock@amazon.com

Description

  • Adds a new component type that specifies "dist" to pull from an existing distribution instead of building from source.
  • Adds "patches" into the input manifest that includes a list of existing versions this distribution patches.

This allows build to produce a mixed distribution with multiple versions of components, e.g. 1.1.0 + some components built from source = 1.1.1.

In the provided example this build fails trying to build anomaly-detection, which expects OpenSearch core 1.1.1, but we're giving it 1.1.0. The builds for those patched components will need to pickup the released dependency from maven explicitly.

Issues Resolved

Closes #373.

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.

@dblock dblock force-pushed the build-from-dist branch 2 times, most recently from ad14bd8 to c1f48bd Compare October 29, 2021 19:22
@dblock dblock changed the title WIP: Build components from distribution. Enable patch releases by fetching some components from existing distribution. Oct 29, 2021
@dblock dblock marked this pull request as ready for review October 29, 2021 19:29
@dblock
Copy link
Member Author

dblock commented Nov 1, 2021

@saratvemulapalli @peternied Bump, this is ready for review please.

Signed-off-by: dblock <dblock@amazon.com>
Signed-off-by: dblock <dblock@amazon.com>
Signed-off-by: dblock <dblock@amazon.com>
Signed-off-by: dblock <dblock@amazon.com>
@codecov-commenter
Copy link

codecov-commenter commented Nov 1, 2021

Codecov Report

Merging #789 (6b38d06) into main (3ca40c5) will decrease coverage by 0.41%.
The diff coverage is 84.65%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #789      +/-   ##
==========================================
- Coverage   91.60%   91.18%   -0.42%     
==========================================
  Files          81       87       +6     
  Lines        2250     2370     +120     
==========================================
+ Hits         2061     2161     +100     
- Misses        189      209      +20     
Impacted Files Coverage Δ
src/ci_workflow/ci_check_list_source.py 54.54% <50.00%> (ø)
src/build_workflow/builders.py 54.54% <54.54%> (ø)
src/run_ci.py 85.71% <62.50%> (-0.96%) ⬇️
src/ci_workflow/ci_check_list_dist.py 66.66% <66.66%> (ø)
src/run_build.py 88.57% <66.66%> (-0.32%) ⬇️
src/build_workflow/builder.py 75.00% <72.72%> (-25.00%) ⬇️
src/ci_workflow/ci_check_list.py 77.77% <77.77%> (ø)
src/manifests/input_manifest.py 94.18% <88.46%> (-2.88%) ⬇️
src/build_workflow/builder_from_dist.py 91.42% <91.42%> (ø)
src/build_workflow/build_target.py 100.00% <100.00%> (ø)
... and 9 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 3ca40c5...6b38d06. Read the comment docs.

Copy link
Member

@peternied peternied left a comment

Choose a reason for hiding this comment

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

General feedback, deeper inspection later

- 1.1.0
components:
- name: OpenSearch
dist: https://ci.opensearch.org/ci/dbc/builds/1.1.0/405
Copy link
Member

Choose a reason for hiding this comment

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

The path will need to be inferred/discovered which will have been broken with the recent url restructuring that only impacted the 1.2.0+ builds. Should we add parameters to help the build system construct the correct path to the manifest?

Copy link
Member Author

Choose a reason for hiding this comment

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

Either in a separate PR or maybe we should just copy the manifest with bad URLs to a corrected copy in S3 and use that instead.

Copy link
Member

Choose a reason for hiding this comment

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

The manifest is oriented around the components of with a platform / architecture, do we need another kind of manifest that is oriented around a releases artifacts. Note, we can move this out to another PR

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't see this as necessary. This is a bundle (assembly/distribution) manifest that can now include references to another bundle, and picks up components with matching platform/architecture.

src/build_workflow/build_target.py Show resolved Hide resolved
def build(self, build_recorder):
pass

def export_artifacts(self, build_recorder):
Copy link
Member

Choose a reason for hiding this comment

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

export doesn't seem to align with the action what about import or download + "_artifacts"?

Copy link
Member Author

@dblock dblock Nov 2, 2021

Choose a reason for hiding this comment

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

I thought about this. The "from source" code exports those artifacts, while the "from distribution" code downloads and exports those artifacts. They should really be spit up into download_artifacts and export_artifacts. I have another PR with more changes along those lines if that's OK?

- 1.1.0
components:
- name: OpenSearch
dist: https://ci.opensearch.org/ci/dbc/builds/1.1.0/405
Copy link
Member

Choose a reason for hiding this comment

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

The manifest is oriented around the components of with a platform / architecture, do we need another kind of manifest that is oriented around a releases artifacts. Note, we can move this out to another PR

@dblock dblock requested a review from peternied November 2, 2021 17:31
Copy link
Member

@saratvemulapalli saratvemulapalli left a comment

Choose a reason for hiding this comment

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

Lots of changes.
Did a pass, overall it looks good to me.

@dblock dblock merged commit b4894a4 into opensearch-project:main Nov 2, 2021
@dblock dblock deleted the build-from-dist branch November 2, 2021 17:47
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.

Add support for building patch releases
4 participants