Skip to content

Commit 2a8fc4d

Browse files
fix: increase stability in K8 copyTo, copyFrom, and execContainer by reducing backpressure (#684)
Signed-off-by: Jeromy Cannon <[email protected]>
1 parent 7be759d commit 2a8fc4d

File tree

3 files changed

+204
-141
lines changed

3 files changed

+204
-141
lines changed

src/commands/node.mjs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -820,8 +820,13 @@ export class NodeCommand extends BaseCommand {
820820
subTasks.push({
821821
title: `Copy local build to Node: ${chalk.yellow(nodeAlias)} from ${localDataLibBuildPath}`,
822822
task: async () => {
823-
this.logger.debug(`Copying build files to pod: ${podName} from ${localDataLibBuildPath}`)
824-
await self.k8.copyTo(podName, constants.ROOT_CONTAINER, localDataLibBuildPath, `${constants.HEDERA_HAPI_PATH}`)
823+
// filter the data/config and data/keys to avoid failures due to config and secret mounts
824+
const filterFunction = (path, stat) => {
825+
return !(path.includes('data/keys') || path.includes(
826+
'data/config'))
827+
}
828+
await self.k8.copyTo(podName, constants.ROOT_CONTAINER, localDataLibBuildPath,
829+
`${constants.HEDERA_HAPI_PATH}`, filterFunction)
825830
const testJsonFiles = self.configManager.getFlag(flags.appConfig).split(',')
826831
for (const jsonFile of testJsonFiles) {
827832
if (fs.existsSync(jsonFile)) {

0 commit comments

Comments
 (0)