Skip to content

Commit 7090606

Browse files
Merge branch 'main' into mfe-iframe
2 parents 69c5012 + 20e272d commit 7090606

34 files changed

Lines changed: 5551 additions & 883 deletions

File tree

.github/actions/build-ab/templates/latest.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ window.NREUM.loader_config.licenseKey = '{{{args.abLicenseKey}}}'
44
window.NREUM.info.applicationID = '{{{args.abAppId}}}'
55
window.NREUM.info.licenseKey = '{{{args.abLicenseKey}}}'
66
window.NREUM.init.proxy.assets = 'https://staging-js-agent.newrelic.com/dev'
7-
window.NREUM.init.feature_flags = ['ajax_metrics_deny_list', 'register', 'websockets']
7+
window.NREUM.init.feature_flags = ['ajax_metrics_deny_list', 'register']
88
window.NREUM.init.session_replay.enabled = true // feature is enabled, but the app settings will have sampling at 0. We can proactively enable SR for certain test cases through app settings
99
window.NREUM.init.session_trace.enabled = true // feature is enabled, but the app settings will have sampling at 0. We can proactively enable SR for certain test cases through app settings
10+
window.NREUM.init.web_sockets.enabled = true
1011
window.NREUM.init.user_actions = {elementAttributes: ['id', 'className', 'tagName', 'type', 'ariaLabel', 'alt', 'title']}
1112
window.NREUM.init.ajax.capture_payloads = 'failures'
1213

.github/actions/build-agent2query/templates/latest-staging-config.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,10 @@ NREUM.init = {
3131
},
3232
ajax: {
3333
deny_list: ['staging-bam-cell.nr-data.net']
34+
},
35+
web_sockets: {
36+
enabled: true
3437
}
3538
}
36-
NREUM.feature_flags = ['soft_nav', 'websockets']
39+
NREUM.feature_flags = ['soft_nav']
3740
NREUM.info = { beacon: 'staging-bam-cell.nr-data.net', errorBeacon: 'staging-bam-cell.nr-data.net', licenseKey: '{{{latestStagingLicenseKey}}}', applicationID: '77606036', sa: 1 }

.github/actions/build-agent2query/templates/latest-us-prod-config.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,10 @@ NREUM.init = {
3131
},
3232
ajax: {
3333
deny_list: ['bam.nr-data.net']
34+
},
35+
web_sockets: {
36+
enabled: true
3437
}
3538
}
36-
NREUM.feature_flags = ['soft_nav', 'websockets']
39+
NREUM.feature_flags = ['soft_nav']
3740
NREUM.info = { beacon: 'bam.nr-data.net', errorBeacon: 'bam.nr-data.net', licenseKey: '{{{latestUsProdLicenseKey}}}', applicationID: '1431915022', sa: 1 }

.github/actions/build-agent2query/templates/released-staging-config.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,10 @@ NREUM.init = {
3131
},
3232
ajax: {
3333
deny_list: ['staging-bam-cell.nr-data.net']
34+
},
35+
web_sockets: {
36+
enabled: true
3437
}
3538
}
36-
NREUM.feature_flags = ['soft_nav', 'websockets']
39+
NREUM.feature_flags = ['soft_nav']
3740
NREUM.info = { beacon: 'staging-bam-cell.nr-data.net', errorBeacon: 'staging-bam-cell.nr-data.net', licenseKey: '{{{releasedStagingLicenseKey}}}', applicationID: '78536307', sa: 1 }

.github/actions/build-agent2query/templates/released-us-prod-config.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,10 @@ NREUM.init = {
3131
},
3232
ajax: {
3333
deny_list: ['bam.nr-data.net']
34+
},
35+
web_sockets: {
36+
enabled: true
3437
}
3538
}
36-
NREUM.feature_flags = ['soft_nav', 'websockets']
39+
NREUM.feature_flags = ['soft_nav']
3740
NREUM.info = { beacon: 'bam.nr-data.net', errorBeacon: 'bam.nr-data.net', licenseKey: '{{{releasedUsProdLicenseKey}}}', applicationID: '1431909786', sa: 1 }

