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

[Campaign] Ensure Github workflow runs on docker image used by Production Distribution Build #3494

Open
peterzhuamazon opened this issue Oct 6, 2023 · 10 comments
Assignees
Labels
enhancement New feature or request triaged Issues labeled as 'Triaged' have been reviewed and are deemed actionable.

Comments

@peterzhuamazon
Copy link
Member

Hi All,

This is coming from the campaign here:

Overview

We would like your CI check (specifically plugin build) in GitHub Repo to run on top of the Build Docker Images from production distribution pipeline.

This is to ensure every plugin repo will use the exact docker images we used in Jenkins build, to check their PRs and run tests before merging the code, so that issues can be detected earlier, and environment can be identical across teams.

Solutions

The Build Team has created a simple script to dynamically retrieve the current docker image name/tag, so everyone can easily pull the images for their CI checks.

We have a trial run of the above with k-NN team. The script retrieves the docker image dynamically, save output, and use it as the docker image to pull for the upcoming run:

Note that GitHub Actions only support LINUX docker container at the time of this writing, so we will add Windows containers later on as well as macOS.

Implementation Notes

We would like you to review above PR and implement similar changes. Note on line 33 of the above k-NN PR, -u and -p parameters needs to assign values accordingly.

  • OpenSearch Plugin:
          CI_IMAGE_VERSION=`opensearch-build/docker/ci/get-ci-images.sh -p centos7 -u opensearch -t build | head -1`
  • OpenSearch-Dashboards Plugin:
          CI_IMAGE_VERSION=`opensearch-build/docker/ci/get-ci-images.sh -p rockylinux8 -u opensearch-dashboards -t build | head -1`

Note that in the above k-NN PR, despite it being OpenSearch plugin, it still uses rockylinux8, as we initially plan to upgrade to rockylinux. We have since revert back to centos7 to support older versions of systems running k-NN lib. As a result, all OpenSearch plugins still uses centos7 for the time being, and all OpenSearch-Dashboards plugins can go to rockylinux8.

Completion Date

The above should be implemented by Nov. 1, 2023 (2023-11-01) by Plugin Owners to their repository.
And backport the changes to 2.x branch after merging in main branch.

Contacts

Please contact @peterzhuamazon for any questions on this campaign.

cc: @bbarani

Thanks.

@peterzhuamazon peterzhuamazon added the enhancement New feature or request label Oct 6, 2023
@github-actions github-actions bot added the untriaged Require the attention of the repository maintainers and may need to be prioritized label Oct 6, 2023
@stephen-crawford
Copy link
Contributor

[Triage] Hi @peterzhuamazon, thank you for filing this issue. At this time, the Security repos do not have enough context around the purpose of this change... It seems like this is adding responsibility to the Security repo without context for the change. Could you provide a case for this change and why we should address it on such an aggressive time scale (11/1)?

Thank you.

@stephen-crawford stephen-crawford removed the untriaged Require the attention of the repository maintainers and may need to be prioritized label Oct 9, 2023
@peterzhuamazon
Copy link
Member Author

Hi @scrawfor99 I will work with you on this soon.

Thanks.

@peterzhuamazon
Copy link
Member Author

We have a new approach established here.
Please see this sample workflow file from Alerting for example:
https://github.com/opensearch-project/alerting/blob/main/.github/workflows/multi-node-test-workflow.yml

Thanks.

@stephen-crawford
Copy link
Contributor

Hi @peterzhuamazon, thanks for following up. Looking at the workflow you shared, it seems like the idea is to just use the docker image to make things more standardized? Have there been issues around this area?

I am not against the change, just want to make sure we (security) have the context for the root of the change.

@stephen-crawford
Copy link
Contributor

Hi @peterzhuamazon, just following up. Are you still pursuing this campaign? If not, we will close this issue. Thank you.

@peterzhuamazon
Copy link
Member Author

Hi @peterzhuamazon, thanks for following up. Looking at the workflow you shared, it seems like the idea is to just use the docker image to make things more standardized? Have there been issues around this area?

I am not against the change, just want to make sure we (security) have the context for the root of the change.

Yes @scrawfor99 this is for standardizing the github run env to be the same as on Jenkins during prod release build.

@peterzhuamazon
Copy link
Member Author

Due to the complexity of the workflows, we need to work with security team to understand the process before onboarding the docker images.

@stephen-crawford
Copy link
Contributor

Hi @peterzhuamazon, just checking in if there was anything you needed from the Security repos at this time. Thanks

@stephen-crawford
Copy link
Contributor

@reta to follow-up.

@stephen-crawford stephen-crawford added the triaged Issues labeled as 'Triaged' have been reviewed and are deemed actionable. label Dec 11, 2023
@reta reta self-assigned this Dec 18, 2023
@peternied
Copy link
Member

@peterzhuamazon This recommendation creates a circular dependency between security and OpenSearch-build repos please publish a GitHub action that can be consumed instead of a file [1]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request triaged Issues labeled as 'Triaged' have been reviewed and are deemed actionable.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants