From 36520e240ab77f4ce97ce191534a92c32234a839 Mon Sep 17 00:00:00 2001 From: Alon Yeshurun <98805507+ayeshurun@users.noreply.github.com> Date: Wed, 17 Sep 2025 17:11:18 +0300 Subject: [PATCH 01/20] Change pull_request to pull_request_target --- .github/workflows/semantic-pull-request.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/semantic-pull-request.yml b/.github/workflows/semantic-pull-request.yml index 26b2dec0..7179ead3 100644 --- a/.github/workflows/semantic-pull-request.yml +++ b/.github/workflows/semantic-pull-request.yml @@ -3,7 +3,7 @@ name: 🔍 Semantic PR Validation on: - pull_request: + pull_request_target: branches: - main types: @@ -113,4 +113,4 @@ jobs: repo: context.repo.repo, name: 'invalid', }); - } \ No newline at end of file + } From 55020f077694e45ca67d9ff6a940c5e44d286173 Mon Sep 17 00:00:00 2001 From: Alon Yeshurun Date: Sun, 14 Dec 2025 14:12:48 +0000 Subject: [PATCH 02/20] Fix new functionality section in release notes --- docs/release-notes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/release-notes.md b/docs/release-notes.md index 852b6b7f..1d912e3d 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -10,7 +10,7 @@ hide: ### ✨ New Functionality -* Add support of mv, cp, export and import for SQLDatabase item type +* Add support of `mv`, `cp` and `import` commands for SQLDatabase item type * Add new 'job run-rm' command for remove a scheduled job * Enhance `set` command for items to support any settable property path within the item's definition and metadata structure * Add support in `ls` commmand using `-q` flag for filtering based on JMESPath expressions From beb01490bffaf32ff5321eb53f91264f535a3ea1 Mon Sep 17 00:00:00 2001 From: Alon Yeshurun Date: Sun, 14 Dec 2025 14:12:48 +0000 Subject: [PATCH 03/20] Fix new functionality section in release notes --- docs/release-notes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/release-notes.md b/docs/release-notes.md index 98a1aa04..479c7cb5 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -10,7 +10,7 @@ hide: ### ✨ New Functionality -* Add support of mv, cp, export and import for SQLDatabase item type +* Add support of `mv`, `cp` and `import` commands for SQLDatabase item type * Add new 'job run-rm' command for remove a scheduled job * Enhance `set` command for items to support any settable property path within the item's definition and metadata structure * Add support in `ls` commmand using `-q` flag for filtering based on JMESPath expressions From ca313c305ad010157171ee7bfd9af66dc9a5d957 Mon Sep 17 00:00:00 2001 From: Alon Yeshurun Date: Wed, 17 Dec 2025 13:43:53 +0000 Subject: [PATCH 04/20] Introduce release workflow --- .github/workflows/create-release.yml | 37 ++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/create-release.yml diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml new file mode 100644 index 00000000..819cd8cf --- /dev/null +++ b/.github/workflows/create-release.yml @@ -0,0 +1,37 @@ +name: 🚀 Create GitHub Release + +on: + workflow_dispatch: + inputs: + version: + description: 'The version to release (e.g., v1.2.0)' + required: true + +jobs: + create-release: + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up release variables + id: set_vars + run: | + VERSION="${{ github.event.inputs.version }}" + echo "tag_name=$VERSION" >> $GITHUB_OUTPUT + echo "changelog_file_path=.changes/${VERSION}.md" >> $GITHUB_OUTPUT + + - name: Validate release notes file + run: | + if [ ! -f "${{ steps.set_vars.outputs.changelog_file_path }}" ]; then + echo "Error: Release notes file not found at ${{ steps.set_vars.outputs.changelog_file_path }}" + exit 1 + fi + + - name: Create Release with GitHub CLI + run: | + gh release create ${{ steps.set_vars.outputs.tag_name }} \ + --title "${{ steps.set_vars.outputs.tag_name }}" \ + --notes-file "${{ steps.set_vars.outputs.changelog_file_path }}" \ No newline at end of file From 39f2d851274d5d302ba9caeaf0a3768a69e13c2c Mon Sep 17 00:00:00 2001 From: Alon Yeshurun <98805507+ayeshurun@users.noreply.github.com> Date: Wed, 17 Dec 2025 16:21:05 +0200 Subject: [PATCH 05/20] Add GH_TOKEN to create release step --- .github/workflows/create-release.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index 819cd8cf..e8dd7f15 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -31,7 +31,9 @@ jobs: fi - name: Create Release with GitHub CLI + env: + GH_TOKEN: ${{ github.token }} run: | gh release create ${{ steps.set_vars.outputs.tag_name }} \ --title "${{ steps.set_vars.outputs.tag_name }}" \ - --notes-file "${{ steps.set_vars.outputs.changelog_file_path }}" \ No newline at end of file + --notes-file "${{ steps.set_vars.outputs.changelog_file_path }}" From 5e3b68e2d33a6373f56631b15e6b17abc05e2b33 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 17 Dec 2025 14:29:08 +0000 Subject: [PATCH 06/20] Initial plan From 7c573b0285782f74cafea72d6db1d7b5c145c5b6 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 17 Dec 2025 14:33:51 +0000 Subject: [PATCH 07/20] Enhance create-release workflow with GITHUB_STEP_SUMMARY and optional commit SHA Co-authored-by: ayeshurun <98805507+ayeshurun@users.noreply.github.com> --- .github/workflows/create-release.yml | 124 ++++++++++++++++++++++++++- 1 file changed, 120 insertions(+), 4 deletions(-) diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index e8dd7f15..4494fd73 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -6,6 +6,10 @@ on: version: description: 'The version to release (e.g., v1.2.0)' required: true + commit_sha: + description: 'Optional: Commit SHA to create the tag on. If not provided, the tag will be created on the latest commit of the current branch (HEAD)' + required: false + default: '' jobs: create-release: @@ -15,25 +19,137 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v4 + with: + fetch-depth: 0 # Required to access full commit history for validation + + - name: Display workflow information + run: | + echo "# 🚀 Create Release Workflow" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + echo "## â„šī¸ Workflow Information" >> $GITHUB_STEP_SUMMARY + echo "- **Version:** ${{ github.event.inputs.version }}" >> $GITHUB_STEP_SUMMARY + if [ -n "${{ github.event.inputs.commit_sha }}" ]; then + echo "- **Target Commit:** \`${{ github.event.inputs.commit_sha }}\`" >> $GITHUB_STEP_SUMMARY + else + echo "- **Target Commit:** Latest commit on current branch (HEAD)" >> $GITHUB_STEP_SUMMARY + fi + echo "" >> $GITHUB_STEP_SUMMARY + + - name: Validate commit SHA (if provided) + if: ${{ github.event.inputs.commit_sha != '' }} + run: | + COMMIT_SHA="${{ github.event.inputs.commit_sha }}" + if ! git rev-parse --verify "$COMMIT_SHA^{commit}" >/dev/null 2>&1; then + echo "## ❌ Error: Invalid Commit SHA" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + echo "The provided commit SHA \`$COMMIT_SHA\` is not valid or does not exist in this repository." >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + echo "### 📝 Troubleshooting" >> $GITHUB_STEP_SUMMARY + echo "- Verify the commit SHA exists in the repository" >> $GITHUB_STEP_SUMMARY + echo "- Ensure you are using the full commit SHA (or at least 7 characters)" >> $GITHUB_STEP_SUMMARY + echo "- Check that the commit is in the current branch history" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + echo "Error: Invalid commit SHA: $COMMIT_SHA" + exit 1 + fi + echo "✅ Commit SHA validated successfully: $COMMIT_SHA" - name: Set up release variables id: set_vars run: | VERSION="${{ github.event.inputs.version }}" + COMMIT_SHA="${{ github.event.inputs.commit_sha }}" + + # Use provided commit SHA or default to HEAD + if [ -n "$COMMIT_SHA" ]; then + TARGET_COMMIT="$COMMIT_SHA" + else + TARGET_COMMIT="HEAD" + fi + echo "tag_name=$VERSION" >> $GITHUB_OUTPUT echo "changelog_file_path=.changes/${VERSION}.md" >> $GITHUB_OUTPUT + echo "target_commit=$TARGET_COMMIT" >> $GITHUB_OUTPUT + + # Get the actual commit SHA for display + ACTUAL_SHA=$(git rev-parse "$TARGET_COMMIT") + echo "actual_sha=$ACTUAL_SHA" >> $GITHUB_OUTPUT + + echo "✅ Release variables set:" + echo " - Tag name: $VERSION" + echo " - Target commit: $ACTUAL_SHA" + echo " - Changelog file: .changes/${VERSION}.md" - name: Validate release notes file run: | - if [ ! -f "${{ steps.set_vars.outputs.changelog_file_path }}" ]; then - echo "Error: Release notes file not found at ${{ steps.set_vars.outputs.changelog_file_path }}" + CHANGELOG_FILE="${{ steps.set_vars.outputs.changelog_file_path }}" + if [ ! -f "$CHANGELOG_FILE" ]; then + echo "## ❌ Error: Release Notes File Not Found" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + echo "The release notes file was not found at the expected location:" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + echo "\`\`\`" >> $GITHUB_STEP_SUMMARY + echo "$CHANGELOG_FILE" >> $GITHUB_STEP_SUMMARY + echo "\`\`\`" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + echo "### 📝 What to do:" >> $GITHUB_STEP_SUMMARY + echo "1. Ensure you have created the changelog file for version \`${{ steps.set_vars.outputs.tag_name }}\`" >> $GITHUB_STEP_SUMMARY + echo "2. The file should be located at: \`.changes/${{ steps.set_vars.outputs.tag_name }}.md\`" >> $GITHUB_STEP_SUMMARY + echo "3. You can use \`changie batch \` to generate the changelog file" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + echo "### 📂 Available changelog files:" >> $GITHUB_STEP_SUMMARY + echo "\`\`\`" >> $GITHUB_STEP_SUMMARY + ls -1 .changes/*.md 2>/dev/null || echo "No changelog files found" >> $GITHUB_STEP_SUMMARY + echo "\`\`\`" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + echo "Error: Release notes file not found at $CHANGELOG_FILE" exit 1 fi + echo "✅ Release notes file found at: $CHANGELOG_FILE" - name: Create Release with GitHub CLI env: GH_TOKEN: ${{ github.token }} run: | - gh release create ${{ steps.set_vars.outputs.tag_name }} \ + echo "## đŸ—ī¸ Creating Release" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + echo "Creating release with the following details:" >> $GITHUB_STEP_SUMMARY + echo "- **Tag:** \`${{ steps.set_vars.outputs.tag_name }}\`" >> $GITHUB_STEP_SUMMARY + echo "- **Target Commit:** \`${{ steps.set_vars.outputs.actual_sha }}\`" >> $GITHUB_STEP_SUMMARY + echo "- **Notes File:** \`${{ steps.set_vars.outputs.changelog_file_path }}\`" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + + # Create the release with the target commit + if gh release create ${{ steps.set_vars.outputs.tag_name }} \ --title "${{ steps.set_vars.outputs.tag_name }}" \ - --notes-file "${{ steps.set_vars.outputs.changelog_file_path }}" + --notes-file "${{ steps.set_vars.outputs.changelog_file_path }}" \ + --target "${{ steps.set_vars.outputs.target_commit }}"; then + + echo "## ✅ Release Created Successfully!" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + echo "🎉 **Release \`${{ steps.set_vars.outputs.tag_name }}\` has been created!**" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + echo "### 📋 Release Details:" >> $GITHUB_STEP_SUMMARY + echo "- **Tag:** \`${{ steps.set_vars.outputs.tag_name }}\`" >> $GITHUB_STEP_SUMMARY + echo "- **Commit:** \`${{ steps.set_vars.outputs.actual_sha }}\`" >> $GITHUB_STEP_SUMMARY + echo "- **Release URL:** [View Release](https://github.com/${{ github.repository }}/releases/tag/${{ steps.set_vars.outputs.tag_name }})" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + else + echo "## ❌ Error: Failed to Create Release" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + echo "The GitHub CLI failed to create the release. This could be due to:" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + echo "### 🔍 Common Issues:" >> $GITHUB_STEP_SUMMARY + echo "- A release with tag \`${{ steps.set_vars.outputs.tag_name }}\` already exists" >> $GITHUB_STEP_SUMMARY + echo "- Insufficient permissions to create releases" >> $GITHUB_STEP_SUMMARY + echo "- Network connectivity issues" >> $GITHUB_STEP_SUMMARY + echo "- Invalid release notes format" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + echo "### 📝 Next Steps:" >> $GITHUB_STEP_SUMMARY + echo "1. Check if the tag already exists: \`git tag -l '${{ steps.set_vars.outputs.tag_name }}'\`" >> $GITHUB_STEP_SUMMARY + echo "2. Verify you have the necessary permissions to create releases" >> $GITHUB_STEP_SUMMARY + echo "3. Review the workflow run logs for detailed error messages" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + echo "Error: Failed to create release" + exit 1 + fi From f9a4bb2a434fc2f23857477b38cb7d7be416c674 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 18 Dec 2025 08:31:07 +0000 Subject: [PATCH 08/20] Refactor GITHUB_STEP_SUMMARY messages to use heredoc syntax Co-authored-by: ayeshurun <98805507+ayeshurun@users.noreply.github.com> --- .github/workflows/create-release.yml | 144 +++++++++++++++------------ 1 file changed, 79 insertions(+), 65 deletions(-) diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index 4494fd73..fbaa15b3 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -24,31 +24,37 @@ jobs: - name: Display workflow information run: | - echo "# 🚀 Create Release Workflow" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "## â„šī¸ Workflow Information" >> $GITHUB_STEP_SUMMARY - echo "- **Version:** ${{ github.event.inputs.version }}" >> $GITHUB_STEP_SUMMARY if [ -n "${{ github.event.inputs.commit_sha }}" ]; then - echo "- **Target Commit:** \`${{ github.event.inputs.commit_sha }}\`" >> $GITHUB_STEP_SUMMARY + TARGET_INFO="- **Target Commit:** \`${{ github.event.inputs.commit_sha }}\`" else - echo "- **Target Commit:** Latest commit on current branch (HEAD)" >> $GITHUB_STEP_SUMMARY + TARGET_INFO="- **Target Commit:** Latest commit on current branch (HEAD)" fi - echo "" >> $GITHUB_STEP_SUMMARY + + cat >> $GITHUB_STEP_SUMMARY << EOF + # 🚀 Create Release Workflow + + ## â„šī¸ Workflow Information + - **Version:** ${{ github.event.inputs.version }} + $TARGET_INFO + + EOF - name: Validate commit SHA (if provided) if: ${{ github.event.inputs.commit_sha != '' }} run: | COMMIT_SHA="${{ github.event.inputs.commit_sha }}" if ! git rev-parse --verify "$COMMIT_SHA^{commit}" >/dev/null 2>&1; then - echo "## ❌ Error: Invalid Commit SHA" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "The provided commit SHA \`$COMMIT_SHA\` is not valid or does not exist in this repository." >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "### 📝 Troubleshooting" >> $GITHUB_STEP_SUMMARY - echo "- Verify the commit SHA exists in the repository" >> $GITHUB_STEP_SUMMARY - echo "- Ensure you are using the full commit SHA (or at least 7 characters)" >> $GITHUB_STEP_SUMMARY - echo "- Check that the commit is in the current branch history" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY + cat >> $GITHUB_STEP_SUMMARY << EOF + ## ❌ Error: Invalid Commit SHA + + The provided commit SHA \`$COMMIT_SHA\` is not valid or does not exist in this repository. + + ### 📝 Troubleshooting + - Verify the commit SHA exists in the repository + - Ensure you are using the full commit SHA (or at least 7 characters) + - Check that the commit is in the current branch history + + EOF echo "Error: Invalid commit SHA: $COMMIT_SHA" exit 1 fi @@ -84,24 +90,26 @@ jobs: run: | CHANGELOG_FILE="${{ steps.set_vars.outputs.changelog_file_path }}" if [ ! -f "$CHANGELOG_FILE" ]; then - echo "## ❌ Error: Release Notes File Not Found" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "The release notes file was not found at the expected location:" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "\`\`\`" >> $GITHUB_STEP_SUMMARY - echo "$CHANGELOG_FILE" >> $GITHUB_STEP_SUMMARY - echo "\`\`\`" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "### 📝 What to do:" >> $GITHUB_STEP_SUMMARY - echo "1. Ensure you have created the changelog file for version \`${{ steps.set_vars.outputs.tag_name }}\`" >> $GITHUB_STEP_SUMMARY - echo "2. The file should be located at: \`.changes/${{ steps.set_vars.outputs.tag_name }}.md\`" >> $GITHUB_STEP_SUMMARY - echo "3. You can use \`changie batch \` to generate the changelog file" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "### 📂 Available changelog files:" >> $GITHUB_STEP_SUMMARY - echo "\`\`\`" >> $GITHUB_STEP_SUMMARY - ls -1 .changes/*.md 2>/dev/null || echo "No changelog files found" >> $GITHUB_STEP_SUMMARY - echo "\`\`\`" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY + cat >> $GITHUB_STEP_SUMMARY << EOF + ## ❌ Error: Release Notes File Not Found + + The release notes file was not found at the expected location: + + \`\`\` + $CHANGELOG_FILE + \`\`\` + + ### 📝 What to do: + 1. Ensure you have created the changelog file for version \`${{ steps.set_vars.outputs.tag_name }}\` + 2. The file should be located at: \`.changes/${{ steps.set_vars.outputs.tag_name }}.md\` + 3. You can use \`changie batch \` to generate the changelog file + + ### 📂 Available changelog files: + \`\`\` + $(ls -1 .changes/*.md 2>/dev/null || echo "No changelog files found") + \`\`\` + + EOF echo "Error: Release notes file not found at $CHANGELOG_FILE" exit 1 fi @@ -111,13 +119,15 @@ jobs: env: GH_TOKEN: ${{ github.token }} run: | - echo "## đŸ—ī¸ Creating Release" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "Creating release with the following details:" >> $GITHUB_STEP_SUMMARY - echo "- **Tag:** \`${{ steps.set_vars.outputs.tag_name }}\`" >> $GITHUB_STEP_SUMMARY - echo "- **Target Commit:** \`${{ steps.set_vars.outputs.actual_sha }}\`" >> $GITHUB_STEP_SUMMARY - echo "- **Notes File:** \`${{ steps.set_vars.outputs.changelog_file_path }}\`" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY + cat >> $GITHUB_STEP_SUMMARY << EOF + ## đŸ—ī¸ Creating Release + + Creating release with the following details: + - **Tag:** \`${{ steps.set_vars.outputs.tag_name }}\` + - **Target Commit:** \`${{ steps.set_vars.outputs.actual_sha }}\` + - **Notes File:** \`${{ steps.set_vars.outputs.changelog_file_path }}\` + + EOF # Create the release with the target commit if gh release create ${{ steps.set_vars.outputs.tag_name }} \ @@ -125,31 +135,35 @@ jobs: --notes-file "${{ steps.set_vars.outputs.changelog_file_path }}" \ --target "${{ steps.set_vars.outputs.target_commit }}"; then - echo "## ✅ Release Created Successfully!" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "🎉 **Release \`${{ steps.set_vars.outputs.tag_name }}\` has been created!**" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "### 📋 Release Details:" >> $GITHUB_STEP_SUMMARY - echo "- **Tag:** \`${{ steps.set_vars.outputs.tag_name }}\`" >> $GITHUB_STEP_SUMMARY - echo "- **Commit:** \`${{ steps.set_vars.outputs.actual_sha }}\`" >> $GITHUB_STEP_SUMMARY - echo "- **Release URL:** [View Release](https://github.com/${{ github.repository }}/releases/tag/${{ steps.set_vars.outputs.tag_name }})" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY + cat >> $GITHUB_STEP_SUMMARY << EOF + ## ✅ Release Created Successfully! + + 🎉 **Release \`${{ steps.set_vars.outputs.tag_name }}\` has been created!** + + ### 📋 Release Details: + - **Tag:** \`${{ steps.set_vars.outputs.tag_name }}\` + - **Commit:** \`${{ steps.set_vars.outputs.actual_sha }}\` + - **Release URL:** [View Release](https://github.com/${{ github.repository }}/releases/tag/${{ steps.set_vars.outputs.tag_name }}) + + EOF else - echo "## ❌ Error: Failed to Create Release" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "The GitHub CLI failed to create the release. This could be due to:" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "### 🔍 Common Issues:" >> $GITHUB_STEP_SUMMARY - echo "- A release with tag \`${{ steps.set_vars.outputs.tag_name }}\` already exists" >> $GITHUB_STEP_SUMMARY - echo "- Insufficient permissions to create releases" >> $GITHUB_STEP_SUMMARY - echo "- Network connectivity issues" >> $GITHUB_STEP_SUMMARY - echo "- Invalid release notes format" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "### 📝 Next Steps:" >> $GITHUB_STEP_SUMMARY - echo "1. Check if the tag already exists: \`git tag -l '${{ steps.set_vars.outputs.tag_name }}'\`" >> $GITHUB_STEP_SUMMARY - echo "2. Verify you have the necessary permissions to create releases" >> $GITHUB_STEP_SUMMARY - echo "3. Review the workflow run logs for detailed error messages" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY + cat >> $GITHUB_STEP_SUMMARY << EOF + ## ❌ Error: Failed to Create Release + + The GitHub CLI failed to create the release. This could be due to: + + ### 🔍 Common Issues: + - A release with tag \`${{ steps.set_vars.outputs.tag_name }}\` already exists + - Insufficient permissions to create releases + - Network connectivity issues + - Invalid release notes format + + ### 📝 Next Steps: + 1. Check if the tag already exists: \`git tag -l '${{ steps.set_vars.outputs.tag_name }}'\` + 2. Verify you have the necessary permissions to create releases + 3. Review the workflow run logs for detailed error messages + + EOF echo "Error: Failed to create release" exit 1 fi From 641c4e768f65e6e348b1897e352bd4f0cbc39bae Mon Sep 17 00:00:00 2001 From: Alon Yeshurun <98805507+ayeshurun@users.noreply.github.com> Date: Mon, 22 Dec 2025 12:48:32 +0200 Subject: [PATCH 09/20] Update release notes for v1.3.1 --- docs/release-notes.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/release-notes.md b/docs/release-notes.md index 479c7cb5..dc41a2b2 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -10,7 +10,7 @@ hide: ### ✨ New Functionality -* Add support of `mv`, `cp` and `import` commands for SQLDatabase item type +* Add support of mv, cp, export and import for SQLDatabase item type * Add new 'job run-rm' command for remove a scheduled job * Enhance `set` command for items to support any settable property path within the item's definition and metadata structure * Add support in `ls` commmand using `-q` flag for filtering based on JMESPath expressions @@ -165,4 +165,4 @@ hide: * Initial public release * Released to PyPI -* Onboarded to GitHub Pages \ No newline at end of file +* Onboarded to GitHub Pages From 516dbb8cb5dcbbcb1f76372ec9f1236498a10fcf Mon Sep 17 00:00:00 2001 From: Alon Yeshurun Date: Sun, 14 Dec 2025 14:12:48 +0000 Subject: [PATCH 10/20] Fix new functionality section in release notes --- docs/release-notes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/release-notes.md b/docs/release-notes.md index dc41a2b2..056089bc 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -10,7 +10,7 @@ hide: ### ✨ New Functionality -* Add support of mv, cp, export and import for SQLDatabase item type +* Add support of `mv`, `cp` and `import` commands for SQLDatabase item type * Add new 'job run-rm' command for remove a scheduled job * Enhance `set` command for items to support any settable property path within the item's definition and metadata structure * Add support in `ls` commmand using `-q` flag for filtering based on JMESPath expressions From 484993f8291512a108bed94c975fc2bab2647399 Mon Sep 17 00:00:00 2001 From: Alon Yeshurun Date: Wed, 17 Dec 2025 13:43:53 +0000 Subject: [PATCH 11/20] Introduce release workflow --- .github/workflows/create-release.yml | 140 +-------------------------- 1 file changed, 4 insertions(+), 136 deletions(-) diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index fbaa15b3..819cd8cf 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -6,10 +6,6 @@ on: version: description: 'The version to release (e.g., v1.2.0)' required: true - commit_sha: - description: 'Optional: Commit SHA to create the tag on. If not provided, the tag will be created on the latest commit of the current branch (HEAD)' - required: false - default: '' jobs: create-release: @@ -19,151 +15,23 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v4 - with: - fetch-depth: 0 # Required to access full commit history for validation - - - name: Display workflow information - run: | - if [ -n "${{ github.event.inputs.commit_sha }}" ]; then - TARGET_INFO="- **Target Commit:** \`${{ github.event.inputs.commit_sha }}\`" - else - TARGET_INFO="- **Target Commit:** Latest commit on current branch (HEAD)" - fi - - cat >> $GITHUB_STEP_SUMMARY << EOF - # 🚀 Create Release Workflow - - ## â„šī¸ Workflow Information - - **Version:** ${{ github.event.inputs.version }} - $TARGET_INFO - - EOF - - - name: Validate commit SHA (if provided) - if: ${{ github.event.inputs.commit_sha != '' }} - run: | - COMMIT_SHA="${{ github.event.inputs.commit_sha }}" - if ! git rev-parse --verify "$COMMIT_SHA^{commit}" >/dev/null 2>&1; then - cat >> $GITHUB_STEP_SUMMARY << EOF - ## ❌ Error: Invalid Commit SHA - - The provided commit SHA \`$COMMIT_SHA\` is not valid or does not exist in this repository. - - ### 📝 Troubleshooting - - Verify the commit SHA exists in the repository - - Ensure you are using the full commit SHA (or at least 7 characters) - - Check that the commit is in the current branch history - - EOF - echo "Error: Invalid commit SHA: $COMMIT_SHA" - exit 1 - fi - echo "✅ Commit SHA validated successfully: $COMMIT_SHA" - name: Set up release variables id: set_vars run: | VERSION="${{ github.event.inputs.version }}" - COMMIT_SHA="${{ github.event.inputs.commit_sha }}" - - # Use provided commit SHA or default to HEAD - if [ -n "$COMMIT_SHA" ]; then - TARGET_COMMIT="$COMMIT_SHA" - else - TARGET_COMMIT="HEAD" - fi - echo "tag_name=$VERSION" >> $GITHUB_OUTPUT echo "changelog_file_path=.changes/${VERSION}.md" >> $GITHUB_OUTPUT - echo "target_commit=$TARGET_COMMIT" >> $GITHUB_OUTPUT - - # Get the actual commit SHA for display - ACTUAL_SHA=$(git rev-parse "$TARGET_COMMIT") - echo "actual_sha=$ACTUAL_SHA" >> $GITHUB_OUTPUT - - echo "✅ Release variables set:" - echo " - Tag name: $VERSION" - echo " - Target commit: $ACTUAL_SHA" - echo " - Changelog file: .changes/${VERSION}.md" - name: Validate release notes file run: | - CHANGELOG_FILE="${{ steps.set_vars.outputs.changelog_file_path }}" - if [ ! -f "$CHANGELOG_FILE" ]; then - cat >> $GITHUB_STEP_SUMMARY << EOF - ## ❌ Error: Release Notes File Not Found - - The release notes file was not found at the expected location: - - \`\`\` - $CHANGELOG_FILE - \`\`\` - - ### 📝 What to do: - 1. Ensure you have created the changelog file for version \`${{ steps.set_vars.outputs.tag_name }}\` - 2. The file should be located at: \`.changes/${{ steps.set_vars.outputs.tag_name }}.md\` - 3. You can use \`changie batch \` to generate the changelog file - - ### 📂 Available changelog files: - \`\`\` - $(ls -1 .changes/*.md 2>/dev/null || echo "No changelog files found") - \`\`\` - - EOF - echo "Error: Release notes file not found at $CHANGELOG_FILE" + if [ ! -f "${{ steps.set_vars.outputs.changelog_file_path }}" ]; then + echo "Error: Release notes file not found at ${{ steps.set_vars.outputs.changelog_file_path }}" exit 1 fi - echo "✅ Release notes file found at: $CHANGELOG_FILE" - name: Create Release with GitHub CLI - env: - GH_TOKEN: ${{ github.token }} run: | - cat >> $GITHUB_STEP_SUMMARY << EOF - ## đŸ—ī¸ Creating Release - - Creating release with the following details: - - **Tag:** \`${{ steps.set_vars.outputs.tag_name }}\` - - **Target Commit:** \`${{ steps.set_vars.outputs.actual_sha }}\` - - **Notes File:** \`${{ steps.set_vars.outputs.changelog_file_path }}\` - - EOF - - # Create the release with the target commit - if gh release create ${{ steps.set_vars.outputs.tag_name }} \ + gh release create ${{ steps.set_vars.outputs.tag_name }} \ --title "${{ steps.set_vars.outputs.tag_name }}" \ - --notes-file "${{ steps.set_vars.outputs.changelog_file_path }}" \ - --target "${{ steps.set_vars.outputs.target_commit }}"; then - - cat >> $GITHUB_STEP_SUMMARY << EOF - ## ✅ Release Created Successfully! - - 🎉 **Release \`${{ steps.set_vars.outputs.tag_name }}\` has been created!** - - ### 📋 Release Details: - - **Tag:** \`${{ steps.set_vars.outputs.tag_name }}\` - - **Commit:** \`${{ steps.set_vars.outputs.actual_sha }}\` - - **Release URL:** [View Release](https://github.com/${{ github.repository }}/releases/tag/${{ steps.set_vars.outputs.tag_name }}) - - EOF - else - cat >> $GITHUB_STEP_SUMMARY << EOF - ## ❌ Error: Failed to Create Release - - The GitHub CLI failed to create the release. This could be due to: - - ### 🔍 Common Issues: - - A release with tag \`${{ steps.set_vars.outputs.tag_name }}\` already exists - - Insufficient permissions to create releases - - Network connectivity issues - - Invalid release notes format - - ### 📝 Next Steps: - 1. Check if the tag already exists: \`git tag -l '${{ steps.set_vars.outputs.tag_name }}'\` - 2. Verify you have the necessary permissions to create releases - 3. Review the workflow run logs for detailed error messages - - EOF - echo "Error: Failed to create release" - exit 1 - fi + --notes-file "${{ steps.set_vars.outputs.changelog_file_path }}" \ No newline at end of file From 3a42a5cc88c1846bc164ea73a3e43a2a7549f4f1 Mon Sep 17 00:00:00 2001 From: Alon Yeshurun <98805507+ayeshurun@users.noreply.github.com> Date: Wed, 17 Dec 2025 16:21:05 +0200 Subject: [PATCH 12/20] Add GH_TOKEN to create release step --- .github/workflows/create-release.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index 819cd8cf..e8dd7f15 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -31,7 +31,9 @@ jobs: fi - name: Create Release with GitHub CLI + env: + GH_TOKEN: ${{ github.token }} run: | gh release create ${{ steps.set_vars.outputs.tag_name }} \ --title "${{ steps.set_vars.outputs.tag_name }}" \ - --notes-file "${{ steps.set_vars.outputs.changelog_file_path }}" \ No newline at end of file + --notes-file "${{ steps.set_vars.outputs.changelog_file_path }}" From 0755733cee4f5bf85a6ef9533c5e44caaeb49a0e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 17 Dec 2025 14:29:08 +0000 Subject: [PATCH 13/20] Initial plan From 5917da7c91f018d0fedbacfe5d889e8651318d53 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 17 Dec 2025 14:33:51 +0000 Subject: [PATCH 14/20] Enhance create-release workflow with GITHUB_STEP_SUMMARY and optional commit SHA Co-authored-by: ayeshurun <98805507+ayeshurun@users.noreply.github.com> --- .github/workflows/create-release.yml | 124 ++++++++++++++++++++++++++- 1 file changed, 120 insertions(+), 4 deletions(-) diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index e8dd7f15..4494fd73 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -6,6 +6,10 @@ on: version: description: 'The version to release (e.g., v1.2.0)' required: true + commit_sha: + description: 'Optional: Commit SHA to create the tag on. If not provided, the tag will be created on the latest commit of the current branch (HEAD)' + required: false + default: '' jobs: create-release: @@ -15,25 +19,137 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v4 + with: + fetch-depth: 0 # Required to access full commit history for validation + + - name: Display workflow information + run: | + echo "# 🚀 Create Release Workflow" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + echo "## â„šī¸ Workflow Information" >> $GITHUB_STEP_SUMMARY + echo "- **Version:** ${{ github.event.inputs.version }}" >> $GITHUB_STEP_SUMMARY + if [ -n "${{ github.event.inputs.commit_sha }}" ]; then + echo "- **Target Commit:** \`${{ github.event.inputs.commit_sha }}\`" >> $GITHUB_STEP_SUMMARY + else + echo "- **Target Commit:** Latest commit on current branch (HEAD)" >> $GITHUB_STEP_SUMMARY + fi + echo "" >> $GITHUB_STEP_SUMMARY + + - name: Validate commit SHA (if provided) + if: ${{ github.event.inputs.commit_sha != '' }} + run: | + COMMIT_SHA="${{ github.event.inputs.commit_sha }}" + if ! git rev-parse --verify "$COMMIT_SHA^{commit}" >/dev/null 2>&1; then + echo "## ❌ Error: Invalid Commit SHA" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + echo "The provided commit SHA \`$COMMIT_SHA\` is not valid or does not exist in this repository." >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + echo "### 📝 Troubleshooting" >> $GITHUB_STEP_SUMMARY + echo "- Verify the commit SHA exists in the repository" >> $GITHUB_STEP_SUMMARY + echo "- Ensure you are using the full commit SHA (or at least 7 characters)" >> $GITHUB_STEP_SUMMARY + echo "- Check that the commit is in the current branch history" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + echo "Error: Invalid commit SHA: $COMMIT_SHA" + exit 1 + fi + echo "✅ Commit SHA validated successfully: $COMMIT_SHA" - name: Set up release variables id: set_vars run: | VERSION="${{ github.event.inputs.version }}" + COMMIT_SHA="${{ github.event.inputs.commit_sha }}" + + # Use provided commit SHA or default to HEAD + if [ -n "$COMMIT_SHA" ]; then + TARGET_COMMIT="$COMMIT_SHA" + else + TARGET_COMMIT="HEAD" + fi + echo "tag_name=$VERSION" >> $GITHUB_OUTPUT echo "changelog_file_path=.changes/${VERSION}.md" >> $GITHUB_OUTPUT + echo "target_commit=$TARGET_COMMIT" >> $GITHUB_OUTPUT + + # Get the actual commit SHA for display + ACTUAL_SHA=$(git rev-parse "$TARGET_COMMIT") + echo "actual_sha=$ACTUAL_SHA" >> $GITHUB_OUTPUT + + echo "✅ Release variables set:" + echo " - Tag name: $VERSION" + echo " - Target commit: $ACTUAL_SHA" + echo " - Changelog file: .changes/${VERSION}.md" - name: Validate release notes file run: | - if [ ! -f "${{ steps.set_vars.outputs.changelog_file_path }}" ]; then - echo "Error: Release notes file not found at ${{ steps.set_vars.outputs.changelog_file_path }}" + CHANGELOG_FILE="${{ steps.set_vars.outputs.changelog_file_path }}" + if [ ! -f "$CHANGELOG_FILE" ]; then + echo "## ❌ Error: Release Notes File Not Found" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + echo "The release notes file was not found at the expected location:" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + echo "\`\`\`" >> $GITHUB_STEP_SUMMARY + echo "$CHANGELOG_FILE" >> $GITHUB_STEP_SUMMARY + echo "\`\`\`" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + echo "### 📝 What to do:" >> $GITHUB_STEP_SUMMARY + echo "1. Ensure you have created the changelog file for version \`${{ steps.set_vars.outputs.tag_name }}\`" >> $GITHUB_STEP_SUMMARY + echo "2. The file should be located at: \`.changes/${{ steps.set_vars.outputs.tag_name }}.md\`" >> $GITHUB_STEP_SUMMARY + echo "3. You can use \`changie batch \` to generate the changelog file" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + echo "### 📂 Available changelog files:" >> $GITHUB_STEP_SUMMARY + echo "\`\`\`" >> $GITHUB_STEP_SUMMARY + ls -1 .changes/*.md 2>/dev/null || echo "No changelog files found" >> $GITHUB_STEP_SUMMARY + echo "\`\`\`" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + echo "Error: Release notes file not found at $CHANGELOG_FILE" exit 1 fi + echo "✅ Release notes file found at: $CHANGELOG_FILE" - name: Create Release with GitHub CLI env: GH_TOKEN: ${{ github.token }} run: | - gh release create ${{ steps.set_vars.outputs.tag_name }} \ + echo "## đŸ—ī¸ Creating Release" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + echo "Creating release with the following details:" >> $GITHUB_STEP_SUMMARY + echo "- **Tag:** \`${{ steps.set_vars.outputs.tag_name }}\`" >> $GITHUB_STEP_SUMMARY + echo "- **Target Commit:** \`${{ steps.set_vars.outputs.actual_sha }}\`" >> $GITHUB_STEP_SUMMARY + echo "- **Notes File:** \`${{ steps.set_vars.outputs.changelog_file_path }}\`" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + + # Create the release with the target commit + if gh release create ${{ steps.set_vars.outputs.tag_name }} \ --title "${{ steps.set_vars.outputs.tag_name }}" \ - --notes-file "${{ steps.set_vars.outputs.changelog_file_path }}" + --notes-file "${{ steps.set_vars.outputs.changelog_file_path }}" \ + --target "${{ steps.set_vars.outputs.target_commit }}"; then + + echo "## ✅ Release Created Successfully!" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + echo "🎉 **Release \`${{ steps.set_vars.outputs.tag_name }}\` has been created!**" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + echo "### 📋 Release Details:" >> $GITHUB_STEP_SUMMARY + echo "- **Tag:** \`${{ steps.set_vars.outputs.tag_name }}\`" >> $GITHUB_STEP_SUMMARY + echo "- **Commit:** \`${{ steps.set_vars.outputs.actual_sha }}\`" >> $GITHUB_STEP_SUMMARY + echo "- **Release URL:** [View Release](https://github.com/${{ github.repository }}/releases/tag/${{ steps.set_vars.outputs.tag_name }})" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + else + echo "## ❌ Error: Failed to Create Release" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + echo "The GitHub CLI failed to create the release. This could be due to:" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + echo "### 🔍 Common Issues:" >> $GITHUB_STEP_SUMMARY + echo "- A release with tag \`${{ steps.set_vars.outputs.tag_name }}\` already exists" >> $GITHUB_STEP_SUMMARY + echo "- Insufficient permissions to create releases" >> $GITHUB_STEP_SUMMARY + echo "- Network connectivity issues" >> $GITHUB_STEP_SUMMARY + echo "- Invalid release notes format" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + echo "### 📝 Next Steps:" >> $GITHUB_STEP_SUMMARY + echo "1. Check if the tag already exists: \`git tag -l '${{ steps.set_vars.outputs.tag_name }}'\`" >> $GITHUB_STEP_SUMMARY + echo "2. Verify you have the necessary permissions to create releases" >> $GITHUB_STEP_SUMMARY + echo "3. Review the workflow run logs for detailed error messages" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + echo "Error: Failed to create release" + exit 1 + fi From 635eadc107fdd33d7d22239951eab46eef0f3b66 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 18 Dec 2025 08:31:07 +0000 Subject: [PATCH 15/20] Refactor GITHUB_STEP_SUMMARY messages to use heredoc syntax Co-authored-by: ayeshurun <98805507+ayeshurun@users.noreply.github.com> --- .github/workflows/create-release.yml | 144 +++++++++++++++------------ 1 file changed, 79 insertions(+), 65 deletions(-) diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index 4494fd73..fbaa15b3 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -24,31 +24,37 @@ jobs: - name: Display workflow information run: | - echo "# 🚀 Create Release Workflow" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "## â„šī¸ Workflow Information" >> $GITHUB_STEP_SUMMARY - echo "- **Version:** ${{ github.event.inputs.version }}" >> $GITHUB_STEP_SUMMARY if [ -n "${{ github.event.inputs.commit_sha }}" ]; then - echo "- **Target Commit:** \`${{ github.event.inputs.commit_sha }}\`" >> $GITHUB_STEP_SUMMARY + TARGET_INFO="- **Target Commit:** \`${{ github.event.inputs.commit_sha }}\`" else - echo "- **Target Commit:** Latest commit on current branch (HEAD)" >> $GITHUB_STEP_SUMMARY + TARGET_INFO="- **Target Commit:** Latest commit on current branch (HEAD)" fi - echo "" >> $GITHUB_STEP_SUMMARY + + cat >> $GITHUB_STEP_SUMMARY << EOF + # 🚀 Create Release Workflow + + ## â„šī¸ Workflow Information + - **Version:** ${{ github.event.inputs.version }} + $TARGET_INFO + + EOF - name: Validate commit SHA (if provided) if: ${{ github.event.inputs.commit_sha != '' }} run: | COMMIT_SHA="${{ github.event.inputs.commit_sha }}" if ! git rev-parse --verify "$COMMIT_SHA^{commit}" >/dev/null 2>&1; then - echo "## ❌ Error: Invalid Commit SHA" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "The provided commit SHA \`$COMMIT_SHA\` is not valid or does not exist in this repository." >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "### 📝 Troubleshooting" >> $GITHUB_STEP_SUMMARY - echo "- Verify the commit SHA exists in the repository" >> $GITHUB_STEP_SUMMARY - echo "- Ensure you are using the full commit SHA (or at least 7 characters)" >> $GITHUB_STEP_SUMMARY - echo "- Check that the commit is in the current branch history" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY + cat >> $GITHUB_STEP_SUMMARY << EOF + ## ❌ Error: Invalid Commit SHA + + The provided commit SHA \`$COMMIT_SHA\` is not valid or does not exist in this repository. + + ### 📝 Troubleshooting + - Verify the commit SHA exists in the repository + - Ensure you are using the full commit SHA (or at least 7 characters) + - Check that the commit is in the current branch history + + EOF echo "Error: Invalid commit SHA: $COMMIT_SHA" exit 1 fi @@ -84,24 +90,26 @@ jobs: run: | CHANGELOG_FILE="${{ steps.set_vars.outputs.changelog_file_path }}" if [ ! -f "$CHANGELOG_FILE" ]; then - echo "## ❌ Error: Release Notes File Not Found" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "The release notes file was not found at the expected location:" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "\`\`\`" >> $GITHUB_STEP_SUMMARY - echo "$CHANGELOG_FILE" >> $GITHUB_STEP_SUMMARY - echo "\`\`\`" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "### 📝 What to do:" >> $GITHUB_STEP_SUMMARY - echo "1. Ensure you have created the changelog file for version \`${{ steps.set_vars.outputs.tag_name }}\`" >> $GITHUB_STEP_SUMMARY - echo "2. The file should be located at: \`.changes/${{ steps.set_vars.outputs.tag_name }}.md\`" >> $GITHUB_STEP_SUMMARY - echo "3. You can use \`changie batch \` to generate the changelog file" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "### 📂 Available changelog files:" >> $GITHUB_STEP_SUMMARY - echo "\`\`\`" >> $GITHUB_STEP_SUMMARY - ls -1 .changes/*.md 2>/dev/null || echo "No changelog files found" >> $GITHUB_STEP_SUMMARY - echo "\`\`\`" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY + cat >> $GITHUB_STEP_SUMMARY << EOF + ## ❌ Error: Release Notes File Not Found + + The release notes file was not found at the expected location: + + \`\`\` + $CHANGELOG_FILE + \`\`\` + + ### 📝 What to do: + 1. Ensure you have created the changelog file for version \`${{ steps.set_vars.outputs.tag_name }}\` + 2. The file should be located at: \`.changes/${{ steps.set_vars.outputs.tag_name }}.md\` + 3. You can use \`changie batch \` to generate the changelog file + + ### 📂 Available changelog files: + \`\`\` + $(ls -1 .changes/*.md 2>/dev/null || echo "No changelog files found") + \`\`\` + + EOF echo "Error: Release notes file not found at $CHANGELOG_FILE" exit 1 fi @@ -111,13 +119,15 @@ jobs: env: GH_TOKEN: ${{ github.token }} run: | - echo "## đŸ—ī¸ Creating Release" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "Creating release with the following details:" >> $GITHUB_STEP_SUMMARY - echo "- **Tag:** \`${{ steps.set_vars.outputs.tag_name }}\`" >> $GITHUB_STEP_SUMMARY - echo "- **Target Commit:** \`${{ steps.set_vars.outputs.actual_sha }}\`" >> $GITHUB_STEP_SUMMARY - echo "- **Notes File:** \`${{ steps.set_vars.outputs.changelog_file_path }}\`" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY + cat >> $GITHUB_STEP_SUMMARY << EOF + ## đŸ—ī¸ Creating Release + + Creating release with the following details: + - **Tag:** \`${{ steps.set_vars.outputs.tag_name }}\` + - **Target Commit:** \`${{ steps.set_vars.outputs.actual_sha }}\` + - **Notes File:** \`${{ steps.set_vars.outputs.changelog_file_path }}\` + + EOF # Create the release with the target commit if gh release create ${{ steps.set_vars.outputs.tag_name }} \ @@ -125,31 +135,35 @@ jobs: --notes-file "${{ steps.set_vars.outputs.changelog_file_path }}" \ --target "${{ steps.set_vars.outputs.target_commit }}"; then - echo "## ✅ Release Created Successfully!" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "🎉 **Release \`${{ steps.set_vars.outputs.tag_name }}\` has been created!**" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "### 📋 Release Details:" >> $GITHUB_STEP_SUMMARY - echo "- **Tag:** \`${{ steps.set_vars.outputs.tag_name }}\`" >> $GITHUB_STEP_SUMMARY - echo "- **Commit:** \`${{ steps.set_vars.outputs.actual_sha }}\`" >> $GITHUB_STEP_SUMMARY - echo "- **Release URL:** [View Release](https://github.com/${{ github.repository }}/releases/tag/${{ steps.set_vars.outputs.tag_name }})" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY + cat >> $GITHUB_STEP_SUMMARY << EOF + ## ✅ Release Created Successfully! + + 🎉 **Release \`${{ steps.set_vars.outputs.tag_name }}\` has been created!** + + ### 📋 Release Details: + - **Tag:** \`${{ steps.set_vars.outputs.tag_name }}\` + - **Commit:** \`${{ steps.set_vars.outputs.actual_sha }}\` + - **Release URL:** [View Release](https://github.com/${{ github.repository }}/releases/tag/${{ steps.set_vars.outputs.tag_name }}) + + EOF else - echo "## ❌ Error: Failed to Create Release" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "The GitHub CLI failed to create the release. This could be due to:" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "### 🔍 Common Issues:" >> $GITHUB_STEP_SUMMARY - echo "- A release with tag \`${{ steps.set_vars.outputs.tag_name }}\` already exists" >> $GITHUB_STEP_SUMMARY - echo "- Insufficient permissions to create releases" >> $GITHUB_STEP_SUMMARY - echo "- Network connectivity issues" >> $GITHUB_STEP_SUMMARY - echo "- Invalid release notes format" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "### 📝 Next Steps:" >> $GITHUB_STEP_SUMMARY - echo "1. Check if the tag already exists: \`git tag -l '${{ steps.set_vars.outputs.tag_name }}'\`" >> $GITHUB_STEP_SUMMARY - echo "2. Verify you have the necessary permissions to create releases" >> $GITHUB_STEP_SUMMARY - echo "3. Review the workflow run logs for detailed error messages" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY + cat >> $GITHUB_STEP_SUMMARY << EOF + ## ❌ Error: Failed to Create Release + + The GitHub CLI failed to create the release. This could be due to: + + ### 🔍 Common Issues: + - A release with tag \`${{ steps.set_vars.outputs.tag_name }}\` already exists + - Insufficient permissions to create releases + - Network connectivity issues + - Invalid release notes format + + ### 📝 Next Steps: + 1. Check if the tag already exists: \`git tag -l '${{ steps.set_vars.outputs.tag_name }}'\` + 2. Verify you have the necessary permissions to create releases + 3. Review the workflow run logs for detailed error messages + + EOF echo "Error: Failed to create release" exit 1 fi From 22cc9cb859a54276701237c8a19c5afaafd93f81 Mon Sep 17 00:00:00 2001 From: Alon Yeshurun <98805507+ayeshurun@users.noreply.github.com> Date: Mon, 22 Dec 2025 12:48:32 +0200 Subject: [PATCH 16/20] Update release notes for v1.3.1 --- docs/release-notes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/release-notes.md b/docs/release-notes.md index 056089bc..dc41a2b2 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -10,7 +10,7 @@ hide: ### ✨ New Functionality -* Add support of `mv`, `cp` and `import` commands for SQLDatabase item type +* Add support of mv, cp, export and import for SQLDatabase item type * Add new 'job run-rm' command for remove a scheduled job * Enhance `set` command for items to support any settable property path within the item's definition and metadata structure * Add support in `ls` commmand using `-q` flag for filtering based on JMESPath expressions From 3187e1f3054f4107d00ce342fdeae263f5b39467 Mon Sep 17 00:00:00 2001 From: Alon Yeshurun Date: Thu, 25 Dec 2025 09:13:56 +0000 Subject: [PATCH 17/20] Update docs and remove incorrect warning message --- docs/commands/acls/index.md | 68 ++++++++++++------- docs/examples/workspace_examples.md | 2 +- src/fabric_cli/commands/acls/fab_acls_get.py | 4 +- src/fabric_cli/commands/acls/fab_acls_ls.py | 12 ++-- src/fabric_cli/commands/acls/fab_acls_rm.py | 2 - src/fabric_cli/commands/acls/fab_acls_set.py | 2 - .../fs/assign/fab_fs_assign_domain.py | 2 +- .../commands/fs/get/fab_fs_get_domain.py | 2 +- .../commands/fs/ls/fab_fs_ls_domain.py | 7 +- .../commands/fs/mkdir/fab_fs_mkdir_domain.py | 6 +- .../commands/fs/rm/fab_fs_rm_domain.py | 2 +- .../fs/unassign/fab_fs_unassign_domain.py | 2 +- src/fabric_cli/core/fab_constant.py | 2 +- 13 files changed, 60 insertions(+), 53 deletions(-) diff --git a/docs/commands/acls/index.md b/docs/commands/acls/index.md index a4973111..6f020f08 100644 --- a/docs/commands/acls/index.md +++ b/docs/commands/acls/index.md @@ -5,6 +5,8 @@ The access control list (`acl`) commands let you manage permissions and security **Supported Types:** - `.Workspace` (workspace-level ACLs) +- `.Connection` +- `.Gateway` - All workspace item types (item-level ACLs) - OneLake storage sections (RBAC) @@ -13,17 +15,17 @@ The access control list (`acl`) commands let you manage permissions and security | Command | Description | Usage | |-----------------|------------------------|----------------------------------------------------| | `acl ls` (dir) | List ACLs | `acl ls [-l]` | -| `acl set` | Set access controls | `acl set [-I ] [-R ] [-f]` | -| `acl rm` (del) | Remove an ACL | `acl rm [-I ] [-f]` | | `acl get` | Get ACL details | `acl get [-q ] [-o ]` | +| `acl set` | Set access controls | `acl set -I -R [-f]` | +| `acl rm` (del) | Remove an ACL | `acl rm -I [-f]` | --- ### ls (dir) -List access control entries for a workspace, item, or OneLake resource. +List access control entries for a workspace, item, gateway, connection or OneLake resource. -!!! info "Listing ACLs for a workspace or item requires tenant-level Fabric Administrator" +!!! info "Listing ACLs for an item requires tenant-level Fabric Administrator" **Usage:** @@ -40,85 +42,99 @@ fab acl ls [-l] [-q ] **Examples:** ``` -fab acl ls workspace1.workspace -fab acl ls lh1.lakehouse -l -fab acl ls /Files/data -l -fab acl ls workspace1.workspace -q [].[?role=='Admin'] +# List workspace acls +fab acl ls ws1.workspace + +# List workspace admins acls +fab acl ls ws1.workspace -q [].[?role=='Admin'] + +# List lakehouse item acls +fab acl ls ws1.workspace/lh1.lakehouse +fab acl ls ws1.workspace/lh1.lakehouse/Files/data ``` --- -### set +### get -Set access control permissions for a resource. +Get detailed ACL information with optional filtering for workspace, ite, gateway, connection or OneLake resource. + + +!!! info "Retrieving ACLs for an item requires tenant-level Fabric Administrator" **Usage:** ``` -fab acl set [-I ] [-R ] [-f] +fab acl get [-q ] [-o ] ``` **Parameters:** - ``: Path to the resource. -- `-I, --identity`: Object ID of the Microsoft Entra identity to set or update. -- `-R, --role`: ACL role (admin, member, contributor, viewer). -- `-f, --force`: Skip confirmation prompt. Optional. +- `-q, --query`: JMESPath query to filter results. Optional. +- `-o, --output`: Output path for results. Optional. **Examples:** ``` -fab acl set ws1.Workspace/lh1.Lakehouse -I 11111111-2222-3333-4444-555555555555 -R viewer +# Get workspace acl +fab acl get ws1.Workspace + +# Get item acl +fab acl get ws1.Workspace/lh1.Lakehouse ``` --- -### rm (del) +### set -Remove access permissions for an identity. +Set access control permissions for a workspace, gateway or connection. **Usage:** ``` -fab acl rm [-I ] [-f] +fab acl set -I -R [-f] ``` **Parameters:** - ``: Path to the resource. -- `-I, --identity`: Object ID of the Microsoft Entra identity to remove. +- `-I, --identity`: Object ID of the Microsoft Entra identity to set or update. +- `-R, --role`: ACL role (admin, member, contributor, viewer). - `-f, --force`: Skip confirmation prompt. Optional. **Examples:** ``` -fab acl rm ws1.Workspace/lh1.Lakehouse -I 11111111-2222-3333-4444-555555555555 +fab acl set ws1.Workspace -I 11111111-2222-3333-4444-555555555555 -R viewer ``` --- -### get +### rm (del) -Get detailed ACL information with optional filtering. +Remove access permissions for an identity from a workspace, gateway or connection. **Usage:** ``` -fab acl get [-q ] [-o ] +fab acl rm -I [-f] ``` **Parameters:** - ``: Path to the resource. -- `-q, --query`: JMESPath query to filter results. Optional. -- `-o, --output`: Output path for results. Optional. +- `-I, --identity`: Object ID of the Microsoft Entra identity to remove. +- `-f, --force`: Skip confirmation prompt. Optional. **Examples:** ``` -fab acl get ws1.Workspace +fab acl rm ws1.Workspace -I 11111111-2222-3333-4444-555555555555 ``` + + --- For more examples and detailed scenarios, see [ACLs Examples](../../examples/acl_examples.md). diff --git a/docs/examples/workspace_examples.md b/docs/examples/workspace_examples.md index 9d648e3c..024e29e4 100644 --- a/docs/examples/workspace_examples.md +++ b/docs/examples/workspace_examples.md @@ -263,7 +263,7 @@ fab export ws1.Workspace -o /ws1.Workspace/lh1.Lakehouse/Files -a ### Copy Workspace Items #### Copy Items Between Workspaces -Copy items from one workspace to another. Supported for [exportable items](./item_examples.md#copy-items). +Copy items from one workspace to another. Supported for [exportable items](./item_examples.md#copy-item). ``` fab cp ws1.Workspace ws2.Workspace diff --git a/src/fabric_cli/commands/acls/fab_acls_get.py b/src/fabric_cli/commands/acls/fab_acls_get.py index f13a4b93..12debf55 100644 --- a/src/fabric_cli/commands/acls/fab_acls_get.py +++ b/src/fabric_cli/commands/acls/fab_acls_get.py @@ -32,13 +32,11 @@ def exec_command(args: Namespace, context: FabricElement) -> None: args.query = utils.process_nargs(args.query) if isinstance(context, Workspace): - fab_logger.log_warning(fab_constant.WARNING_FABRIC_ADMIN_ROLE) _get_acls_workspace(context, args) elif isinstance(context, Item): - fab_logger.log_warning(fab_constant.WARNING_FABRIC_ADMIN_ROLE) + fab_logger.log_warning(fab_constant.WARNING_FABRIC_ADMINISTRATOR) _get_acls_item(context, args) elif isinstance(context, VirtualWorkspaceItem): - fab_logger.log_warning(fab_constant.WARNING_FABRIC_ADMIN_ROLE) _get_acls_virtual_ws_item(context, args) elif ( # OneLake security only supporting Lakehouse items diff --git a/src/fabric_cli/commands/acls/fab_acls_ls.py b/src/fabric_cli/commands/acls/fab_acls_ls.py index 7f6347bc..0516c72f 100644 --- a/src/fabric_cli/commands/acls/fab_acls_ls.py +++ b/src/fabric_cli/commands/acls/fab_acls_ls.py @@ -26,13 +26,11 @@ def exec_command(args: Namespace, context: FabricElement) -> None: if isinstance(context, Workspace): - fab_logger.log_warning(fab_constant.WARNING_FABRIC_ADMIN_ROLE) _ls_acls_workspace(context, args) elif isinstance(context, Item): - fab_logger.log_warning(fab_constant.WARNING_FABRIC_ADMIN_ROLE) + fab_logger.log_warning(fab_constant.WARNING_FABRIC_ADMINISTRATOR) _ls_acls_item(context, args) elif isinstance(context, VirtualWorkspaceItem): - fab_logger.log_warning(fab_constant.WARNING_FABRIC_ADMIN_ROLE) _ls_acls_vwitem(context, args) elif ( # OneLake security only supporting Lakehouse items @@ -82,7 +80,7 @@ def _ls_acls_workspace(workspace: Workspace, args: Namespace) -> None: ) sorted_acls = sorted(sorted_acls, key=lambda acl: acl["acl"]) columns = ["acl", "identity", "type"] - + if show_all: columns.extend(["objectId", "name"]) @@ -131,7 +129,7 @@ def _ls_acls_gateway(gateway: VirtualWorkspaceItem, args: Namespace) -> None: ) sorted_acls = sorted(sorted_acls, key=lambda acl: acl["role"]) - + columns = ["role", "principalId", "principalType"] if show_all: columns.insert(0, "id") @@ -168,7 +166,7 @@ def _ls_acls_connection(connection: VirtualWorkspaceItem, args: Namespace) -> No ) sorted_acls = sorted(sorted_acls, key=lambda acl: acl["role"]) - + columns = ["role", "principalId", "principalType"] if show_all: columns.insert(0, "id") @@ -219,7 +217,7 @@ def _ls_acls_item(item: Item, args: Namespace) -> None: ) sorted_acls = sorted(sorted_acls, key=lambda acl: acl["acl"]) - + columns = ["acl", "identity", "type"] if show_all: columns = ["id", "name"] + columns diff --git a/src/fabric_cli/commands/acls/fab_acls_rm.py b/src/fabric_cli/commands/acls/fab_acls_rm.py index 6676c99f..fc47367d 100644 --- a/src/fabric_cli/commands/acls/fab_acls_rm.py +++ b/src/fabric_cli/commands/acls/fab_acls_rm.py @@ -22,10 +22,8 @@ def exec_command(args: Namespace, context: FabricElement) -> None: _rm_acls_workspace(context, args) elif isinstance(context, VirtualWorkspaceItem): if context.item_type == VirtualWorkspaceItemType.CONNECTION: - fab_logger.log_warning(constant.WARNING_FABRIC_ADMIN_ROLE) _rm_acls_connection(context, args) elif context.item_type == VirtualWorkspaceItemType.GATEWAY: - fab_logger.log_warning(constant.WARNING_FABRIC_ADMIN_ROLE) _rm_acls_gateway(context, args) else: raise FabricCLIError( diff --git a/src/fabric_cli/commands/acls/fab_acls_set.py b/src/fabric_cli/commands/acls/fab_acls_set.py index 4400d724..4d7adb55 100644 --- a/src/fabric_cli/commands/acls/fab_acls_set.py +++ b/src/fabric_cli/commands/acls/fab_acls_set.py @@ -34,11 +34,9 @@ def exec_command(args: Namespace, context: FabricElement) -> None: elif isinstance(context, VirtualWorkspaceItem): if context.item_type == VirtualWorkspaceItemType.CONNECTION: _validate_role_by_type(args.role, "Connection") - fab_logger.log_warning(fab_constant.WARNING_FABRIC_ADMIN_ROLE) _set_acls_connection(context, args) elif context.item_type == VirtualWorkspaceItemType.GATEWAY: _validate_role_by_type(args.role, "Gateway") - fab_logger.log_warning(fab_constant.WARNING_FABRIC_ADMIN_ROLE) _set_acls_gateway(context, args) else: raise FabricCLIError( diff --git a/src/fabric_cli/commands/fs/assign/fab_fs_assign_domain.py b/src/fabric_cli/commands/fs/assign/fab_fs_assign_domain.py index 66ffdd66..da2213fa 100644 --- a/src/fabric_cli/commands/fs/assign/fab_fs_assign_domain.py +++ b/src/fabric_cli/commands/fs/assign/fab_fs_assign_domain.py @@ -20,7 +20,7 @@ def exec( args: Namespace, force_assign: bool, ) -> None: - fab_logger.log_warning(fab_constant.WARNING_FABRIC_ADMIN_ROLE) + fab_logger.log_warning(fab_constant.WARNING_FABRIC_ADMINISTRATOR) if isinstance(ws, Workspace): payload = json.dumps( { diff --git a/src/fabric_cli/commands/fs/get/fab_fs_get_domain.py b/src/fabric_cli/commands/fs/get/fab_fs_get_domain.py index 145a04ba..c296e504 100644 --- a/src/fabric_cli/commands/fs/get/fab_fs_get_domain.py +++ b/src/fabric_cli/commands/fs/get/fab_fs_get_domain.py @@ -14,7 +14,7 @@ def exec( virtual_ws_item: VirtualWorkspaceItem, args: Namespace, verbose: bool = True ) -> dict: - fab_logger.log_warning(fab_constant.WARNING_FABRIC_ADMIN_ROLE) + fab_logger.log_warning(fab_constant.WARNING_FABRIC_ADMINISTRATOR) args.name = virtual_ws_item.short_name args.id = virtual_ws_item.id diff --git a/src/fabric_cli/commands/fs/ls/fab_fs_ls_domain.py b/src/fabric_cli/commands/fs/ls/fab_fs_ls_domain.py index fc888159..54bc391e 100644 --- a/src/fabric_cli/commands/fs/ls/fab_fs_ls_domain.py +++ b/src/fabric_cli/commands/fs/ls/fab_fs_ls_domain.py @@ -11,7 +11,7 @@ def exec(vws: VirtualWorkspace, args, show_details): - fab_logger.log_warning(fab_constant.WARNING_FABRIC_ADMIN_ROLE) + fab_logger.log_warning(fab_constant.WARNING_FABRIC_ADMINISTRATOR) domains = utils_mem_store.get_domains(vws.tenant) sorted_domains = utils_ls.sort_elements( [{"name": d.name, "id": d.id} for d in domains] @@ -45,8 +45,5 @@ def exec(vws: VirtualWorkspace, args, show_details): columns = base_cols + domains_detail_cols if show_details else base_cols utils_ls.format_and_print_output( - data=sorted_domains, - columns=columns, - args=args, - show_details=show_details + data=sorted_domains, columns=columns, args=args, show_details=show_details ) diff --git a/src/fabric_cli/commands/fs/mkdir/fab_fs_mkdir_domain.py b/src/fabric_cli/commands/fs/mkdir/fab_fs_mkdir_domain.py index 78babe62..cf6634cf 100644 --- a/src/fabric_cli/commands/fs/mkdir/fab_fs_mkdir_domain.py +++ b/src/fabric_cli/commands/fs/mkdir/fab_fs_mkdir_domain.py @@ -19,7 +19,7 @@ def exec(domain: VirtualWorkspaceItem, args: Namespace) -> None: ): return - fab_logger.log_warning(fab_constant.WARNING_FABRIC_ADMIN_ROLE) + fab_logger.log_warning(fab_constant.WARNING_FABRIC_ADMINISTRATOR) utils_ui.print_grey(f"Creating a new Domain...") payload = {"displayName": f"{domain.short_name}"} @@ -50,7 +50,9 @@ def exec(domain: VirtualWorkspaceItem, args: Namespace) -> None: response = domain_api.create_domain(args, payload=json_payload) if response.status_code in (200, 201): data = json.loads(response.text) - utils_ui.print_output_format(args, message=f"'{domain.name}' created", data=data, show_headers=True) + utils_ui.print_output_format( + args, message=f"'{domain.name}' created", data=data, show_headers=True + ) domain._id = data["id"] diff --git a/src/fabric_cli/commands/fs/rm/fab_fs_rm_domain.py b/src/fabric_cli/commands/fs/rm/fab_fs_rm_domain.py index adbe8394..cd6f278a 100644 --- a/src/fabric_cli/commands/fs/rm/fab_fs_rm_domain.py +++ b/src/fabric_cli/commands/fs/rm/fab_fs_rm_domain.py @@ -12,7 +12,7 @@ def exec( virtual_ws_item: VirtualWorkspaceItem, args: Namespace, force_delete: bool ) -> None: - fab_logger.log_warning(fab_constant.WARNING_FABRIC_ADMIN_ROLE) + fab_logger.log_warning(fab_constant.WARNING_FABRIC_ADMINISTRATOR) args.id = virtual_ws_item.id args.name = virtual_ws_item.name if domain_api.delete_domain(args, force_delete): diff --git a/src/fabric_cli/commands/fs/unassign/fab_fs_unassign_domain.py b/src/fabric_cli/commands/fs/unassign/fab_fs_unassign_domain.py index 3f4a68bd..ed69838a 100644 --- a/src/fabric_cli/commands/fs/unassign/fab_fs_unassign_domain.py +++ b/src/fabric_cli/commands/fs/unassign/fab_fs_unassign_domain.py @@ -20,7 +20,7 @@ def exec( args: Namespace, force_unassign: bool, ) -> None: - fab_logger.log_warning(fab_constant.WARNING_FABRIC_ADMIN_ROLE) + fab_logger.log_warning(fab_constant.WARNING_FABRIC_ADMINISTRATOR) if isinstance(ws, Workspace): args.id = virtual_ws_item.id diff --git a/src/fabric_cli/core/fab_constant.py b/src/fabric_cli/core/fab_constant.py index a25bf5e2..2e21356b 100644 --- a/src/fabric_cli/core/fab_constant.py +++ b/src/fabric_cli/core/fab_constant.py @@ -216,7 +216,7 @@ WARNING_INVALID_JSON_FORMAT = "Invalid JSON format" WARNING_MKDIR_INVALID_ONELAKE = "Invalid paths. Only supported within /Files" WARNING_OPERATION_NO_RESULT = "Long Running Operation returned no result" -WARNING_FABRIC_ADMIN_ROLE = "Requires Fabric admin role" +WARNING_FABRIC_ADMINISTRATOR = "Requires Fabric administrator" WARNING_ONELAKE_RBAC_ENABLED = "Requires data access roles enabled" WARNING_NON_FABRIC_CAPACITY = "Not a Fabric capacity" WARNING_ONLY_SUPPORTED_WITHIN_LAKEHOUSE = "Only supported within Lakehouse" From 75817aea907d98f74535c8e3989b66a8d5157145 Mon Sep 17 00:00:00 2001 From: Alon Yeshurun Date: Thu, 25 Dec 2025 09:16:12 +0000 Subject: [PATCH 18/20] Changelog entry --- .changes/unreleased/docs-20251225-091556.yaml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .changes/unreleased/docs-20251225-091556.yaml diff --git a/.changes/unreleased/docs-20251225-091556.yaml b/.changes/unreleased/docs-20251225-091556.yaml new file mode 100644 index 00000000..534f4d22 --- /dev/null +++ b/.changes/unreleased/docs-20251225-091556.yaml @@ -0,0 +1,3 @@ +kind: docs +body: Update ACLs documentation +time: 2025-12-25T09:15:56.219714671Z From 73362759c120ce3a5e1acac4700f780c1a339ddc Mon Sep 17 00:00:00 2001 From: Alon Yeshurun Date: Thu, 25 Dec 2025 09:26:06 +0000 Subject: [PATCH 19/20] Update changelog entry --- .changes/unreleased/docs-20251225-091556.yaml | 3 --- .changes/unreleased/optimization-20251225-091556.yaml | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) delete mode 100644 .changes/unreleased/docs-20251225-091556.yaml create mode 100644 .changes/unreleased/optimization-20251225-091556.yaml diff --git a/.changes/unreleased/docs-20251225-091556.yaml b/.changes/unreleased/docs-20251225-091556.yaml deleted file mode 100644 index 534f4d22..00000000 --- a/.changes/unreleased/docs-20251225-091556.yaml +++ /dev/null @@ -1,3 +0,0 @@ -kind: docs -body: Update ACLs documentation -time: 2025-12-25T09:15:56.219714671Z diff --git a/.changes/unreleased/optimization-20251225-091556.yaml b/.changes/unreleased/optimization-20251225-091556.yaml new file mode 100644 index 00000000..e4ee48ee --- /dev/null +++ b/.changes/unreleased/optimization-20251225-091556.yaml @@ -0,0 +1,3 @@ +kind: optimization +body: Reduced unnecessary Fabric administrator warnings for ACL commands +time: 2025-12-25T09:15:56.219714671Z From 4b602b078f7fba31f14a6846f93d4778a32a78bc Mon Sep 17 00:00:00 2001 From: Alon Yeshurun <98805507+ayeshurun@users.noreply.github.com> Date: Thu, 25 Dec 2025 13:14:26 +0200 Subject: [PATCH 20/20] Fix typo in ACL documentation --- docs/commands/acls/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/commands/acls/index.md b/docs/commands/acls/index.md index 6f020f08..c442e6b7 100644 --- a/docs/commands/acls/index.md +++ b/docs/commands/acls/index.md @@ -57,7 +57,7 @@ fab acl ls ws1.workspace/lh1.lakehouse/Files/data ### get -Get detailed ACL information with optional filtering for workspace, ite, gateway, connection or OneLake resource. +Get detailed ACL information with optional filtering for workspace, item, gateway, connection or OneLake resource. !!! info "Retrieving ACLs for an item requires tenant-level Fabric Administrator"