-
Notifications
You must be signed in to change notification settings - Fork 3.6k
feat(proposal draft, submodule): manage repositories as submodules instead of vcstool. #6611
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
Draft
paulsohn
wants to merge
14
commits into
autowarefoundation:main
Choose a base branch
from
paulsohn:submodule-mgmt
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
faf0967
experimental submodule layout
paulsohn ae4948e
add extra-packages
paulsohn 3e30feb
update github actions, scripts and readmes (with few exceptions: sear…
paulsohn 0e2802b
add examples for webauto-ci
paulsohn 35ff8bc
Merge remote-tracking branch 'origin/main' into submodule-mgmt
paulsohn ca40127
remove repos (again)
paulsohn e06c291
add pre-commit to ensure consistency between repos and submodules
paulsohn d6c93b4
add nightly updating workflow
paulsohn 4d9bb4e
update repository status to latest main ( a0f6fa8c7ac391e6f185c6209c1…
paulsohn 69238cb
pre-commit
paulsohn 9c4df46
submodule initialization on pre-commit
paulsohn ca4755d
update pre-commit
paulsohn 38c0c76
update docker build
paulsohn b73c6db
stabilize branch field position and remove bevdet_vendor nightly
paulsohn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| # Update submodules to nightly. | ||
| # .repos sync is not handled here (maybe run pre-commit once?) | ||
| name: Update Nightly Submodules | ||
|
|
||
| on: | ||
| schedule: | ||
| - cron: 0 0 * * * # Every day at 00:00 UTC | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| update-nightly-submodules: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: write | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 1 | ||
|
|
||
| - name: Generate token | ||
| id: generate-token | ||
| uses: tibdex/github-app-token@v2 | ||
| with: | ||
| app_id: ${{ secrets.APP_ID }} | ||
| private_key: ${{ secrets.PRIVATE_KEY }} | ||
|
|
||
| - name: Set git config | ||
| uses: autowarefoundation/autoware-github-actions/set-git-config@v1 | ||
| with: | ||
| token: ${{ steps.generate-token.outputs.token }} | ||
|
|
||
| - name: Update nightly submodules | ||
| id: update-nightly-submodules | ||
| env: | ||
| MAIN_BRANCH_NAME: main | ||
| NIGHTLY_BRANCH_NAME: nightly | ||
| GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }} | ||
| run: | | ||
| git checkout "${MAIN_BRANCH_NAME}" | ||
| git checkout -B "${NIGHTLY_BRANCH_NAME}" | ||
|
|
||
| # Check if repository has submodules | ||
| if [ ! -f .gitmodules ]; then | ||
| echo "Error: The repository is not using git submodules" | ||
| exit 1 | ||
| fi | ||
|
|
||
| git submodule update --init --checkout | ||
| git submodule update --remote | ||
| git add . | ||
| git commit -m "chore: update nightly submodules from ${MAIN_BRANCH_NAME}" || echo "No submodule updates to commit" | ||
| git push origin "${NIGHTLY_BRANCH_NAME}" --force-with-lease | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
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.
Where is nightly?
git submodule update --remote src/xxxis equivalent to importingxxx-nightly.repos.In this proposal,
xxx-nightly.reposfiles are not materialized. Instead, one can alwaysgit submodule update --remote src/xxx(equivalent to importingxxx-nightly.repos)xxx.reposthere isxxx.reposin main plusxxx-nightly.repos.The
nightlybranch here must be branch-protected.We can further create a PR to 'stable-nightly' branch (branch name is just an example) and manually updated so that the 'stable-nightly' branch always passes build and necessary tests.