Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cli: send bot config to backend in botonic deploy #BLT-1008 #2884

Merged

Conversation

Iru89
Copy link
Contributor

@Iru89 Iru89 commented Aug 7, 2024

Description

When deploying a bot the cli will get bot config from the @Botonic packages installed, npm and node version .
This config is send to backend in deploy endpoint.

Context

This config will be used to read bot information from the flow builder frontend.

Approach taken / Explain the design

PRs merged in this PR:

@Iru89 Iru89 marked this pull request as ready for review August 7, 2024 14:37
Copy link

github-actions bot commented Aug 7, 2024

Test Results

30 tests  ±0   26 ✅ ±0   35s ⏱️ ±0s
 6 suites ±0    0 💤 ±0 
 1 files   ±0    4 ❌ ±0 

For more details on these failures, see this check.

Results for commit 2099368. ± Comparison against base commit fd86324.

♻️ This comment has been updated with latest results.

@Iru89 Iru89 changed the title cli: create a JSON with config file on botonic deploy cli: create a JSON with config file on botonic deploy #BLT-1008 Aug 7, 2024
packages/botonic-cli/src/util/bot-config-json.ts Outdated Show resolved Hide resolved
packages/botonic-cli/src/util/bot-config-json.ts Outdated Show resolved Hide resolved
packages/botonic-cli/src/util/bot-config-json.ts Outdated Show resolved Hide resolved
packages/botonic-cli/src/util/bot-config-json.ts Outdated Show resolved Hide resolved
packages/botonic-cli/src/util/bot-config-json.ts Outdated Show resolved Hide resolved
Comment on lines 85 to 87
const exec = util.promisify(childProcess.exec)
const { stdout } = await exec(command)
return stdout.trim()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we try with execSync?

const { execSync } = require('child_process');

try {
  const stdout = execSync(command, { encoding: 'utf-8' });
  console.log(stdout);
} catch (error) {
  console.error('Error:', error);
}

@Iru89 Iru89 changed the title cli: create a JSON with config file on botonic deploy #BLT-1008 cli: pass bot config in botonic deploy #BLT-1008 Aug 27, 2024
@Iru89 Iru89 changed the title cli: pass bot config in botonic deploy #BLT-1008 cli: send bot config to backend in botonic deploy #BLT-1008 Aug 27, 2024
@Iru89 Iru89 force-pushed the BLT-1008-create-json-with-config-file-on-botonic-deploy branch from 301f823 to 9845ac8 Compare September 4, 2024 14:47
@Iru89 Iru89 force-pushed the BLT-1008-create-json-with-config-file-on-botonic-deploy branch from 1a74c86 to 2099368 Compare October 1, 2024 15:19
@Iru89 Iru89 merged commit e08d09f into master-lts Oct 1, 2024
1 check passed
@Iru89 Iru89 deleted the BLT-1008-create-json-with-config-file-on-botonic-deploy branch October 1, 2024 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants