Skip to content

Commit 832377e

Browse files
rjrudinSameeraPriyathamTadikonda
authored andcommitted
DHFPROD-4697: hubDeploy now generates metadata for mapping functions
1 parent e29de23 commit 832377e

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

marklogic-data-hub/src/main/java/com/marklogic/hub/dhs/DhsDeployer.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import com.marklogic.hub.DatabaseKind;
2121
import com.marklogic.hub.HubConfig;
2222
import com.marklogic.hub.deploy.HubAppDeployer;
23+
import com.marklogic.hub.deploy.commands.GenerateFunctionMetadataCommand;
2324
import com.marklogic.hub.dhs.installer.deploy.DeployHubQueryRolesetsCommand;
2425
import com.marklogic.hub.deploy.commands.HubDeployDatabaseCommandFactory;
2526
import com.marklogic.hub.deploy.commands.LoadUserArtifactsCommand;
@@ -178,6 +179,7 @@ protected List<Command> buildCommandsForDeveloper(HubConfig hubConfig) {
178179
LoadUserModulesCommand loadUserModulesCommand = new LoadUserModulesCommand(hubConfig);
179180
loadUserModulesCommand.setForceLoad(true);
180181
commands.add(loadUserModulesCommand);
182+
commands.add(new GenerateFunctionMetadataCommand(hubConfig, true));
181183

182184
commands.add(new DeployTemporalAxesCommand());
183185
commands.add(new DeployTemporalCollectionsCommand());

marklogic-data-hub/src/test/java/com/marklogic/hub/dhs/DeployAsDeveloperTest.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
import com.marklogic.hub.DatabaseKind;
1919
import com.marklogic.hub.HubConfig;
2020
import com.marklogic.hub.HubTestBase;
21+
import com.marklogic.hub.deploy.commands.GenerateFunctionMetadataCommand;
2122
import com.marklogic.hub.deploy.commands.LoadUserArtifactsCommand;
2223
import com.marklogic.hub.deploy.commands.LoadUserModulesCommand;
2324
import com.marklogic.hub.dhs.installer.deploy.DeployHubQueryRolesetsCommand;
@@ -171,6 +172,7 @@ public void copyStagingSslConfigToAppServices() {
171172
public void buildCommandList() {
172173
List<Command> commands = new DhsDeployer().buildCommandsForDeveloper(hubConfig);
173174
Collections.sort(commands, Comparator.comparing(Command::getExecuteSortOrder));
175+
174176
int index = 0;
175177
assertTrue(commands.get(index++) instanceof DeployHubQueryRolesetsCommand);
176178
assertTrue(commands.get(index++) instanceof DeployOtherDatabasesCommand);
@@ -184,8 +186,10 @@ public void buildCommandList() {
184186
assertTrue(commands.get(index++) instanceof DeployAlertConfigsCommand);
185187
assertTrue(commands.get(index++) instanceof DeployAlertActionsCommand);
186188
assertTrue(commands.get(index++) instanceof DeployAlertRulesCommand);
189+
assertTrue(commands.get(index++) instanceof GenerateFunctionMetadataCommand);
187190
assertTrue(commands.get(index++) instanceof DeployProtectedPathsCommand);
188-
assertEquals(13, commands.size(),
191+
192+
assertEquals(14, commands.size(),
189193
"As of ML 10.0-3, the granular privilege for indexes doesn't seem to work with XML payloads. " +
190194
"Bug https://bugtrack.marklogic.com/54231 has been created to track that. Thus, " +
191195
"DeployDatabaseFieldCommand cannot be included and ml-config/database-fields/final-database.xml " +

0 commit comments

Comments
 (0)