Fix CI: don't rely on request.MODULE_NAME in test harness module activation - #57
Conversation
ColdBox's BaseTestCase clears/bypasses the request scope between virtual-app reinits, so request.MODULE_NAME (set only in Application.cfc's pseudo-constructor) can be gone by the time cbLoadInterceptorHelpers fires on a reinit. This threw a GLOBAL BUNDLE EXCEPTION during the LocalDiskSpec reinit in CI, leaving the cbfs module never re-registered and cascading into "Instance not found: DiskService@cbfs" across almost every remaining spec/engine. Hardcode the module name instead, matching the literal Application.cfc already uses. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MY8vKDaEubRApVMT9BXSYk
boxlang@1 ColdBox ^8 Test Results 1 files ±0 5 suites ±0 6s ⏱️ ±0s For more details on these failures and errors, see this check. Results for commit 98c43c4. ± Comparison against base commit 19753f9. |
boxlang@1 ColdBox ^8 Test Results 1 files ±0 5 suites ±0 6s ⏱️ ±0s For more details on these failures and errors, see this check. Results for commit 37d83c7. ± Comparison against base commit f41955c. ♻️ This comment has been updated with latest results. |
boxlang@1 ColdBox be Test Results 1 files ±0 5 suites ±0 6s ⏱️ ±0s For more details on these failures and errors, see this check. Results for commit 37d83c7. ± Comparison against base commit f41955c. ♻️ This comment has been updated with latest results. |
adobe@2023 ColdBox be Test Results 1 files ±0 5 suites ±0 13s ⏱️ +4s For more details on these failures, see this check. Results for commit 37d83c7. ± Comparison against base commit f41955c. ♻️ This comment has been updated with latest results. |
adobe/s3mock renamed initialBuckets to COM_ADOBE_TESTING_S3MOCK_STORE_INITIAL_BUCKETS (deprecated in S3Mock 4.5.0, removed thereafter). Pulling the image unpinned meant CI silently stopped creating the cbfs-test bucket, so every S3 disk test failed immediately with "NoSuchBucket" regardless of any application code. Pin the image and use the current env var name. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MY8vKDaEubRApVMT9BXSYk
Fixes the cfformat check failure introduced by the recent cleanDirectory() arrow-function refactor. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MY8vKDaEubRApVMT9BXSYk
Ran the project's own cfformat tool (matching CI's format:check step) to fix the method-chain wrapping the previous semicolon fix didn't address. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MY8vKDaEubRApVMT9BXSYk
…mayer-8sjso9 # Conflicts: # models/providers/RamProvider.cfc # test-harness/config/Coldbox.cfc
* change to minor release due to return type changes createFromFile * Issue #41 - upload now returns file object * bump action versions * Version bump [ci skip] * add boxlang to matrix * fix misspelled module name in server-boxlang@1.json * ci: enable workflow dispatch for triggering boxlang tests and reinstall commandbox-boxlang * ci: use ubuntu-24.04 runner * fix version mistake * fix wrong matrix variable name * boxlang certs * s3sdk * make server configs unique * BL compat testing updates * Apply cfformat changes * readme updates * fixes for env not being sourced in for S3 mock * fix unclosed quote * try pinning commandbox version * manually remove coldbox virtual app as the subsequent tests are not loading coldbox correctly * Apply cfformat changes * try re-creating virtual app * Remove DiskServiceSpec until COLDBOX-1294 is fixed * add opens and jre versions * remove lucee 6 from non-experimental * Update Router.cfc * Update server-boxlang-cfml@1.json * remove unnecessary empty bytes write * revert BL tests to be until 1.7 is out * bump coldbox version and BL stable version * update workflows to use latest updates * add latest adobe and boxlang prime * change default acl due to aws issues * this should be fixed * all tests are green now * Apply cfformat changes * more updates * update lucee * aws issue * adding some adobe issues * jre 21 * more updates * issues boxlang prime * more issue updates * Apply cfformat changes * more fixes * cb8 + * bump s3sdk * Fix CI: don't rely on request.MODULE_NAME in test harness module activation (#57) * fix: don't rely on request.MODULE_NAME in test harness module activation ColdBox's BaseTestCase clears/bypasses the request scope between virtual-app reinits, so request.MODULE_NAME (set only in Application.cfc's pseudo-constructor) can be gone by the time cbLoadInterceptorHelpers fires on a reinit. This threw a GLOBAL BUNDLE EXCEPTION during the LocalDiskSpec reinit in CI, leaving the cbfs module never re-registered and cascading into "Instance not found: DiskService@cbfs" across almost every remaining spec/engine. Hardcode the module name instead, matching the literal Application.cfc already uses. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MY8vKDaEubRApVMT9BXSYk * fix: use current S3Mock env var to seed the initial test bucket adobe/s3mock renamed initialBuckets to COM_ADOBE_TESTING_S3MOCK_STORE_INITIAL_BUCKETS (deprecated in S3Mock 4.5.0, removed thereafter). Pulling the image unpinned meant CI silently stopped creating the cbfs-test bucket, so every S3 disk test failed immediately with "NoSuchBucket" regardless of any application code. Pin the image and use the current env var name. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MY8vKDaEubRApVMT9BXSYk * fix: add missing semicolon in RamProvider cleanDirectory closure Fixes the cfformat check failure introduced by the recent cleanDirectory() arrow-function refactor. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MY8vKDaEubRApVMT9BXSYk * style: apply cfformat to RamProvider.cfc Ran the project's own cfformat tool (matching CI's format:check step) to fix the method-chain wrapping the previous semicolon fix didn't address. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MY8vKDaEubRApVMT9BXSYk --------- Co-authored-by: Claude <noreply@anthropic.com> * performance tuning * more fine tuning for tests * Apply cfformat changes * oops --------- Co-authored-by: Github Actions <info@ortussolutions.com> Co-authored-by: Oscar Tisnado <68830577+otisnado@users.noreply.github.com> Co-authored-by: Luis Majano <lmajano@gmail.com> Co-authored-by: jclausen <5255645+jclausen@users.noreply.github.com> Co-authored-by: lmajano <137111+lmajano@users.noreply.github.com> Co-authored-by: Claude <noreply@anthropic.com>
Summary
CI was failing on every engine (
lucee@6,adobe@2023,adobe@2025,boxlang@1,boxlang-cfml@1) and every ColdBox version (^8andbe) with cascadingInstance not found: 'DiskService@cbfs'errors (166 of 193 specs erroring). Root cause traced from the CI logs:DiskServiceSpecruns first and passes.LocalDiskSpecruns next, triggering a ColdBox reinit (this.loadColdbox = true). This throws aGLOBAL BUNDLE EXCEPTION:key [MODULE_NAME] doesn't exist in the request scope, fromtest-harness/config/Coldbox.cfc'scbLoadInterceptorHelpers, which doesregisterAndActivateModule(moduleName = request.MODULE_NAME, ...).request.MODULE_NAMEis only ever set inApplication.cfc's pseudo-constructor (a single physical request). ColdBox'sBaseTestCaseclears/bypasses therequestscope between virtual-app reinits (itsreset()/beforeTests()machinery), so that key is gone by the time this interceptor fires again onLocalDiskSpec's reinit — this is inherent ColdBox test-harness isolation behavior, not new/broken cbfs code.cbfsnever gets re-activated, and every subsequent bundle (S3DiskSpec,RamDiskSpec,ModuleIntegrationSpec) fails to resolveDiskService@cbfs.Fix
Hardcode the module name in
cbLoadInterceptorHelpersinstead of reading it from the volatilerequestscope, matching the literalApplication.cfcalready uses (request.MODULE_NAME = "cbfs").Test plan
🤖 Generated with Claude Code
https://claude.ai/code/session_01MY8vKDaEubRApVMT9BXSYk
Generated by Claude Code