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

chore: update api client job #54

Merged
merged 1 commit into from
Jun 10, 2021
Merged

chore: update api client job #54

merged 1 commit into from
Jun 10, 2021

Conversation

wtrocki
Copy link
Collaborator

@wtrocki wtrocki commented Jun 10, 2021

Add more info to the PR that will contain instructions how to make SDK released for everyone.
As we see there is quite set of manual steps right now but this can be automated further later on.

@@ -17,8 +17,6 @@ jobs:
run: sudo apt-get install jq
- name: Fetch OpenAPI doc
run: ./scripts/fetch_api.sh ${{ github.event.client_payload.download_url }}
- name: Generate SDKs
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Generation on the PR makes no sense for js-sdk as we do not have testing and validation done yet.
We have examples that can are used for testing (typescript compilation) but they have just some limited API.
Created issue: #55

Choose a reason for hiding this comment

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

Could we have it like this:

  1. Jobs creates PR adding the new OAS
  2. Perform manual changes if needed and merge
  3. On merge to main - kick off the generation job and create another PR

Copy link
Collaborator Author

@wtrocki wtrocki Jun 10, 2021

Choose a reason for hiding this comment

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

Thinking how this will work
Do you have nice way wow we could differentiate any merge to main from PR by bot PR and normal PR?

Choose a reason for hiding this comment

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

If the author is app-services-ci ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Or we can have single job that checks if PR has label and if label is applied then generation happens.
This can be replicated across different SDKs :)

Sounds amazing as it resolves couple problems:

  • you can review openapi changes
  • you can edit it if needed
  • you can generate all things the right time
  • No need to have any local development if builds are passing and examples work

Choose a reason for hiding this comment

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

Who applies the label?

Copy link
Collaborator Author

@wtrocki wtrocki Jun 10, 2021

Choose a reason for hiding this comment

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

Label: bot:generate
Developer applies label if he wish to add changes to PR
Job can start that check if label exist and generate all APIs

@wtrocki
Copy link
Collaborator Author

wtrocki commented Jun 10, 2021

Need to test if that log description will be created

@wtrocki wtrocki merged commit 0ec1ad9 into main Jun 10, 2021
@wtrocki wtrocki deleted the api-client branch June 10, 2021 12:07
@wtrocki
Copy link
Collaborator Author

wtrocki commented Jun 10, 2021

I have idea - we can simply keep patches to API files and add them automatically and then regenerate. That will reduce number of steps. We can try this once #53 is done

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.

2 participants