Skip to content

Commit 826166f

Browse files
authored
Bugfix: handle dumb breaking platform change for verified email domains (#973)
* Updated LoggerEmailSender_Tests to first update the current user's email address to be a (fake) gmail.com address to avoid issues with the new & breaking-change that requires most email domains to be verified (even in tests)
1 parent 91518a0 commit 826166f

File tree

6 files changed

+18
-11
lines changed

6 files changed

+18
-11
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55

66
The most robust observability solution for Salesforce experts. Built 100% natively on the platform, and designed to work seamlessly with Apex, Lightning Components, Flow, OmniStudio, and integrations.
77

8-
## Unlocked Package - v4.17.3
8+
## Unlocked Package - v4.17.4
99

10-
[![Install Unlocked Package in a Sandbox](./images/btn-install-unlocked-package-sandbox.png)](https://test.salesforce.com/packaging/installPackage.apexp?p0=04tg70000001IMHAA2)
11-
[![Install Unlocked Package in Production](./images/btn-install-unlocked-package-production.png)](https://login.salesforce.com/packaging/installPackage.apexp?p0=04tg70000001IMHAA2)
10+
[![Install Unlocked Package in a Sandbox](./images/btn-install-unlocked-package-sandbox.png)](https://test.salesforce.com/packaging/installPackage.apexp?p0=04tg70000004jmXAAQ)
11+
[![Install Unlocked Package in Production](./images/btn-install-unlocked-package-production.png)](https://login.salesforce.com/packaging/installPackage.apexp?p0=04tg70000004jmXAAQ)
1212
[![View Documentation](./images/btn-view-documentation.png)](https://github.com/jongpie/NebulaLogger/wiki)
1313

14-
`sf package install --wait 20 --security-type AdminsOnly --package 04tg70000001IMHAA2`
14+
`sf package install --wait 20 --security-type AdminsOnly --package 04tg70000004jmXAAQ`
1515

1616
---
1717

nebula-logger/core/main/logger-engine/classes/Logger.cls

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
global with sharing class Logger {
1616
// There's no reliable way to get the version number dynamically in Apex
1717
@TestVisible
18-
private static final String CURRENT_VERSION_NUMBER = 'v4.17.3';
18+
private static final String CURRENT_VERSION_NUMBER = 'v4.17.4';
1919
private static final System.LoggingLevel FALLBACK_LOGGING_LEVEL = System.LoggingLevel.DEBUG;
2020
private static final List<LogEntryEventBuilder> LOG_ENTRIES_BUFFER = new List<LogEntryEventBuilder>();
2121
private static final String MISSING_SCENARIO_ERROR_MESSAGE = 'No logger scenario specified. A scenario is required for logging in this org.';

nebula-logger/core/main/logger-engine/lwc/logger/loggerService.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import LoggerServiceTaskQueue from './loggerServiceTaskQueue';
1010
import getSettings from '@salesforce/apex/ComponentLogger.getSettings';
1111
import saveComponentLogEntries from '@salesforce/apex/ComponentLogger.saveComponentLogEntries';
1212

13-
const CURRENT_VERSION_NUMBER = 'v4.17.3';
13+
const CURRENT_VERSION_NUMBER = 'v4.17.4';
1414

1515
const CONSOLE_OUTPUT_CONFIG = {
1616
messagePrefix: `%c Nebula Logger ${CURRENT_VERSION_NUMBER} `,

nebula-logger/core/tests/log-management/classes/LoggerEmailSender_Tests.cls

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
//------------------------------------------------------------------------------------------------//
55

66
@SuppressWarnings('PMD.MethodNamingConventions, PMD.PropertyNamingConventions')
7-
@IsTest(IsParallel=true)
7+
@IsTest(IsParallel=false)
88
private class LoggerEmailSender_Tests {
99
private static final Boolean IS_EMAIL_DELIVERABILITY_ENABLED {
1010
get {
@@ -24,6 +24,12 @@ private class LoggerEmailSender_Tests {
2424
static {
2525
// Don't use the org's actual custom metadata records when running tests
2626
LoggerConfigurationSelector.useMocks();
27+
28+
// Salesforce now sends email only from verified domains, with a few exceptions for domains like gmail.com & hotmail.com
29+
// To avoid the error "INSUFFICIENT_ACCESS_OR_READONLY, We can't send your email because your email address domain isn't verified.",
30+
// a fake gmail.com address is used on the current user.
31+
// Docs: https://help.salesforce.com/s/articleView?id=xcloud.security_user_email_verification_substitute_domain.htm&type=5
32+
update new Schema.User(Id = System.UserInfo.getUserId(), Email = 'nebula.logger.testing.fake@gmail.com');
2733
}
2834

2935
@IsTest

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nebula-logger",
3-
"version": "4.17.3",
3+
"version": "4.17.4",
44
"description": "The most robust logger for Salesforce. Works with Apex, Lightning Components, Flow, Process Builder & Integrations. Designed for Salesforce admins, developers & architects.",
55
"author": "Jonathan Gillespie",
66
"license": "MIT",

sfdx-project.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
"path": "./nebula-logger/core",
1010
"definitionFile": "./config/scratch-orgs/base-scratch-def.json",
1111
"scopeProfiles": true,
12-
"versionNumber": "4.17.3.NEXT",
13-
"versionName": "relatedLogEntries LWC Improvements",
14-
"versionDescription": "Improved relatedLogEntries LWC so it queries & finds even more LogEntry__c records, added support for picklist labels, improved layout so it visually better aligns with the appearance of standard related lists",
12+
"versionNumber": "4.17.4.NEXT",
13+
"versionName": "LoggerEmailSender_Tests Fix for New Platform Requirement of Verified Email Domains",
14+
"versionDescription": "Updated LoggerEmailSender_Tests to first update the current user's email address to be a (fake) gmail.com address to avoid issues with the new & breaking-change that requires most email domains to be verified (even in tests)",
1515
"postInstallUrl": "https://github.com/jongpie/NebulaLogger/wiki",
1616
"releaseNotesUrl": "https://github.com/jongpie/NebulaLogger/releases",
1717
"unpackagedMetadata": {
@@ -225,6 +225,7 @@
225225
"Nebula Logger - Core@4.17.1-bugfix:-allowing-to-log-sobject-without-id-field": "04tg7000000157JAAQ",
226226
"Nebula Logger - Core@4.17.2-bugfix:-modal-close-buttons-not-rendered-correctly": "04tg700000015gnAAA",
227227
"Nebula Logger - Core@4.17.3-relatedlogentries-lwc-improvements": "04tg70000001IMHAA2",
228+
"Nebula Logger - Core@4.17.4-loggeremailsender_tests-fix-for-new-platform-requirement-of-verified-email-domains": "04tg70000004jmXAAQ",
228229
"Nebula Logger - Core Plugin - Async Failure Additions": "0Ho5Y000000blO4SAI",
229230
"Nebula Logger - Core Plugin - Async Failure Additions@1.0.0": "04t5Y0000015lhiQAA",
230231
"Nebula Logger - Core Plugin - Async Failure Additions@1.0.1": "04t5Y0000015lhsQAA",

0 commit comments

Comments
 (0)