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(ci): push changes to submodules #155

Merged
merged 8 commits into from
Feb 23, 2022
Merged

chore(ci): push changes to submodules #155

merged 8 commits into from
Feb 23, 2022

Conversation

eunjae-lee
Copy link
Contributor

🧭 What and Why

Changes included:

  • Push change to submodule (process-release.ts)

For now, we're using this dummy repository. Once confirmed working, there will be a separate PR to put things properly.

@eunjae-lee eunjae-lee changed the title Chore/submodules chore(ci): push changes to submodules Feb 22, 2022
@eunjae-lee eunjae-lee requested a review from shortcuts February 22, 2022 13:57
Copy link
Member

@shortcuts shortcuts left a comment

Choose a reason for hiding this comment

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

Don't we need to configure something on the .git side for the submodules? If so, could you add a doc?

Comment on lines +135 to +153
const clientPath = path.resolve(
ROOT_DIR,
'clients/dummy-algoliasearch-client-javascript'
);
const runInClient: Run = (command, options = {}) =>
runOriginal(command, {
cwd: clientPath,
...options,
});

runInClient(`git checkout next`);
run(
`cp -r clients/algoliasearch-client-javascript/ clients/dummy-algoliasearch-client-javascript`
);
runInClient(`git add .`);
execa.sync('git', ['commit', '-m', 'chore: release test'], {
cwd: clientPath,
});
runInClient(`git push origin next`);
Copy link
Member

Choose a reason for hiding this comment

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

As we have all the client infos of the openapitools.json file, I'd rather see values retrieved from here (either with new additionalProperties or paths etc.) so we keep the single source of truth and avoid having to add hardcoded values

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, it will change, but this is a hard-coded test for a temporary period, because I need something to be merged, in order to actually test it. And that's why I chose js client and using dummy repo as a submodule.

Copy link
Member

Choose a reason for hiding this comment

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

Ok make sense, an alternative could be to create a branch and update this part https://github.com/algolia/api-clients-automation/blob/main/.github/workflows/check.yml#L8

So you don't have to merge test things or main, and mostly you don't have to wait for reviews

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@shortcuts
Copy link
Member

shortcuts commented Feb 22, 2022

Cloud you grant access to the team to the dummy repo?

@eunjae-lee
Copy link
Contributor Author

Don't we need to configure something on the .git side for the submodules? If so, could you add a doc?

I ran git submodule add ... command locally, and I believe that's this addition in this commit:

image

@eunjae-lee
Copy link
Contributor Author

Cloud you grant access to the team to the dummy repo?

done!

@eunjae-lee eunjae-lee requested a review from shortcuts February 22, 2022 16:04
shortcuts
shortcuts previously approved these changes Feb 23, 2022
Copy link
Member

@shortcuts shortcuts left a comment

Choose a reason for hiding this comment

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

Nice :D

I think it make sense to consider this comment https://github.com/algolia/api-clients-automation/pull/155/files#r812670890 to make iteration on this release easier, but it's up to you!

@@ -17,6 +17,9 @@ jobs:
- uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: true
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I should've set this (ref: https://github.com/actions/checkout)

Copy link
Member

Choose a reason for hiding this comment

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

Oh nice

@@ -17,6 +17,9 @@ jobs:
- uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: true

- run: git checkout chore/release
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this will enable me to push test commits to this test branch and run the test without opening numerous PRs.

Copy link
Member

Choose a reason for hiding this comment

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

Good idea

@eunjae-lee eunjae-lee requested a review from shortcuts February 23, 2022 10:05
Copy link
Member

@shortcuts shortcuts left a comment

Choose a reason for hiding this comment

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

I think it's hard to determine if it will work, but it looks correct!

@eunjae-lee eunjae-lee merged commit fe77ee3 into main Feb 23, 2022
@eunjae-lee eunjae-lee deleted the chore/submodules branch February 23, 2022 13:51
@eunjae-lee
Copy link
Contributor Author

eunjae-lee commented Feb 23, 2022

Let's try out and see if it works! (I have no idea either lol)

shortcuts pushed a commit that referenced this pull request Apr 22, 2022
* chore: add dummy submodule

* chore(ci): push change to submodule

* chore: run release script on test branch
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