Skip to content

Commit

Permalink
Added query selector classes, fixed some recurring bugs (#314)
Browse files Browse the repository at this point in the history
* Added new selector classes LoggerEngineDataSelector and LogManagementDataSelector to centralize (almost) all queries

* Added LoggerCache class for centralizing transaction caching

* Added LogViewerController.cls to use within logViewer LWC and removed Logger.getLog()

* Eliminated layer-specific test suites within core - as of v4.7.1, the tests are super fast anyway, so the LoggerCore test suite covers everything + makes maintenance easier

* Deleted some deprecated LoggerParameter__mdt records - these were deprecated in v4.7.1, but I forgot to remove them from the repo

* Possibly fixed an issue discussed in #310 by reverting to only using a UUID for the transaction ID (instead of using System.Request.getCurrent().getRequestId())

* Hopefully fixed #276 (again) by moving when an email is added to the constant SENT_EMAILS
Scratch orgs also can't have deliverability disabled (very frustrating), so I also separately changed email deliverability to 'System Email Only' in the pkg demo org that's used in the pipeline, which should help ensure everything is working going forward 🤞

* Added a missing CMDT record for the async failures plugin, created a new package version

* Added missing access to the class LoggerSObjectMetadata in perm sets LoggerAdmin and LoggerLogViewer, moved LoggerLogCreator perm set back to being part of the logger-engine layer

* Fixed #313 by switching to using Logger's txn ID + an incremented counter for dynamically creating unique usernames during tests

* Fixed #219 (again) - it seems like the original solution recently stopped working due to a change in some orgs of the value used for the Guester User LIcense field on the UserLicense object. I've switched to instead using the User Type (UserInfo.getUserType()), which seems to be a more stable option that's less likely to change
- I tried to find an option that didn't rely on a hardcoded String, but so far, have not found any other way to determine it

* Fixed a test that failed when running in a namespaced org

* Enabled running of tests in the pkg demo org within the pipeline, tweaked a few tests that failed only in the pkg demo org
  • Loading branch information
jongpie authored May 23, 2022
1 parent 7c6f49c commit c866d36
Show file tree
Hide file tree
Showing 68 changed files with 1,988 additions and 547 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,9 @@ jobs:
- name: 'Create & Install Package Version'
run: npx pwsh ./scripts/build/create-and-install-package-version.ps1 -targetpackagealias '"Nebula Logger - Core"' -targetreadme ./README.md -targetusername nebula-logger-package-demo

- name: 'Run Apex Tests'
run: npm run test:apex:without-coverage -- --targetusername nebula-logger-package-demo

- name: 'Commit New Package Version'
run: |
git config --local user.email "[email protected]"
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@

Designed for Salesforce admins, developers & architects. A robust logger for Apex, Lightning Components, Flow, Process Builder & Integrations.

## Unlocked Package - v4.7.2
## Unlocked Package - v4.7.3

[![Install Unlocked Package in a Sandbox](./images/btn-install-unlocked-package-sandbox.png)](https://test.salesforce.com/packaging/installPackage.apexp?p0=04t5Y0000015lhdQAA)
[![Install Unlocked Package in Production](./images/btn-install-unlocked-package-production.png)](https://login.salesforce.com/packaging/installPackage.apexp?p0=04t5Y0000015lhdQAA)
[![Install Unlocked Package in a Sandbox](./images/btn-install-unlocked-package-sandbox.png)](https://test.salesforce.com/packaging/installPackage.apexp?p0=04t5Y0000015liHQAQ)
[![Install Unlocked Package in Production](./images/btn-install-unlocked-package-production.png)](https://login.salesforce.com/packaging/installPackage.apexp?p0=04t5Y0000015liHQAQ)
[![View Documentation](./images/btn-view-documentation.png)](https://jongpie.github.io/NebulaLogger/)

## Managed Package - v4.7.0
Expand Down
4 changes: 2 additions & 2 deletions docs/apex/Log-Management/LogEntryEventHandler.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ String containing the release version.

### Methods

#### `getSObjectType()``SObjectType`
#### `getSObjectType()``Schema.SObjectType`

Returns SObject Type that the handler is responsible for processing

##### Return

**Type**

SObjectType
Schema.SObjectType

**Description**

Expand Down
4 changes: 2 additions & 2 deletions docs/apex/Log-Management/LogEntryHandler.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ Manages setting fields on `LogEntry__c` before insert & before update

### Methods

#### `getSObjectType()``SObjectType`
#### `getSObjectType()``Schema.SObjectType`

Returns SObject Type that the handler is responsible for processing

##### Return

**Type**

SObjectType
Schema.SObjectType

**Description**

Expand Down
4 changes: 2 additions & 2 deletions docs/apex/Log-Management/LogEntryTagHandler.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ Handles trigger events for the `LogEntryTag__c` object

### Methods

#### `getSObjectType()``SObjectType`
#### `getSObjectType()``Schema.SObjectType`

Returns SObject Type that the handler is responsible for processing

##### Return

**Type**

SObjectType
Schema.SObjectType

**Description**

Expand Down
4 changes: 2 additions & 2 deletions docs/apex/Log-Management/LogHandler.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ Manages setting fields on `Log__c` before insert & before update

### Methods

#### `getSObjectType()``SObjectType`
#### `getSObjectType()``Schema.SObjectType`

Returns SObject Type that the handler is responsible for processing

##### Return

**Type**

SObjectType
Schema.SObjectType

**Description**

Expand Down
Loading

0 comments on commit c866d36

Please sign in to comment.