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

Build submodule package by branch #4121

Merged
merged 27 commits into from
Sep 10, 2023
Merged

Conversation

djabarovgeorge
Copy link
Contributor

What change does this PR introduce?

Why was this change needed?

Other information (Screenshots)

@github-actions github-actions bot added the CI/CD label Sep 7, 2023
@github-actions github-actions bot removed the CI/CD label Sep 7, 2023
@github-actions github-actions bot added the CI/CD label Sep 7, 2023
Comment on lines 251 to 254
name: Checkout main on all submodules
run: |
git submodule foreach git checkout main
git submodule foreach git pull origin main
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we create a dedicated action to checkout with the submodules for all the workflows? Or will just be needed for the E2E enterprise tests? I feel like we might need to check it out for all of them but might miss any nuance that is not needed all the time.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

for not i am only testing here, and yes we will need it in couple of places

@djabarovgeorge djabarovgeorge changed the title test: ref main Build submodule package by branch Sep 10, 2023
submodule_branch:
description: 'Submodule branch to checkout to'
required: false
default: 'main'
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 could not create submodule_branch as required because submodules is not required.
  • i added submodule_branch default as a guard but it should not be used IMO.

# checkout without submodules
- uses: actions/checkout@v3
if: steps.setup.outputs.has_token != 'true'
run: ${{ steps.setup.outputs.has_token == '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.

Not sure why we use has_token if we have here input.submodule

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 added it because it was missing, Does anyone know if there were any reason for it?

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 added it because it was missing, Does anyone know if there were any reason for it?

Copy link
Contributor

Choose a reason for hiding this comment

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

Not that i'm aware of

.github/workflows/dev-deploy-api.yml Outdated Show resolved Hide resolved
@@ -26,6 +26,7 @@ jobs:
with:
ee: ${{ contains (matrix.name,'ee') }}
submodules: ${{ contains (matrix.name,'ee') }}
submodule_branch: "next"
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we maybe use the current branch here in case we do a dev deploy from a branch in the future?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It makes sense here i will look into it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Now what i thought about it i am not sure, couple you provide a use case for such a case?

Copy link
Contributor

Choose a reason for hiding this comment

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

Not that i'm aware of

submodules: true
token: ${{ secrets.SUBMODULES_TOKEN }}
submodule_token: ${{ secrets.SUBMODULES_TOKEN }}
submodule_branch: "next"
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we try using the current branch here aswell?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For the test i am not sure, because the name should be the exact name as in the enterprise repo which could be hard to maintain, and in addition It will break in the following case, if we have one PR in main repo and multiply branches in the enterprise repo (due the possible complexity)

@djabarovgeorge djabarovgeorge merged commit 41622c6 into next Sep 10, 2023
17 checks passed
@djabarovgeorge djabarovgeorge deleted the test-ref-submodule-branch branch September 10, 2023 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants