Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spring '22 release - v4.7.0 #274

Merged
merged 73 commits into from
Mar 11, 2022
Merged

Spring '22 release - v4.7.0 #274

merged 73 commits into from
Mar 11, 2022

Conversation

jongpie
Copy link
Owner

@jongpie jongpie commented Jan 20, 2022

New Features for LoggerSettings__c

  • Closed Toggle to not save logs to the object and write to Apex Debug logs #258 by adding 2 new LoggerSettings__c fields to provide control over platform events & custom objects
    1. IsSavingEnabled__c - when disabled, any calls to Logger.saveLog() are ignored. This allows you to still use Logger for outputting Apex debug statements, but it completely disables saving/publishing of the platform event LogEntryEvent__e.
    2. IsPlatformEventStorageEnabled__c - this fields controls if LogEntryEvent__e platform events are transformed & stored in the custom objects Log__c and LogEntry__c (when IsSavingEnabled__c == true).
  • Closed Add method Logget.getScenario() and new DefaultLogScenario__c field on LoggerSettings__c #279 by adding some new features for "log scenarios"
    • Configure a default scenario by setting the new field LoggerSettings__c.DefaultLogScenario__c
    • Retrieve the current transaction's scenario in Apex using new method Logger.getScenario()
  • Added the ability to assign a default OwnerId for new Log__c records via a new settings field, LoggerSettings__c.DefaultLogOwner__c. This is useful for orgs that assign/manage logs for triage purposes (often done in production environments for managing logs with errors & warnings) and want more control over who is assigned as the log owner. The setting can be configured with 1 of 5 possible values
    1. Blank (null) - this will provide the same behavior that has existed in previous releases - the Log__c record will simply be assigned to the user that generated the log
    2. User ID
    3. Username
    4. Queue ID
    5. Queue DeveloperName
  • Renamed LoggerSettings__c field StripInaccessibleRecordFields__c to IsRecordFieldStrippingEnabled__c for a consistent field naming convention
  • Updated lwc loggerSettings and logEntryEventStream to support using a namespace when running in the managed package by introducing a new Apex class, LoggerSObjectMetadata. This class provides LWCs with info about SObject, SObjectField, and PicklistEntry metadata (including details about a namespace, when applicable).
  • Bumped all metadata to API v54.0 (Spring '22 release)
  • Added picklist values in Log__c.ApiVersion__c for all 3 API versions in calendar year 2022
  • Closed Add wiki for documentation #15 and closed Logger in Flow questions #195 by expanding wiki content. Changes for the wiki are managed in a separate repo, so this PR doesn't contain the changes, but the wiki updates have been done in parallel

image

New Features for Log__c Quick Action "Open Viewer" (formerly "View JSON")

  • Renamed the lwc logJSON back to logViewer. This change only impacts the unlocked package.
  • Renamed the quick action "View JSON" (again) to "Open Viewer"
  • Enhanced logViewer lwc to display tabs for both JSON (existing) and log file (new). The new 'log file' view displays the log's related log entries in a streamlined view that includes each entry's timestamp, logging level, message, and stack trace
  • Added a new download button to logViewer to export the selected content to a file

image

Bugfixes

Pipeline / DevOps

  • Updated pipeline to use JWT bearer flow + sfdx bot user for dev hub auth
  • Updated the Experience Cloud scratch definition to use Spanish as the language/Spain as the country as another way to monitor/test for any language-related issues in the pipeline
  • Cleaned up some PMD rule suppressions
  • Added basic Experience Cloud site to the pipeline to provide a better method of testing Experience Cloud scenarios (the site is not included in the package itself - it's only used in the pipeline). Previously, the pipeline created an Experience Cloud site via the async function sfdx force:community:create + a 2 minute delay, but the async operation is inconsistent in how long it takes to complete. By deploying the site metadata in the pipeline, it becomes a synchronous operation, which should prevent some inconsistent pipeline failures.
  • Updated/added some devDependencies in package.json to handle some dependabot alerts
  • Closed Use the new package ancestor keywords when generating managed package versions #263 by adding "ancestorVersion": "HIGHEST" in the managed package's sfdx-project.json file

…le, using all possible translated names to ensure it works, regardless of the current user's specified language
…retrieving fields (including namespace) by creating new file loggerSettingsSchema.js file and adding new _loadField function to consolidate field describe & field value getters. Also improved error handling a bit - not all errors have error.body.message, some use error.message
…) - I'm not 100% sure that I want to use them, though I may re-add them later
@jongpie jongpie added Type: Bug Something isn't working cleanup Package Type: Managed Package Issues and enhancements that specifically apply to the managed package Package Type: Unlocked Package Issues and enhancements that specifically apply to the unlocked package Salesforce Release Dependency: v54.0 Spring '22 labels Jan 20, 2022
@jongpie jongpie changed the title Spring '22 release Spring '22 release - v4.7.0 Jan 20, 2022
…try> instead of just List<PicklistEntry>

I typically include the Schema namespace anyway, not sure why I didn't previously do so in this particular example
@jongpie jongpie had a problem deploying to Experience Cloud Scratch Org January 20, 2022 15:45 Failure
@jongpie jongpie temporarily deployed to Base Scratch Org January 20, 2022 20:23 Inactive
@jongpie jongpie had a problem deploying to Experience Cloud Scratch Org January 20, 2022 20:23 Failure
@jongpie jongpie force-pushed the spring-22-release branch 3 times, most recently from a4c2424 to bd5b4c2 Compare January 24, 2022 16:12
@jongpie jongpie had a problem deploying to Experience Cloud Scratch Org January 24, 2022 16:14 Failure
@jongpie jongpie force-pushed the spring-22-release branch from f669d59 to 573ccc0 Compare March 9, 2022 19:02
@jongpie jongpie temporarily deployed to Base Scratch Org March 9, 2022 19:05 Inactive
@jongpie jongpie temporarily deployed to Experience Cloud Scratch Org March 9, 2022 19:05 Inactive
@jongpie jongpie force-pushed the spring-22-release branch from 573ccc0 to 792f0a3 Compare March 9, 2022 19:19
@jongpie jongpie temporarily deployed to Experience Cloud Scratch Org March 9, 2022 19:22 Inactive
@jongpie jongpie temporarily deployed to Base Scratch Org March 9, 2022 19:22 Inactive
@jongpie jongpie temporarily deployed to Demo Org March 9, 2022 19:31 Inactive
@jongpie jongpie temporarily deployed to Demo Org March 9, 2022 19:31 Inactive
@jongpie jongpie force-pushed the spring-22-release branch from 1dca8da to 3e9b549 Compare March 9, 2022 22:46
@jongpie jongpie temporarily deployed to Base Scratch Org March 9, 2022 22:48 Inactive
@jongpie jongpie temporarily deployed to Experience Cloud Scratch Org March 9, 2022 22:48 Inactive
@jongpie jongpie temporarily deployed to Demo Org March 9, 2022 22:57 Inactive
@jongpie jongpie temporarily deployed to Base Scratch Org March 9, 2022 23:08 Inactive
@jongpie jongpie temporarily deployed to Experience Cloud Scratch Org March 9, 2022 23:08 Inactive
@jongpie jongpie temporarily deployed to Demo Org March 9, 2022 23:16 Inactive
@jongpie jongpie temporarily deployed to Demo Org March 9, 2022 23:16 Inactive
@jongpie jongpie force-pushed the spring-22-release branch from 735b7d0 to f6b95e2 Compare March 10, 2022 03:16
…ViewJSON" quickAction to "OpenViewer", and added tabs to logViewer lwc to provide tabs for both JSON (existing) and log file (new), plus a new download button to export the content to a file
@jongpie jongpie force-pushed the spring-22-release branch from f6b95e2 to 362681b Compare March 10, 2022 03:25
@jongpie jongpie temporarily deployed to Base Scratch Org March 10, 2022 03:27 Inactive
@jongpie jongpie temporarily deployed to Experience Cloud Scratch Org March 10, 2022 03:27 Inactive
@jongpie jongpie temporarily deployed to Demo Org March 10, 2022 03:35 Inactive
@jongpie jongpie temporarily deployed to Demo Org March 10, 2022 03:35 Inactive
actions-user and others added 2 commits March 10, 2022 03:43
…package versions can be upgraded, created new package versions for both the unlocked & managed packages
@codecov
Copy link

codecov bot commented Mar 11, 2022

Codecov Report

Merging #274 (362681b) into main (e0a5d6b) will decrease coverage by 0.48%.
The diff coverage is 91.14%.

❗ Current head 362681b differs from pull request most recent head efd2eb2. Consider uploading reports for the commit efd2eb2 to get more accurate results

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #274      +/-   ##
==========================================
- Coverage   95.80%   95.32%   -0.49%     
==========================================
  Files          30       33       +3     
  Lines        3173     3422     +249     
  Branches       63       85      +22     
==========================================
+ Hits         3040     3262     +222     
- Misses        132      156      +24     
- Partials        1        4       +3     
Flag Coverage Δ
Apex 96.27% <94.16%> (-0.05%) ⬇️
LWC 90.59% <89.56%> (-1.88%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...ain/logger-engine/classes/LogEntryEventBuilder.cls 96.29% <57.14%> (-0.22%) ⬇️
...re/main/configuration/classes/LoggerEmailUtils.cls 91.25% <75.00%> (-4.34%) ⬇️
...og-management/lwc/loggerSettings/loggerSettings.js 89.04% <85.56%> (-4.22%) ⬇️
...ore/main/log-management/lwc/logViewer/logViewer.js 86.76% <86.76%> (ø)
...ent/lwc/loggerSettings/loggerSettingsPageLayout.js 97.82% <97.82%> (ø)
...in/log-management/classes/LogEntryEventHandler.cls 98.29% <100.00%> (+0.04%) ⬆️
...re/main/log-management/classes/LogEntryHandler.cls 94.85% <100.00%> (-2.29%) ⬇️
...er/core/main/log-management/classes/LogHandler.cls 98.29% <100.00%> (+0.64%) ⬆️
...n/log-management/classes/LoggerSObjectMetadata.cls 100.00% <100.00%> (ø)
...og-management/classes/LoggerSettingsController.cls 98.05% <100.00%> (+0.75%) ⬆️
... and 7 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f190ab1...efd2eb2. Read the comment docs.

@jongpie jongpie merged commit 2b2fce1 into main Mar 11, 2022
@jongpie jongpie deleted the spring-22-release branch March 11, 2022 03:52
@jongpie jongpie added the Feature: Scenario-Based Logging Items related to Logger.setScenario(), LoggerScenarioRule__mdt, etc. label May 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup devops Items related to tooling, automation, and guidelines used for developing Nebula Logger Feature: Scenario-Based Logging Items related to Logger.setScenario(), LoggerScenarioRule__mdt, etc. Package Type: Managed Package Issues and enhancements that specifically apply to the managed package Package Type: Unlocked Package Issues and enhancements that specifically apply to the unlocked package Salesforce Release Dependency: v54.0 Spring '22 Type: Bug Something isn't working Type: Enhancement New feature or request
Projects
None yet
3 participants