You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current Behavior:
Running mcdev cdp results in the following error message:
Could not find the market 'M' in your configuration file.
I've been investigating this repository for about 3 hours and may not fully understand the code structure. I encountered this issue while setting up mcdev today, so please correct me if my interpretation is incorrect.
Observed Issue:
The issue appears to stem from the handling of market configuration data in the function buildDeltaDefinitions within devops.js.
In the code:
Line 423: const sourceMarket = Object.values(properties.marketList[sourceMlName])[0];
It appears that sourceMarket is assigned a string value.
Line 468: await Builder.buildTemplate(bu, type, keyArr, sourceMarket);
Here, the string sourceMarket is passed to the buildTemplate function.
Within lib/Builder.js, in the buildTemplate function, there’s a loop:
for(constmarketofmarketArr){if(Util.checkMarket(market,properties)){Object.assign(templateVariables,properties.markets[market]);}else{// do not execute the rest of this method if a market was invalidreturn;}}
The code expects marketArr to be an array. However, since sourceMarket is a string, this discrepancy causes Util.checkMarket to return false for any market name(in my case it starts with 'M') leading to a failure in template generation.
Impact:
Template files are not generated as expected, preventing subsequent bdp commands from executing successfully.
Potential Cause:
This behavior may have been introduced in this PR, where handling for marketArr does not account for string inputs in cases like mine.
Expected Behavior
No response
Steps To Reproduce
Go to '...'
Click on '....'
Run '...'
See error...
Version
7.4.4
Environment
OS: MacOS
Node: 20.11.1
npm: 10.8.3
Participation
I am willing to submit a pull request for this issue.
Additional comments
No response
The text was updated successfully, but these errors were encountered:
Is there an existing issue for this?
Current Behavior
Current Behavior:
Running
mcdev cdp
results in the following error message:I've been investigating this repository for about 3 hours and may not fully understand the code structure. I encountered this issue while setting up
mcdev
today, so please correct me if my interpretation is incorrect.Observed Issue:
The issue appears to stem from the handling of
market
configuration data in the functionbuildDeltaDefinitions
withindevops.js
.In the code:
Line 423:
const sourceMarket = Object.values(properties.marketList[sourceMlName])[0];
It appears that
sourceMarket
is assigned a string value.Line 468:
await Builder.buildTemplate(bu, type, keyArr, sourceMarket);
Here, the string
sourceMarket
is passed to thebuildTemplate
function.Within
lib/Builder.js
, in thebuildTemplate
function, there’s a loop:The code expects
marketArr
to be an array. However, since sourceMarket is a string, this discrepancy causes Util.checkMarket to return false for any market name(in my case it starts with 'M') leading to a failure in template generation.Impact:
bdp
commands from executing successfully.Potential Cause:
This behavior may have been introduced in this PR, where handling for
marketArr
does not account for string inputs in cases like mine.Expected Behavior
No response
Steps To Reproduce
Version
7.4.4
Environment
Participation
Additional comments
No response
The text was updated successfully, but these errors were encountered: