Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
806e19f
Updated to GA of Document Intelligence - preview does not work in all…
graemefoster Apr 1, 2025
46898c1
Changes so container builds
graemefoster Apr 2, 2025
c6730fd
Removed deprecated 'http_application_routing' add-on from AKS deploym…
Prasanjeet-Microsoft Apr 24, 2025
6e1e66e
Merge pull request #349 from microsoft/PSL-BUG-17351
Prajwal-Microsoft Apr 24, 2025
c4a1534
doc updates for new content structure
toherman-msft May 1, 2025
e7ef03b
readme updates for template
toherman-msft May 1, 2025
2e4d08f
Merge pull request #346 from microsoft/dev
Roopan-Microsoft May 2, 2025
9c75c72
Improve Docker check using exit code and error match for reliability
Prasanjeet-Microsoft May 5, 2025
8dd68df
Merge pull request #378 from microsoft/PSL-BUG-17679
Prajwal-Microsoft May 5, 2025
5a16a5e
added new owner name
VishalS-Microsoft May 7, 2025
a469623
Merge pull request #379 from microsoft/psl-addownername-dkm
Roopan-Microsoft May 7, 2025
7ed09a9
updating security link, account setup md
toherman-msft May 7, 2025
85c5742
readme updates
toherman-msft May 7, 2025
f8688e5
Merge pull request #380 from microsoft/docs-gh-updates
aniaroramsft May 7, 2025
c9d3be8
Merge pull request #384 from microsoft/dev
Roopan-Microsoft May 21, 2025
8590922
Merge pull request #290 from graemefoster/feature/ga-for-document-int…
Prajwal-Microsoft May 23, 2025
1244e18
Updated Dependabot config to group PRs and added workflow for schedul…
Rafi-Microsoft May 23, 2025
7fb6991
Merge pull request #385 from microsoft/PSL-DependabotAutoMergeWorkflow
Rafi-Microsoft May 27, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# Each line is a file pattern followed by one or more owners.

# These owners will be the default owners for everything in the repo.
* @Avijit-Microsoft @Roopan-Microsoft @Prajwal-Microsoft @dongbumlee
* @Avijit-Microsoft @Roopan-Microsoft @Prajwal-Microsoft @dongbumlee @Vinay-Microsoft @aniaroramsft
44 changes: 34 additions & 10 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,36 @@
# package ecosystems to update and where the package manifests are located.
# For more details, refer to the documentation:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
# GitHub Actions dependencies
# GitHub Actions dependencies (grouped)
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
commit-message:
prefix: "build"
target-branch: "dependabotchanges"
open-pull-requests-limit: 100
open-pull-requests-limit: 10
groups:
all-actions:
patterns:
- "*"

# .NET NuGet dependencies for Backend API (Multiple Projects)
# .NET NuGet dependencies (grouped)
- package-ecosystem: "nuget"
directory: "/App/backend-api/Microsoft.GS.DPS"
schedule:
interval: "monthly"
commit-message:
prefix: "build"
target-branch: "dependabotchanges"
open-pull-requests-limit: 100
open-pull-requests-limit: 10
groups:
nuget-deps:
patterns:
- "*"

- package-ecosystem: "nuget"
directory: "/App/backend-api/Microsoft.GS.DPS.Host"
Expand All @@ -31,17 +40,24 @@ updates:
commit-message:
prefix: "build"
target-branch: "dependabotchanges"
open-pull-requests-limit: 100
open-pull-requests-limit: 10
groups:
nuget-deps:
patterns:
- "*"

# .NET NuGet dependencies for Kernel Memory Clients
- package-ecosystem: "nuget"
directory: "/App/kernel-memory/clients/dotnet/SemanticKernelPlugin"
schedule:
interval: "monthly"
commit-message:
prefix: "build"
target-branch: "dependabotchanges"
open-pull-requests-limit: 100
open-pull-requests-limit: 10
groups:
nuget-deps:
patterns:
- "*"

- package-ecosystem: "nuget"
directory: "/App/kernel-memory/clients/dotnet/WebClient"
Expand All @@ -50,14 +66,22 @@ updates:
commit-message:
prefix: "build"
target-branch: "dependabotchanges"
open-pull-requests-limit: 100
open-pull-requests-limit: 10
groups:
nuget-deps:
patterns:
- "*"

