Skip to content

Commit 213d802

Browse files
authored
Merge branch 'dev' into fadi/tweakGradle
2 parents 4032085 + 612ea9f commit 213d802

File tree

5 files changed

+111
-2
lines changed

5 files changed

+111
-2
lines changed
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
##
2+
# Workflow: release-fix auto PR
3+
# Purpose: When a `release-fix/*` branch is created, automatically
4+
# open a pull request targeting the corresponding `release/<version>` branch.
5+
# Maintainer: Android Team - Release Engineering
6+
# Docs: See repository CONTRIBUTING.md for release process guidance
7+
##
8+
name: Auto PR to merge release-fix branches into release
9+
10+
permissions:
11+
contents: read
12+
pull-requests: write
13+
14+
on:
15+
create:
16+
17+
jobs:
18+
create-pr:
19+
if: >
20+
github.event.ref_type == 'branch' &&
21+
startsWith(github.event.ref, 'release-fix/') &&
22+
vars.ENABLE_RELEASE_AUTOMATION == 'true'
23+
runs-on: ubuntu-latest
24+
25+
steps:
26+
- name: Checkout repository
27+
uses: actions/checkout@v4
28+
29+
- name: Compute target release version
30+
id: compute_version
31+
run: |
32+
BRANCH_NAME="${{ github.event.ref }}"
33+
if [[ "$BRANCH_NAME" =~ ^release-fix/(.+)$ ]]; then
34+
VERSION="${BASH_REMATCH[1]}"
35+
echo "version=$VERSION" >> $GITHUB_OUTPUT
36+
echo "Computed version: $VERSION"
37+
else
38+
echo "Failed to compute version from branch: $BRANCH_NAME"
39+
exit 1
40+
fi
41+
42+
- name: Create Pull Request
43+
env:
44+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45+
run: |
46+
gh pr create \
47+
--base "release/${{ steps.compute_version.outputs.version }}" \
48+
--head "${{ github.event.ref }}" \
49+
--title "Auto PR: ${{ github.event.ref }} → release/${{ steps.compute_version.outputs.version }}" \
50+
--body "This is an automated pull request created to integrate release changes into release/${{ steps.compute_version.outputs.version }}. Triggered when the branch ${{ github.event.ref }} was published."
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
##
2+
# Workflow: release-integration auto PR
3+
# Purpose: When a `release-integration/*` branch is created, automatically
4+
# open a pull request targeting `dev` to integrate release changes.
5+
##
6+
name: Auto PR to dev for release-integration branches
7+
8+
permissions:
9+
contents: read
10+
pull-requests: write
11+
12+
on:
13+
create:
14+
15+
concurrency:
16+
group: auto-pr-release-integration-${{ github.event.ref }}
17+
cancel-in-progress: false
18+
19+
jobs:
20+
create-pr:
21+
if: >
22+
github.event.ref_type == 'branch' &&
23+
startsWith(github.event.ref, 'release-integration/') &&
24+
vars.ENABLE_RELEASE_AUTOMATION == 'true'
25+
runs-on: ubuntu-latest
26+
27+
steps:
28+
- name: Checkout repository
29+
uses: actions/checkout@v4
30+
- name: Create Pull Request
31+
env:
32+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
run: |
34+
gh pr create \
35+
--base dev \
36+
--head "${{ github.event.ref }}" \
37+
--title "Auto PR: ${{ github.event.ref }} → dev" \
38+
--body "This is an automated pull request created to integrate release changes into **dev**. Triggered when the branch **${{ github.event.ref }}** was published."

common4j/src/main/com/microsoft/identity/common/java/cache/SharedPreferencesAccountCredentialCacheWithMemoryCache.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
import com.microsoft.identity.common.java.logging.Logger;
3434
import com.microsoft.identity.common.java.opentelemetry.AttributeName;
3535
import com.microsoft.identity.common.java.opentelemetry.OTelUtility;
36+
import com.microsoft.identity.common.java.opentelemetry.OtelContextExtension;
3637
import com.microsoft.identity.common.java.util.StringUtil;
3738
import com.microsoft.identity.common.java.util.ported.Predicate;
3839

@@ -76,10 +77,11 @@ public SharedPreferencesAccountCredentialCacheWithMemoryCache(
7677
super(sharedPreferencesFileManager);
7778
Logger.verbose(TAG, "Init: " + TAG);
7879
mCacheValueDelegate = accountCacheValueDelegate;
79-
new Thread(() -> load()).start();
80+
new Thread(OtelContextExtension.wrap(() -> load())).start();
8081
}
8182

8283
private void load() {
84+
final long loadStartTime = System.currentTimeMillis();
8385
final String methodTag = TAG + ":load";
8486

8587
synchronized (mCacheLock) {
@@ -93,6 +95,8 @@ private void load() {
9395
} finally {
9496
mLoaded = true;
9597
mCacheLock.notifyAll();
98+
OTelUtility.recordElapsedTime(AttributeName.elapsed_time_in_memory_cache_load.name(),
99+
loadStartTime);
96100
}
97101
}
98102
}

common4j/src/main/com/microsoft/identity/common/java/controllers/CommandDispatcher.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,11 @@ public static FinalizableResultFuture<CommandResult> submitSilentReturningFuture
346346
AttributeName.num_concurrent_silent_requests.name(),
347347
sExecutingCommandMap.size()
348348
);
349+
int queueSize = ((ThreadPoolExecutor)sSilentExecutor).getQueue().size();
350+
SpanExtension.current().setAttribute(
351+
AttributeName.silent_requests_queue_size.name(),
352+
queueSize
353+
);
349354

350355
commandExecutor.execute(OtelContextExtension.wrap(new Runnable() {
351356
@Override

common4j/src/main/com/microsoft/identity/common/java/opentelemetry/AttributeName.java

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,17 @@ public enum AttributeName {
146146
http_status_code,
147147

148148
/**
149-
* The size of the silent command executor queue when starting to process an ATS request.
149+
* The number of unique cacheable silent requests currently being tracked in the executing command map.
150+
* This represents deduplicated commands that are either executing or waiting in the thread pool queue.
150151
*/
151152
num_concurrent_silent_requests,
152153

154+
/**
155+
* The number of tasks waiting in the silent request thread pool queue to be executed.
156+
* This does not include tasks currently being executed by worker threads.
157+
*/
158+
silent_requests_queue_size,
159+
153160
/**
154161
* The time (in milliseconds) spent in executing the save method in OAuth2TokenCache.
155162
*/
@@ -494,6 +501,11 @@ public enum AttributeName {
494501
*/
495502
in_memory_cache_used_for_accounts_and_credentials,
496503

504+
/**
505+
* Elapsed time (in milliseconds) spent in executing the load() method in BrokerOAuth2TokenCache for in memory cache.
506+
*/
507+
elapsed_time_in_memory_cache_load,
508+
497509
/**
498510
* Passkey operation type (e.g., registration, authentication).
499511
*/

0 commit comments

Comments
 (0)