-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'stable' into release-1.0.9-beta
- Loading branch information
Showing
11 changed files
with
143 additions
and
17 deletions.
There are no files selected for viewing
This file contains 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 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,71 @@ | ||
--- | ||
# yamllint disable rule:truthy rule:line-length | ||
name: Handle Submodule Trigger | ||
|
||
on: | ||
repository_dispatch: | ||
types: | ||
- trigger-submodule-update | ||
|
||
jobs: | ||
update-dependencies: | ||
strategy: | ||
matrix: | ||
branch-name: | ||
- stable | ||
- develop | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: "${{ matrix.branch-name }}" | ||
submodules: recursive | ||
|
||
- name: Set branch name | ||
id: set-branch-name | ||
run: | | ||
SUBMODULE_PATH="python_sdk" | ||
SDK_VERSION="${{ github.event.client_payload.version }}" | ||
BRANCH_NAME="${{ matrix.branch-name}}-${SUBMODULE_PATH}-${SDK_VERSION}" | ||
echo "SUBMODULE_PATH=$SUBMODULE_PATH" >> $GITHUB_ENV | ||
echo "SDK_VERSION=$SDK_VERSION" >> $GITHUB_ENV | ||
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV | ||
- name: Use the version from the client payload to update the submodule | ||
run: | | ||
echo "Updating submodule to version: ${{ env.SDK_VERSION }}" | ||
echo "Branch name: ${{ env.BRANCH_NAME }}" | ||
# Navigate to the submodule and update it to the specified version | ||
cd ${{ env.SUBMODULE_PATH }} | ||
git fetch --tags | ||
git checkout ${{ env.SDK_VERSION }} | ||
cd - | ||
- name: Prepare the branch for the update | ||
id: prepare-branch | ||
run: | | ||
echo "Checking if branch ${{ env.BRANCH_NAME }} exists..." | ||
BRANCH_EXISTS=$(git ls-remote --heads origin ${{ env.BRANCH_NAME }} | wc -l) | ||
echo "BRANCH_EXISTS=$BRANCH_EXISTS" >> $GITHUB_ENV | ||
- name: Commit and push changes with github-actions-x/commit | ||
uses: github-actions-x/[email protected] | ||
with: | ||
github-token: ${{ secrets.GH_UPDATE_PACKAGE_OTTO }} | ||
push-branch: ${{ env.BRANCH_NAME }} | ||
commit-message: "chore: update submodule ${{ env.SUBMODULE_PATH }} to version ${{ env.SDK_VERSION }}" | ||
files: ${{ env.SUBMODULE_PATH }}/ | ||
name: opsmill-bot | ||
email: [email protected] | ||
rebase: ${{ env.BRANCH_EXISTS == 1 }} | ||
|
||
- name: Create a pull request | ||
run: | | ||
echo ${{ secrets.GH_UPDATE_PACKAGE_OTTO }} | gh auth login --with-token | ||
gh pr create \ | ||
--title "Update ${{ env.SUBMODULE_PATH }} to version ${{ env.SDK_VERSION }} against ${{ matrix.branch-name}}" \ | ||
--body "This PR updates the submodule ${{ env.SUBMODULE_PATH }} to version ${{ env.SDK_VERSION }}." \ | ||
--base ${{ matrix.branch-name}} \ | ||
--head ${{ env.BRANCH_NAME }} |
This file contains 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,44 @@ | ||
--- | ||
# yamllint disable rule:truthy rule:line-length | ||
name: Trigger Submodule update | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
runs-on: | ||
description: "The OS to run the job on" | ||
required: false | ||
default: "ubuntu-22.04" | ||
type: string | ||
version: | ||
type: string | ||
required: false | ||
description: The string to extract semver from. | ||
default: '' | ||
workflow_call: | ||
inputs: | ||
runs-on: | ||
description: "The OS to run the job on" | ||
required: false | ||
default: "ubuntu-22.04" | ||
type: string | ||
version: | ||
type: string | ||
required: false | ||
description: The string to extract semver from. | ||
default: '' | ||
|
||
jobs: | ||
trigger-submodule: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Trigger submodule update | ||
run: | | ||
curl -X POST \ | ||
-H 'Authorization: token ${{ secrets.GH_UPDATE_PACKAGE_OTTO }}' \ | ||
-H 'Accept: application/vnd.github.v3+json' \ | ||
'https://api.github.com/repos/${{ secrets.INFRAHUB_ENTERPRISE_REPOSITORY }}/dispatches' \ | ||
-d '{"event_type":"trigger-submodule-update","client_payload":{"version":"${{ inputs.version }}"}}' |
This file contains 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 |
---|---|---|
|
@@ -116,6 +116,8 @@ validator | |
upsert | ||
Upserting | ||
upserting | ||
uuid | ||
UUID | ||
validators | ||
Version Control | ||
Vitest | ||
|
This file contains 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 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 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 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 @@ | ||
Use the branch uuid instead of the internal database id to track the hash of the schema in the cache |
This file contains 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 @@ | ||
Store CoreProfile in database to ensure consistent initial schema hash. Prior to this the schema was reported as being out of sync when starting the application for the first time. This error wouldn't have hade any impact but was confusing. The workaround would be to load a schema or restart the application at least once after first time initialization. |
This file contains 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 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