Skip to content

fix: protect null values for license config checks, consider cred type when checking for dupe sdks - #55

Merged
MichaelGoberling merged 2 commits into
mainfrom
fix/dupe-sdk-codes-and-license-configs
Mar 30, 2026
Merged

MichaelGoberling merged 2 commits into
mainfrom
fix/dupe-sdk-codes-and-license-configs

Conversation

@MichaelGoberling

Copy link
Copy Markdown
Contributor
  • Do a null check on license configs property from dev console before trying to set when subscribing
  • Handle duplicate sdk codes (both adobeid and entp) when trying to set license configs

@codecov

codecov Bot commented Mar 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR hardens API subscription configuration against null/ambiguous service catalog entries by (1) guarding against properties: null when filtering license configs and (2) disambiguating org-catalog service definitions by service type (entp vs adobeid) when the same code exists under multiple credential types.

Changes:

  • Pass serviceType into getServicesInfo and use it to select the correct org-catalog row when a service code appears under multiple types.
  • Add a null-guard before writing orgServiceDefinition.properties.licenseConfigs when properties is null.
  • Add tests covering properties: null and dual-type catalog scenarios.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
src/lib/configure-apis.js Adds serviceType disambiguation when resolving service definitions and guards against null properties during license config filtering.
test/lib/configure-apis.test.js Adds regression tests for null properties and for services that appear under both adobeid and entp.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread test/lib/configure-apis.test.js Outdated
Comment thread test/lib/configure-apis.test.js Outdated
Comment thread src/lib/configure-apis.js Outdated

@purplecabbage purplecabbage left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

copilot has some testing nits to look at

@MichaelGoberling
MichaelGoberling merged commit e86234b into main Mar 30, 2026
9 checks passed
@MichaelGoberling
MichaelGoberling deleted the fix/dupe-sdk-codes-and-license-configs branch March 30, 2026 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants