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

Fixed an issue where saving Config Overrides without all 3 environments set would crash the extension. #369

Merged
merged 3 commits into from
Jan 9, 2024

Conversation

carterworks
Copy link
Contributor

Description

The <Overrides/> React component was looking for the datastreamId for every config overrides environment, even if that environment had no settings. If an environment had no settings, then it would be looking for a datastreamId on undefined, which crashes the extension.

Related Issue

PDCL-11375: Setting Third Party Sync ID and saving break the extension

Motivation and Context

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Improvement (non-breaking change which does not add functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA or I'm an Adobe employee.
  • I have made any necessary test changes and all tests pass.
  • I have run the Sandbox successfully.
  • I've updated the schema in extension.json or no changes are necessary.
  • My change requires a change to the documentation.

@carterworks carterworks self-assigned this Nov 28, 2023
@carterworks carterworks changed the title Fixed an issue where saving Fixed an issue where saving Config Overrides without all 3 environments set would crash the extension. Nov 28, 2023
@jfkhoury
Copy link
Contributor

Nice. Is this unit testable?

@carterworks
Copy link
Contributor Author

Nice. Is this unit testable?

Not really, since we haven't don't do unit tests on React components right now. We could probably write a functional test around it though.

Copy link
Contributor

@jonsnyder jonsnyder left a comment

Choose a reason for hiding this comment

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

I'd like to see a functional test that reproduces this bug.

@carterworks
Copy link
Contributor Author

I'd like to see a functional test that reproduces this bug.

@jonsnyder and @ninaceban
I have written a functional test to repro the bug. Please re-review.

@jonsnyder jonsnyder merged commit 8e63dab into main Jan 9, 2024
4 of 5 checks passed
@jonsnyder jonsnyder deleted the fix-config-overrides-crash-extension branch January 9, 2024 00:02
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.

None yet

3 participants