# npm dependencies for Frontend App
# npm dependencies for Frontend App (grouped)
- package-ecosystem: "npm"
directory: "/App/frontend-app"
schedule:
interval: "monthly"
commit-message:
prefix: "build"
target-branch: "dependabotchanges"
open-pull-requests-limit: 100
open-pull-requests-limit: 10
groups:
frontend-deps:
patterns:
- "*"
152 changes: 152 additions & 0 deletions .github/workflows/scheduled-Dependabot-PRs-Auto-Merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
# ------------------------------------------------------------------------------
# Scheduled Dependabot PRs Auto-Merge Workflow
#
# Purpose:
# - Automatically detect, rebase (if needed), and merge Dependabot PRs targeting
# the `dependabotchanges` branch, supporting different merge strategies.
#
# Features:
# ✅ Filters PRs authored by Dependabot and targets the specific base branch
# ✅ Rebases PRs with conflicts and auto-resolves using "prefer-theirs" strategy
# ✅ Attempts all three merge strategies: merge, squash, rebase (first success wins)
# ✅ Handles errors gracefully, logs clearly
#
# Triggers:
# - Scheduled daily run (midnight UTC)
# - Manual trigger (via GitHub UI)
#
# Required Permissions:
# - contents: write
# - pull-requests: write
# ------------------------------------------------------------------------------

name: Scheduled Dependabot PRs Auto-Merge

on:
schedule:
- cron: '0 0 * * *' # Runs once a day at midnight UTC
workflow_dispatch:

permissions:
contents: write
pull-requests: write

jobs:
merge-dependabot:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install GitHub CLI
run: |
sudo apt update
sudo apt install -y gh
- name: Fetch & Filter Dependabot PRs
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo "🔍 Fetching all Dependabot PRs targeting 'dependabotchanges'..."
> matched_prs.txt
pr_batch=$(gh pr list --state open --json number,title,author,baseRefName,url \
--jq '.[] | "\(.number)|\(.title)|\(.author.login)|\(.baseRefName)|\(.url)"')
while IFS='|' read -r number title author base url; do
author=$(echo "$author" | xargs)
base=$(echo "$base" | xargs)
if [[ "$author" == "app/dependabot" && "$base" == "dependabotchanges" ]]; then
echo "$url" >> matched_prs.txt
echo "✅ Matched PR #$number - $title"
else
echo "❌ Skipped PR #$number - $title (Author: $author, Base: $base)"
fi
done <<< "$pr_batch"
echo "👉 Matched PRs:"
cat matched_prs.txt || echo "None"
- name: Rebase PR if Conflicts Exist
if: success()
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
if [[ ! -s matched_prs.txt ]]; then
echo "⚠️ No matching PRs to process."
exit 0
fi
while IFS= read -r pr_url; do
pr_number=$(basename "$pr_url")
echo "🔁 Checking PR #$pr_number for conflicts..."
mergeable=$(gh pr view "$pr_number" --json mergeable --jq '.mergeable')
if [[ "$mergeable" == "CONFLICTING" ]]; then
echo "⚠️ Merge conflicts detected. Performing manual rebase for PR #$pr_number..."
head_branch=$(gh pr view "$pr_number" --json headRefName --jq '.headRefName')
base_branch=$(gh pr view "$pr_number" --json baseRefName --jq '.baseRefName')
git fetch origin "$base_branch":"$base_branch"
git fetch origin "$head_branch":"$head_branch"
git checkout "$head_branch"
git config user.name "github-actions"
git config user.email "action@github.com"
# Attempt rebase with 'theirs' strategy
if git rebase --strategy=recursive -X theirs "$base_branch"; then
echo "✅ Rebase successful. Pushing..."
git push origin "$head_branch" --force
else
echo "❌ Rebase failed. Aborting..."
git rebase --abort || true
fi
else
echo "✅ PR #$pr_number is mergeable. Skipping rebase."
fi
done < matched_prs.txt

