-
Notifications
You must be signed in to change notification settings - Fork 11
fix: config update issues after update of helix-deploy #1589
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
Conversation
ESBuild (helix-deploy 13+) was bundling multiple copies of @adobe/spacecat-shared-data-access when nested dependencies (tier-client, scrape-client) pulled different versions. This caused EntityRegistry's static state to be duplicated, resulting in empty collections and "Cannot read properties of undefined" errors in production. Changes: - Add npm override to force single [email protected] version - Add AWS SDK packages as direct dependencies (helix-deploy externalizes @aws-sdk/* by default) - Add bundle tests to detect future duplication issues - Skip bundle tests by default (diagnostic tools) Root cause: EntityRegistry uses static class fields with
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
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 addresses a critical ESBuild bundling issue with helix-deploy 13+ where multiple copies of @adobe/spacecat-shared-data-access were being bundled due to nested dependencies pulling different versions. This caused production failures with EntityRegistry's static state being duplicated, resulting in "Cannot read properties of undefined" errors.
Key changes:
- Upgrade from gist-based helix-deploy to published version 13.2.0
- Add npm override to force single version of data-access (2.88.6)
- Introduce bundle testing infrastructure and diagnostic tests
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 16 comments.
Show a summary per file
| File | Description |
|---|---|
| package.json | Upgrades helix-deploy to 13.2.0, adds data-access version override (2.88.6), and introduces test:bundle and test:esbuild npm scripts |
| test/utils.js | New utility that conditionally loads bundled artifact or unbundled source based on HELIX_TEST_BUNDLE_NAME environment variable |
| test/index.test.js | Updates import to use test/utils.js instead of direct import from src/index.js for bundle testing compatibility |
| test/bundle-slack-audit.test.js | New diagnostic test suite for Slack audit commands that reproduces bundling issues; skipped by default with extensive debug logging |
| test/bundle-dataaccess-real.test.js | New diagnostic test that validates data-access initialization without mocks; skipped by default with extensive debug logging |
|
This PR will trigger a patch release when merged. |
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
## [1.265.1](v1.265.0...v1.265.1) (2025-12-01) ### Bug Fixes * **deps:** update adobe fixes ([#1593](#1593)) ([554050f](554050f))
## [1.265.2](v1.265.1...v1.265.2) (2025-12-01) ### Bug Fixes * config update issues after update of helix-deploy ([#1589](#1589)) ([1a58875](1a58875))
|
🎉 This PR is included in version 1.265.2 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Fix: Configuration Update Issues After Helix-Deploy Update
Problem
After upgrading to
@adobe/helix-deploy13.2.0 with ESBuild bundling, Configuration save operations via Slack commands failed withConditionalCheckFailedException.Root Cause
The issue was in
@adobe/spacecat-shared-data-accesswhereConfigurationCollection.create()used incorrect entity name:This caused
configurationIdto remain in the data, resulting in:Changes
Dependencies
@adobe/helix-deployfrom gist version to13.2.0(official release)@adobe/[email protected]- Critical to ensure all transitive dependencies use the same version, preventing ESBuild from bundling multiple copies which would cause duplicate code executionTest Infrastructure
test/utils.jsto support bundle testing - dynamically loads either bundled or source code based onHELIX_TEST_BUNDLE_NAMEtest:bundlenpm script for bundle-specific testingConfigurationandApiKeyentitiestest/setup-env.jsto properly load environment variables with override supportTesting