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

Add placeholder plugins when auto-generating next version's manifests #3707

Closed
dblock opened this issue Jul 6, 2023 · 8 comments
Closed
Assignees
Labels
cicd enhancement New Enhancement

Comments

@dblock
Copy link
Member

dblock commented Jul 6, 2023

Is your feature request related to a problem? Please describe

Coming from opensearch-project/opensearch-plugins#219 (comment) the problem we'd like to solve is to know which plugins are going to be in some future release of OpenSearch. This is useful to, for example, run tests for the plugins on every PR into OpenSearch core (opensearch-project/OpenSearch#8486).

Describe the solution you'd like

  1. Allow manifests to include placeholder component references. These would not be packaged, ie. simply skipped in all the packaging/testing/etc. workflows.
components:
  - name: OpenSearch
    repository: https://github.com/opensearch-project/OpenSearch.git
    ref: 2.x
  - name: common-utils
    repository: https://github.com/opensearch-project/common-utils.git
    ref: 2.x
    placeholder: true # this is not a real component!
  1. When automatically creating a new manifest, copy all components from the previous manifest as placeholders.
  2. Releasing should check that there are no placeholder components.

Describe alternatives you've considered

No response

Additional context

No response

@dblock dblock added enhancement New Enhancement untriaged Issues that have not yet been triaged labels Jul 6, 2023
@jordarlu jordarlu removed the untriaged Issues that have not yet been triaged label Jul 10, 2023
@jordarlu
Copy link
Contributor

more info at #441 (comment)
#414 (comment)
@dblock , would you think the above two would make it work ? thanks

@dblock
Copy link
Member Author

dblock commented Jul 13, 2023

@jordarlu I don't think so, the chicken-egg problem isn't solved with any existing solution, my proposal resolves that

@Divyaasm
Copy link
Collaborator

The idea is to update the manifest file with all the plugins from the latest 2.x release. We should make some improvements to Manifest Workflow

@bbarani
Copy link
Member

bbarani commented Nov 6, 2023

One approach is to tweak CI manifest check workflow so only syntax of manifest file is checked instead of Gradle runs. CC: @peterzhuamazon

@peterzhuamazon
Copy link
Member

Will expand on the existing template on this.

@peterzhuamazon
Copy link
Member

We have a discussion on this and will go with approach 2 + Removing the input manifest checks section as the distribution build already taken care of the issue creation:

Approach 1 : Populate all the entries of the new input manifest, from corresponding templates

  • Steps:

    • Using the existing manifest templates located here: https://github.com/opensearch-project/opensearch-build/tree/main/manifests/templates
    • Update all templates to include every component from the latest release of their respective versions.
      • 1.x uses 1.3.14 as base
      • 2.x uses 2.11.1 as base
      • 3.x uses 3.0.0 as base
    • Update src/manifests_workflow to generate a new manifest based on the corresponding template, then replace the version number of the release and git reference of each component
  • Pros:

  • Cons:

    • A manual PR is required to add a new component
    • Adding all components at once, when not all of them have bumped their versions, can lead to build failures if the --continue-on-error parameter is not set

Approach 2: Populate all the entries of the new input manifest, from latest input manifest of major version
(Will approach)

  • Steps:
    • Update Python code, to find the latest manifest path of corresponding major version. e.g. If 1.x, use 1.3.14
    • Copy that manifest, then replace the version number of the release and git reference of each component
  • Pros:
    • Even easier approach then 1, as you do not need to maintain templates
    • Even smaller code changes to both the python code and the github action workflow.
    • Just edit latest version search logic to look for the latest version within the same major version category
    • Do not need manual PR to add new components for new manifest
  • Cons:
    • Relies on the latest version of the manifest to be correct, and maintain dependencies
    • Not reliable enough
    • Adding all components at once, when not all of them have bumped their versions, can lead to build failures if the --continue-on-error parameter is not set

Approach 3: Use Approach 1 + Add Placeholder parameter

  • Steps:
    • Same as Approach 1
    • Check every component, to see if version bump is available
    • Add placeholder parameter as true to plugins that needs version bump
    • Update build_workflow to take placeholder parameter into account
components:
  - name: OpenSearch
    repository: https://github.com/opensearch-project/OpenSearch.git
    ref: 2.x
  - name: common-utils
    repository: https://github.com/opensearch-project/common-utils.git
    ref: 2.x
    placeholder: true # this is not a real component!
  • Pros:
  • Cons:
    • A manual PR is required to add a new component
    • Placeholder: true is nothing different from --continue-on-error
    • Complicated implementation compares to both Approach 1 & 2

Approach 4: Use Approach 1 or 2 + Only adding components that has bumped the version already

  • Result will be the same as now, nothing changes

@peterzhuamazon
Copy link
Member

Close this in favor of issue #4389.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cicd enhancement New Enhancement
Projects
5 participants