- name: Auto-Merge PRs using available strategy
if: success()
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
if [[ ! -s matched_prs.txt ]]; then
echo "⚠️ No matching PRs to process."
exit 0
fi
while IFS= read -r pr_url; do
pr_number=$(basename "$pr_url")
echo "🔍 Checking mergeability for PR #$pr_number"
attempt=0
max_attempts=8
mergeable=""
sleep 5 # Let GitHub calculate mergeable status
while [[ $attempt -lt $max_attempts ]]; do
mergeable=$(gh pr view "$pr_number" --json mergeable --jq '.mergeable' 2>/dev/null || echo "UNKNOWN")
echo "🔁 Attempt $((attempt+1))/$max_attempts: mergeable=$mergeable"
if [[ "$mergeable" == "MERGEABLE" ]]; then
success=0
for strategy in rebase squash merge; do
echo "🚀 Trying to auto-merge PR #$pr_number using '$strategy' strategy..."
set -x
merge_output=$(gh pr merge --auto --"$strategy" "$pr_url" 2>&1)
merge_status=$?
set +x
echo "$merge_output"
if [[ $merge_status -eq 0 ]]; then
echo "✅ Auto-merge succeeded using '$strategy'."
success=1
break
else
echo "❌ Auto-merge failed using '$strategy'. Trying next strategy..."
fi
done
if [[ $success -eq 0 ]]; then
echo "❌ All merge strategies failed for PR #$pr_number"
fi
break
elif [[ "$mergeable" == "CONFLICTING" ]]; then
echo "❌ Cannot merge due to conflicts. Skipping PR #$pr_number"
break
else
echo "🕒 Waiting for GitHub to determine mergeable status..."
sleep 15
fi
((attempt++))
done
if [[ "$mergeable" != "MERGEABLE" && "$mergeable" != "CONFLICTING" ]]; then
echo "❌ Mergeability undetermined after $max_attempts attempts. Skipping PR #$pr_number"
fi
done < matched_prs.txt || echo "⚠️ Completed loop with some errors, but continuing gracefully."
2 changes: 1 addition & 1 deletion App/kernel-memory/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<ItemGroup>
<PackageVersion Include="Aspire.Npgsql.EntityFrameworkCore.PostgreSQL" Version="8.0.2" />
<PackageVersion Include="AWSSDK.S3" Version="3.7.310.4" />
<PackageVersion Include="Azure.AI.DocumentIntelligence" Version="1.0.0-beta.2" />
<PackageVersion Include="Azure.AI.DocumentIntelligence" Version="1.0.0" />
<PackageVersion Include="Azure.AI.FormRecognizer" Version="4.1.0" />
<PackageVersion Include="Azure.Core" Version="1.42.0" />
<PackageVersion Include="Azure.Extensions.AspNetCore.Configuration.Secrets" Version="1.3.1" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ public async Task<FileContent> DecodeAsync(string filename, CancellationToken ca

public async Task<FileContent> DecodeAsync(BinaryData data, CancellationToken cancellationToken = default)
{
var content = new AnalyzeDocumentContent() { Base64Source = data };
var analyzeDocumentOptions = new AnalyzeDocumentOptions("prebuilt-layout", data)
{
OutputContentFormat = DocumentContentFormat.Markdown
};

//this invocation should be blocking during process
DocumentIntelligenceClientOptions options = new()
Expand All @@ -49,7 +52,7 @@ public async Task<FileContent> DecodeAsync(BinaryData data, CancellationToken ca
this._client = new DocumentIntelligenceClient(new Uri(this._endpoint), new AzureKeyCredential(this._apiKey), options);

Operation<AnalyzeResult> operation = null;
operation = await this._client.AnalyzeDocumentAsync(WaitUntil.Completed, "prebuilt-layout", content, outputContentFormat: ContentFormat.Markdown, cancellationToken: cancellationToken).ConfigureAwait(false);
operation = await this._client.AnalyzeDocumentAsync(WaitUntil.Completed, analyzeDocumentOptions, cancellationToken).ConfigureAwait(false);

AnalyzeResult result = operation.Value;

Expand Down
2 changes: 0 additions & 2 deletions Deployment/kubernetes/enable_approuting.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ function Enable-AppRouting {
# Enable application routing
az aks approuting enable --resource-group $ResourceGroupName --name $ClusterName

# Enable HTTP application routing addon
az aks enable-addons --resource-group $ResourceGroupName --name $ClusterName --addons http_application_routing
}

Export-ModuleMember -Function Enable-AppRouting
15 changes: 9 additions & 6 deletions Deployment/resourcedeployment.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -398,17 +398,20 @@ class DeploymentResult {

function Check-Docker {
try {
# Try to get Docker info to check if Docker daemon is running
$dockerInfo = docker info 2>&1
if ($dockerInfo -match "ERROR: error during connect") {
# Try to get Docker info to check if Docker daemon is running
$dockerInfo = docker info 2>&1
if ($LASTEXITCODE -ne 0 -or $dockerInfo -match "error during connect") {
return $false
} else {
}
else {
return $true
}
} catch {
}
catch {
Write-Host "An error occurred while checking Docker status." -ForegroundColor Red
Write-Host $_.Exception.Message -ForegroundColor Red
return $false }
return $false
}
}

# Check if Docker is running before proceeding
Expand Down
Binary file removed Images/readme/customerTruth.png
Binary file not shown.
Binary file removed Images/readme/quickDeploy.png
Binary file not shown.
Binary file removed Images/readme/supportingDocuments.png
Binary file not shown.
Binary file removed Images/readme/userStory.png
Binary file not shown.
Loading
Loading