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

[release]: OpenSearch-PHP 1-click #3146

Closed
harshavamsi opened this issue Jan 27, 2023 · 15 comments
Closed

[release]: OpenSearch-PHP 1-click #3146

harshavamsi opened this issue Jan 27, 2023 · 15 comments
Assignees
Labels

Comments

@harshavamsi
Copy link

What is the name of your component?

OpenSearch-PHP

What is the link to your GitHub repo?

https://github.com/opensearch-project/opensearch-php

Targeted release date

2/3/2023

Where should we publish this component?

https://packagist.org/

What type of artifact(s) will be generated for this component?

.tar.gz

Have you completed the required reviews including security reviews, UX reviews?

Yes

Have you on-boarded automated security scanning for the GitHub repo associated with this component?

Yes

Additional context

No response

@harshavamsi harshavamsi added untriaged Issues that have not yet been triaged release labels Jan 27, 2023
@zelinh
Copy link
Member

zelinh commented Feb 3, 2023

[Triages] Adding @gaiksaya here.

@zelinh zelinh removed the untriaged Issues that have not yet been triaged label Feb 3, 2023
@bbarani bbarani moved this from Not started to Backlog in OpenSearch Engineering Effectiveness Mar 14, 2023
@gaiksaya
Copy link
Member

Looks like we can use API to programmatically submit a new package https://packagist.org/apidoc#create-package
@harshavamsi @shyim Let me know if there is a better way using an available CLI or something.

Thanks!

@shyim
Copy link

shyim commented Apr 21, 2023

We don't need new packages, but a Webhook in the repository would be nice so it updates automatically

https://packagist.org/about#how-to-update-packages

@Divyaasm
Copy link
Collaborator

Hi @shyim @harshavamsi , please confirm if https://packagist.org/about#how-to-update-packages is the recommended approach so that we can move forward with the next steps.

@shyim
Copy link

shyim commented May 17, 2023

Yes that is the recommended way

@gaiksaya
Copy link
Member

I believe we don't want to keep updating the package on every push right? Does it make sense to update the package when a tag is cut on GitHub?
Adding @harshavamsi @wbeckler to this.

@harshavamsi
Copy link
Author

I believe we don't want to keep updating the package on every push right? Does it make sense to update the package when a tag is cut on GitHub? Adding @harshavamsi @wbeckler to this.

Yes, only when a tag is cut. Let's do that.

@gaiksaya
Copy link
Member

gaiksaya commented May 17, 2023

Cool. In that case it is pretty straight foward process:
Please useManual hook setup https://packagist.org/about#how-to-update-packages as GitHub does NOT have the mechanism to push only tag webhook event. Also we want to add 2PR approval (example) in the workflow.
Can the maintainers look into adding that workflow to GitHub Actions.

Publish to Packagist:
1. Checkout repo
2. Add 2PR approval that will create an issue asking maintainers' approval. Example. Once approved, the workflow will auto-continue.
3. Get the API token similar to https://github.com/opensearch-project/opensearch-hadoop/blob/main/.github/workflows/publish_snapshot.yml#L91-L101
4. Run the update package API:

curl -XPOST -H'content-type:application/json' 'https://packagist.org/api/update-package?username=opensearch&apiToken=API_TOKEN' -d'{"repository":{"url":"https://packagist.org/packages/opensearch-project/opensearch-php"}}'
  1. Once successful, create a release on GitHub.

@shyim
Copy link

shyim commented May 17, 2023

This looks for me like an abuse of Github Actions (and I really hope they forbid this in future with their runners) 🙈. Really waste of resources to let the job run wait until everyone approves, also is pretty unstable what when nobody writes and the action timeouts

@gaiksaya
Copy link
Member

I believe the window is 72 hours.

Note: This approval duration is subject to the broader 72 hours timeout for a workflow. So keep that in mind when figuring out how quickly an approver must respond.

https://github.com/trstringer/manual-approval

Why 2PR? Here is the issue for more details: #3111

@VachaShah
Copy link
Contributor

Hi @gaiksaya, what would be the next steps for getting the automated release for php client?

@prudhvigodithi
Copy link
Member

Hey @gaiksaya can you please add your thoughts on adding this to one-click release process?

@wbeckler
Copy link

@gaiksaya should have the permissions to finish setting this up as per #1108

@dblock dblock changed the title [release]: OpenSearch-PHP [release]: OpenSearch-PHP 1-click Apr 22, 2024
@gaiksaya gaiksaya self-assigned this Apr 22, 2024
@gaiksaya gaiksaya moved this from Backlog to In Progress in OpenSearch Engineering Effectiveness Apr 22, 2024
@gaiksaya
Copy link
Member

Sorry for the delayed response. Will look into it.

@gaiksaya
Copy link
Member

OpenSearch-PHP has been onboarded to 1-click release now. There are further enhancement suggested by maintainers which can be followed up in different issue.
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

No branches or pull requests

8 participants