-
Notifications
You must be signed in to change notification settings - Fork 17
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
feat(script): convert matrix scripts #318
Conversation
✅ Deploy Preview for api-clients-automation ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
✗ The generated branch has been deleted.If the PR has been merged, you can check the generated code on the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice refacto, much cleaner and easier to read !
if: ${{ inputs.job == 'cts' || inputs.job == 'codegen' }} | ||
uses: actions/cache@v2 | ||
with: | ||
path: clients/algoliasearch-client-java-2 | ||
key: | | ||
${{ env.CACHE_VERSION }}-${{ | ||
hashFiles( | ||
'clients/algoliasearch-client-java-2/**', | ||
'clients/algoliasearch-client-java-2/search/**', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should also include generators
and scripts
, but maybe we need a better system, you can see the dependencies here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we will need to at least re-arrange our folder structure for the CTS and Scripts in order to be able to scope those more easily, I'll put the cache to the scripts
folder for now but this should be in a generation/build related folder
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is node_modules
in scripts, mostly because of different versions in our package.json. I'll fix it in an other PR and add back the keys 😓
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, but changes to package version should also invalidate the cache
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for all the changes :)
🧭 What and Why
🎟 JIRA Ticket: https://algolia.atlassian.net/browse/APIC-402
Changes included:
Follow up of #170
In #313, we can see that the generated code for the PHP client is only cached for the search client, while every clients have changed.
This is due overlapping path and hash which requires more informations at the matrix level. As iterating on bash scripts is pretty hard, this PR converts our matrix generation scripts to TypeScript, and also should solve the path issue for PHP. (should because I'm not sure if the
path
is well scoped)🧪 Test