Skip to content

Commit

Permalink
fix: increase stability in K8 copyTo, copyFrom, and execContainer by …
Browse files Browse the repository at this point in the history
…reducing backpressure (#684)

Signed-off-by: Jeromy Cannon <[email protected]>
  • Loading branch information
jeromy-cannon authored Oct 11, 2024
1 parent 7be759d commit 2a8fc4d
Show file tree
Hide file tree
Showing 3 changed files with 204 additions and 141 deletions.
9 changes: 7 additions & 2 deletions src/commands/node.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -820,8 +820,13 @@ export class NodeCommand extends BaseCommand {
subTasks.push({
title: `Copy local build to Node: ${chalk.yellow(nodeAlias)} from ${localDataLibBuildPath}`,
task: async () => {
this.logger.debug(`Copying build files to pod: ${podName} from ${localDataLibBuildPath}`)
await self.k8.copyTo(podName, constants.ROOT_CONTAINER, localDataLibBuildPath, `${constants.HEDERA_HAPI_PATH}`)
// filter the data/config and data/keys to avoid failures due to config and secret mounts
const filterFunction = (path, stat) => {
return !(path.includes('data/keys') || path.includes(
'data/config'))
}
await self.k8.copyTo(podName, constants.ROOT_CONTAINER, localDataLibBuildPath,
`${constants.HEDERA_HAPI_PATH}`, filterFunction)
const testJsonFiles = self.configManager.getFlag(flags.appConfig).split(',')
for (const jsonFile of testJsonFiles) {
if (fs.existsSync(jsonFile)) {
Expand Down
Loading

0 comments on commit 2a8fc4d

Please sign in to comment.