Skip to content

Bugfix for Name-Shadowing Issues with the Schema Namespace#608

Merged
jongpie merged 14 commits intomainfrom
bugfix/fully-qualified-schema-classes-for-name-shadowing
Jan 21, 2024
Merged

Bugfix for Name-Shadowing Issues with the Schema Namespace#608
jongpie merged 14 commits intomainfrom
bugfix/fully-qualified-schema-classes-for-name-shadowing

Conversation

@jongpie
Copy link
Copy Markdown
Owner

@jongpie jongpie commented Jan 21, 2024

Fixed #584 by switching to using fully-qualified Apex class references to several classes in the Schema namespace, like Schema.User, to avoid collision issues in orgs that use name-shadowing classes. These class references are now fully-qualified throughout the codebase

  • Schema.Account (these references are only used for tests & sample recipes, not in Nebula Logger's core code)
  • Schema.AuthSession
  • Schema.LoginHistory
  • Schema.Network
  • Schema.Organization
  • Schema.Profile
  • Schema.Topic
  • Schema.TopicAssignment
  • Schema.User

This is the same concept & approach as the changes made in v4.9.0, v4.9.4, and v4.9.6 to fully-qualify references to classes & enums in the System namespace.

…ces to 'Organization' to instead use 'Schema.Organization'
…ted all references to 'Topic' and 'TopicAssignment' to instead use 'Schema.Topic' and 'Schema.TopicAssignment'
…es to 'AuthSession' to instead use 'Schema.AuthSession'
…ces to 'LoginHistory' to instead use 'Schema.LoginHistory'
@jongpie jongpie added Type: Bug Something isn't working Layer: Log Management Items related to the custom objects & Logger Console app Layer: Logger Engine Items related to the core logging engine Package Type: Unlocked Package Issues and enhancements that specifically apply to the unlocked package labels Jan 21, 2024
@jongpie jongpie had a problem deploying to Experience Cloud Scratch Org January 21, 2024 18:28 — with GitHub Actions Failure
@jongpie jongpie had a problem deploying to Experience Cloud Scratch Org January 21, 2024 18:44 — with GitHub Actions Failure
@jongpie jongpie force-pushed the bugfix/fully-qualified-schema-classes-for-name-shadowing branch from 1129a12 to a9bd909 Compare January 21, 2024 18:59
@jongpie jongpie temporarily deployed to Base Scratch Org January 21, 2024 19:02 — with GitHub Actions Inactive
@jongpie jongpie had a problem deploying to Experience Cloud Scratch Org January 21, 2024 19:02 — with GitHub Actions Failure
@jongpie jongpie force-pushed the bugfix/fully-qualified-schema-classes-for-name-shadowing branch from a9bd909 to 635fc60 Compare January 21, 2024 19:24
@jongpie jongpie had a problem deploying to Experience Cloud Scratch Org January 21, 2024 19:28 — with GitHub Actions Failure
@jongpie jongpie force-pushed the bugfix/fully-qualified-schema-classes-for-name-shadowing branch from 635fc60 to e39decd Compare January 21, 2024 21:11
@jongpie jongpie had a problem deploying to Experience Cloud Scratch Org January 21, 2024 21:15 — with GitHub Actions Failure
@jongpie jongpie had a problem deploying to Experience Cloud Scratch Org January 21, 2024 21:25 — with GitHub Actions Failure
@jongpie jongpie temporarily deployed to Base Scratch Org January 21, 2024 21:25 — with GitHub Actions Inactive
@jongpie jongpie temporarily deployed to Base Scratch Org January 21, 2024 21:34 — with GitHub Actions Inactive
@jongpie jongpie temporarily deployed to Experience Cloud Scratch Org January 21, 2024 21:34 — with GitHub Actions Inactive
@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 21, 2024

Codecov Report

Attention: 5 lines in your changes are missing coverage. Please review.

Comparison is base (2735d4e) 95.69% compared to head (e39decd) 95.69%.

❗ Current head e39decd differs from pull request most recent head 278333d. Consider uploading reports for the commit 278333d to get more accurate results

Files Patch % Lines
...in/log-management/classes/LogEntryEventHandler.cls 63.63% 4 Missing ⚠️
...logger-engine/classes/LoggerEngineDataSelector.cls 90.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #608   +/-   ##
=======================================
  Coverage   95.69%   95.69%           
=======================================
  Files          48       48           
  Lines        5177     5178    +1     
=======================================
+ Hits         4954     4955    +1     
  Misses        223      223           
Flag Coverage Δ
Apex 95.69% <90.74%> (+<0.01%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jongpie jongpie merged commit 579286d into main Jan 21, 2024
@jongpie jongpie deleted the bugfix/fully-qualified-schema-classes-for-name-shadowing branch January 21, 2024 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Layer: Log Management Items related to the custom objects & Logger Console app Layer: Logger Engine Items related to the core logging engine Package Type: Unlocked Package Issues and enhancements that specifically apply to the unlocked package Type: Bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Installation fails

2 participants