Skip to content

fix: action module fetching logic to resolve correct module IDs#1340

Open
kushalshit27 wants to merge 4 commits intomasterfrom
DXCDT-1578-issue-1338
Open

fix: action module fetching logic to resolve correct module IDs#1340
kushalshit27 wants to merge 4 commits intomasterfrom
DXCDT-1578-issue-1338

Conversation

@kushalshit27
Copy link
Copy Markdown
Contributor

@kushalshit27 kushalshit27 commented Mar 27, 2026

🔧 Changes

  • Fix always fetching modules from the API — previously, if actionModules were present in the local assets (e.g. loaded from directory/YAML config), the handler would use those local module objects directly instead of fetching from the Auth0 Management API. Local config module objects do not carry id fields, causing module_id and module_version_id to be set to incorrect or empty values when deploying actions that reference action modules.

📚 References

🔬 Testing

  • New unit test added

📝 Checklist

  • All new/changed/fixed functionality is covered by tests (or N/A)
  • I have added documentation for all new/changed functionality (or N/A)

- src/tools/auth0/handlers/actions.ts: simplify module fetching logic by removing redundant checks for actionModules
- test/tools/auth0/handlers/actions.tests.js: add test to ensure modules are fetched from API even when actionModules are provided
@kushalshit27 kushalshit27 marked this pull request as ready for review March 27, 2026 11:23
@kushalshit27 kushalshit27 requested a review from a team as a code owner March 27, 2026 11:23
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.23%. Comparing base (07e8731) to head (18a94b9).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1340      +/-   ##
==========================================
+ Coverage   80.18%   80.23%   +0.05%     
==========================================
  Files         152      152              
  Lines        6101     6102       +1     
  Branches     1247     1247              
==========================================
+ Hits         4892     4896       +4     
+ Misses        693      692       -1     
+ Partials      516      514       -2     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

[Bug] deploying action modules

2 participants