.github/actions/internal-promotion/templates/released.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,10 @@
8585
}
8686
},
8787
proxy: {},
88-
user_actions: {elementAttributes: ['id', 'className', 'tagName', 'type', 'ariaLabel', 'alt', 'title']}
88+
user_actions: {elementAttributes: ['id', 'className', 'tagName', 'type', 'ariaLabel', 'alt', 'title']},
89+
web_sockets: {
90+
enabled: true
91+
}
8992
},
9093
loader_config: {
9194
accountID: '1',

.github/workflows/internal-promotion.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,10 +179,11 @@ jobs:
179179

180180
# Step 2: Deploy to Staging
181181
deploy-staging:
182-
# Only run for workflow_dispatch on main or release-please branches
182+
# For workflow_dispatch: only on main or release-please branches
183+
# For pull_request: only release-please PRs
183184
if: |
184-
github.event_name == 'workflow_dispatch' &&
185-
(github.ref_name == 'main' || startsWith(github.ref_name, 'release-please--'))
185+
(github.event_name == 'workflow_dispatch' && (github.ref_name == 'main' || startsWith(github.ref_name, 'release-please--'))) ||
186+
(github.event_name == 'pull_request' && startsWith(github.head_ref, 'release-please--'))
186187
needs: [resolve-version, deploy-dev]
187188
runs-on: ubuntu-latest
188189
environment: nr1-staging

.github/workflows/npm-operations.yml

Lines changed: 53 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ on:
1515
types: [published]
1616

1717
# 3. Scheduled deprecation (keeping existing nightly schedule)
18-
schedule:
19-
# Runs every day at 4AM
20-
- cron: '0 4 * * *'
18+
#schedule:
19+
# # Runs every day at 4AM
20+
# - cron: '0 4 * * *'
2121

2222
# 4. Manual trigger for testing/manual/emergency operations
2323
workflow_dispatch:
@@ -29,7 +29,7 @@ on:
2929
options:
3030
- publish-release
3131
- publish-prerelease
32-
- deprecate-old-versions
32+
#- deprecate-old-versions
3333
preid:
3434
description: '(publish-prerelease) identifier (e.g., rc, alpha, beta)'
3535
required: false
@@ -86,10 +86,10 @@ jobs:
8686
GITHUB_LOGIN: ${{ secrets.GITHUB_LOGIN || secrets.BROWSER_GITHUB_BOT_NAME }}
8787
GITHUB_EMAIL: ${{ secrets.GITHUB_EMAIL || secrets.BROWSER_GITHUB_BOT_EMAIL }}
8888
OPERATION: ${{ fromJson(needs.determine-operations.outputs.operations)[0] }}
89-
89+
9090
steps:
9191
- uses: actions/checkout@v5
92-
92+
9393
- uses: actions/setup-node@v5
9494
with:
9595
# Trusted Publishing requires `npm@11.5.1` or later. Compatible
@@ -101,28 +101,28 @@ jobs:
101101
# This is important. The OIDC exchange requires that the registry
102102
# URL matches on both ends.
103103
registry-url: https://registry.npmjs.org
104-
104+
105105
# Setup Git for prerelease operations
106106
- name: Set up git
107107
run: |
108108
git config --global user.name "${GITHUB_LOGIN}"
109109
git config --global user.email "${GITHUB_EMAIL}"
110-
110+
111111
# Install dependencies for publish operations
112112
- name: Install project dependencies
113113
if: env.OPERATION == 'publish-release' || env.OPERATION == 'publish-prerelease'
114114
run: npm ci
115-
115+
116116
# Build NPM package for release
117117
- name: Build npm package
118118
if: env.OPERATION == 'publish-release'
119119
run: npm run build:npm
120-
120+
121121
# Publish release version
122122
- name: Publish npm package (release)
123123
if: env.OPERATION == 'publish-release'
124124
run: npm publish
125-
125+
126126
# Publish prerelease version
127127
- name: Publish prerelease version
128128
if: env.OPERATION == 'publish-prerelease'
@@ -131,49 +131,49 @@ jobs:
131131
version-override: ${{ inputs.version-override }}
132132
preid: ${{ inputs.preid || 'rc' }}
133133
dry_run: ${{ inputs.dry_run || false }}
134-
134+
135135
# Deprecate old versions
136-
- name: Deprecate old versions
137-
if: env.OPERATION == 'deprecate-old-versions'
138-
env:
139-
# Ensure npm uses the registry URL for authentication
140-
NPM_CONFIG_REGISTRY: https://registry.npmjs.org/
141-
run: |
142-
# Get agent EoL table from NRQL
143-
response=$(curl -X POST https://api.newrelic.com/graphql \
144-
-H 'Content-Type: application/json' \
145-
-H 'API-Key: ${{ secrets.NR_API_KEY_PRODUCTION }}' \
146-
-d '{ "query": "{\n docs {\n agentReleases(agentName: BROWSER) {\n eolDate\n version\n }\n }\n}" }')
147-
eol_table=$(echo "$response" | jq -r '.data.docs.agentReleases | map({(.version): .eolDate}) | add')
148-
echo "Fetched EoL table from NRDB."
149-
150-
# Fetch package metadata from npm registry
151-
package_name="@newrelic/browser-agent"
152-
metadata=$(curl -s "https://registry.npmjs.org/$package_name")
153-
echo "Fetched agent releases metadata from NPM."
154-
155-
# Parse versions and their publication dates
156-
today=$(date +%Y-%m-%d)
157-
versions=$(echo "$metadata" | jq -r '.versions | keys[]')
158-
for version in $versions; do
159-
eol_date=$(echo "$eol_table" | jq -r --arg version "$version" '.[$version]')
160-
if [ "$eol_date" = "null" ]; then
161-
echo "No EoL date found for version $version. Skipping..."
162-
continue
163-
fi
164-
deprecation_message=$(echo "$metadata" | jq -r ".versions[\"$version\"].deprecated")
165-
if [[ "$eol_date" < "$today" || "$eol_date" == "$today" ]]; then
166-
if [ "$deprecation_message" = "null" ]; then
167-
echo "Deprecating version $version no longer supported as of $eol_date..."
168-
npm deprecate "$package_name@$version" "This version is no longer supported."
169-
else
170-
echo "Version $version is already deprecated."
171-
fi
172-
else
173-
break
174-
fi
175-
done
136+
#- name: Deprecate old versions
137+
# if: env.OPERATION == 'deprecate-old-versions'
138+
# env:
139+
# # Ensure npm uses the registry URL for authentication
140+
# NPM_CONFIG_REGISTRY: https://registry.npmjs.org/
141+
# run: |
142+
# # Get agent EoL table from NRQL
143+
# response=$(curl -X POST https://api.newrelic.com/graphql \
144+
# -H 'Content-Type: application/json' \
145+
# -H 'API-Key: ${{ secrets.NR_API_KEY_PRODUCTION }}' \
146+
# -d '{ "query": "{\n docs {\n agentReleases(agentName: BROWSER) {\n eolDate\n version\n }\n }\n}" }')
147+
# eol_table=$(echo "$response" | jq -r '.data.docs.agentReleases | map({(.version): .eolDate}) | add')
148+
# echo "Fetched EoL table from NRDB."
149+
#
150+
# # Fetch package metadata from npm registry
151+
# package_name="@newrelic/browser-agent"
152+
# metadata=$(curl -s "https://registry.npmjs.org/$package_name")
153+
# echo "Fetched agent releases metadata from NPM."
154+
#
155+
# # Parse versions and their publication dates
156+
# today=$(date +%Y-%m-%d)
157+
# versions=$(echo "$metadata" | jq -r '.versions | keys[]')
158+
# for version in $versions; do
159+
# eol_date=$(echo "$eol_table" | jq -r --arg version "$version" '.[$version]')
160+
# if [ "$eol_date" = "null" ]; then
161+
# echo "No EoL date found for version $version. Skipping..."
162+
# continue
163+
# fi
164+
# deprecation_message=$(echo "$metadata" | jq -r ".versions[\"$version\"].deprecated")
165+
# if [[ "$eol_date" < "$today" || "$eol_date" == "$today" ]]; then
166+
# if [ "$deprecation_message" = "null" ]; then
167+
# echo "Deprecating version $version no longer supported as of $eol_date..."
168+
# npm deprecate "$package_name@$version" "This version is no longer supported."
169+
# else
170+
# echo "Version $version is already deprecated."
171+
# fi
172+
# else
173+
# break
174+
# fi
175+
# done
176176

177177
outputs:
178178
operation: ${{ env.OPERATION }}
179-
success: ${{ job.status == 'success' }}
179+
success: ${{ job.status == 'success' }}

.github/workflows/publish-experiment.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,10 @@ jobs:
112112
}
113113
},
114114
proxy: {},
115-
user_actions: {elementAttributes: ['id', 'className', 'tagName', 'type', 'ariaLabel', 'alt', 'title']}
115+
user_actions: {elementAttributes: ['id', 'className', 'tagName', 'type', 'ariaLabel', 'alt', 'title']},
116+
web_sockets: {
117+
enabled: true
118+
}
116119
};
117120
window.NREUM.loader_config = {
118121
accountID: '1',

0 commit comments

Comments
 (0)