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

Refactor data prepper release process #2122

Closed
2 of 5 tasks
gaiksaya opened this issue Jan 9, 2023 · 8 comments · Fixed by #3149
Closed
2 of 5 tasks

Refactor data prepper release process #2122

gaiksaya opened this issue Jan 9, 2023 · 8 comments · Fixed by #3149
Assignees
Labels
proposal Proposed major changes to Data Prepper
Milestone

Comments

@gaiksaya
Copy link
Member

gaiksaya commented Jan 9, 2023

Is your feature request related to a problem? Please describe.
There has been a development in the way artifacts are released. We would like to re-do the data-prepper release process to use the new process opensearch-project/opensearch-build#1234

Old release process jenkins file : https://github.com/opensearch-project/opensearch-build/blob/main/jenkins/data-prepper/release-data-prepper-all-artifacts.jenkinsfile

Describe the solution you'd like

  1. Add release-drafter GitHub action workflow that will build the artifacts and upload the artifacts to a draft release. Sample workflow
  2. Add a new jenkins file to this repository that downloads those artifacts from the above draft release and uses a new lib called publishToMaven that autopublishes the maven artifacts to maven. Similary, other libraries such as copyContainer for copying container images to different platforms. This jenkins File uses draft release as a trigger.

In this new process, all that a maintainer needs to do is push a tag and the releasing artifacts to different platforms will be taken care by the GHA and jenkins workflows.

Describe alternatives you've considered (Optional)
Continue to use what we have.

Additional context
Add any other context or screenshots about the feature request here.

Design

See comment: #2122 (comment)

Tasks

@dlvenable dlvenable added proposal Proposed major changes to Data Prepper and removed untriaged labels Jan 11, 2023
@dlvenable
Copy link
Member

@gaiksaya , I believe we are almost doing this process.

We have a release GHA which builds artifacts and uploads them to our staging repository. This is similar to the release-drafter requested.

We also have an existing Jenkinsfile which you linked to. This copies from the artifacts we have above.

It sounds like the gap we have is only related to triggering these jobs. I understand you are looking for the following changes.

  1. Trigger the release job when a tag is pushed
  2. Trigger the Data Prepper Jenkinsfile when the release build is complete.

One thing that we do want to account for here is an idea of nightly releases. We've had several requests to provide nightly or weekly builds. We'd need to be sure that for such release builds, they do not trigger the Jenkinsfile.

@gaiksaya
Copy link
Member Author

Yes, trigger when tag is cut.
The current process needs a manual run by providing input the parameters. Trying to see how can we get out of that.
Few changes than we have made since then include maven publishing being completed automated. No manual intervention is required now (Need to make few changes in that jenkins file)

Regarding nightly builds, what artifacts would that be? I see multiple artifacts in this process.

@bbarani
Copy link
Member

bbarani commented Mar 13, 2023

@dlvenable Can you please let us know the status of on-boarding Data prepper to one click release process? We do not have bandwidth to support manual releases and I don't want that to become a blocker for any urgent releases.

@dlvenable dlvenable added this to the v2.3 milestone Apr 24, 2023
@dlvenable
Copy link
Member

@bbarani , We are working on this for the 2.3 release and plan to start using it with that release.

@dlvenable dlvenable modified the milestones: v2.3, v2.4 May 4, 2023
@asifsmohammed asifsmohammed modified the milestones: v2.4, v2.3 May 5, 2023
@dlvenable dlvenable modified the milestones: v2.3, v2.4 May 31, 2023
@dlvenable dlvenable moved this from Unplanned to To do in Data Prepper Tracking Board May 31, 2023
@dlvenable dlvenable assigned dlvenable and unassigned asifsmohammed Aug 2, 2023
@dlvenable
Copy link
Member

Overall Approach

The overall approach is to trigger the existing Data Prepper Jenkins job using a custom draft release trigger on Jenkins. This will be integrated into the existing Data Prepper release GitHub Action job.

You can conceptually view the release as:

  1. Build artifacts (existing)
  2. Smoke tests (existing)
  3. Confirm release using a GitHub issue.
  4. Start the Jenkins promotion job.

Release GitHub Action

We will add the following steps to the existing Data Prepper GitHub Action:

  1. Create a release issue which requires approval from two Data Prepper maintainers.
  2. Generate a release descriptor YAML file. See details below.
  3. Draft a GitHub release. Attach the release descriptor YAML to this draft release.

The Data Prepper repository will have a custom trigger for draft releases to start a Jenkins job. Thus, step 3 above will trigger Jenkins.

Jenkins Trigger

The opensearch-build project will need a new Jenkins trigger for Data Prepper. This trigger will be somewhat different than the existing trigger used by clients.

This trigger will:

  1. Get the draft release.
  2. Download the release descriptor from the draft release.
  3. Start the existing Jenkins job for promoting Data Prepper releases.

Release descriptor format.

The release descriptor file will be a fairly straightforward YAML file.

A simple example which relates to our 2.3.2 release build (build 33 on Jenkins).

version: 2.3.2
build_number: 60
release_major_tag: true
release_latest_tag: true

@asifsmohammed
Copy link
Collaborator

Create a release issue which requires approval from two Data Prepper maintainers.
How can we get approvals on an issue?

I thought the GA is going to create a PR for release.

@gaiksaya
Copy link
Member Author

gaiksaya commented Aug 2, 2023

Sample issue @asifsmohammed : opensearch-project/opensearch-py#462
Uses this GH action: https://github.com/opensearch-project/opensearch-py/blob/main/.github/workflows/release-drafter.yml#L17-L24

@dlvenable
Copy link
Member

@asifsmohammed , It is not a PR, but a GH issue as @gaiksaya noted.

The GHA will poll this issue looking for two comments from maintainers which have the known text.

You can see an example in my current testing right here: dlvenable#316

@dlvenable dlvenable moved this from To do to In progress in Data Prepper Tracking Board Aug 3, 2023
dlvenable added a commit to dlvenable/data-prepper that referenced this issue Aug 14, 2023
…elease issue has been approved by two maintainers. Resolves opensearch-project#2122.

Signed-off-by: David Venable <dlv@amazon.com>
dlvenable added a commit that referenced this issue Aug 18, 2023
…elease issue has been approved by two maintainers. Resolves #2122. (#3149)

Signed-off-by: David Venable <dlv@amazon.com>
@github-project-automation github-project-automation bot moved this from In progress to Done in Data Prepper Tracking Board Aug 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proposal Proposed major changes to Data Prepper
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants