Skip to content

Commit

Permalink
Merge pull request #1168 from HubSpot/fix-sandbox-sync-branch
Browse files Browse the repository at this point in the history
[HOLD FOR Sept 10th] Remove deprecated sandbox sync command
  • Loading branch information
adamawang authored Sep 9, 2024
2 parents d2b6658 + e3bbfcf commit 1b0c77f
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 257 deletions.
2 changes: 0 additions & 2 deletions packages/cli/commands/sandbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ const { i18n } = require('../lib/lang');
const { uiBetaTag } = require('../lib/ui');
const create = require('./sandbox/create');
const del = require('./sandbox/delete');
const sync = require('./sandbox/sync');

const i18nKey = 'commands.sandbox';

Expand All @@ -17,7 +16,6 @@ exports.builder = yargs => {
yargs
.command(create)
.command(del)
.command(sync)
.demandCommand(1, '');

return yargs;
Expand Down
1 change: 1 addition & 0 deletions packages/cli/commands/sandbox/create.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ exports.handler = async options => {
});

const sandboxAccountConfig = getAccountConfig(result.sandbox.sandboxHubId);
// For v1 sandboxes, keep sync here. Once we migrate to v2, this will be handled by BE automatically
const handleSyncSandbox = async syncTasks => {
await syncSandbox({
accountConfig: sandboxAccountConfig,
Expand Down
225 changes: 0 additions & 225 deletions packages/cli/commands/sandbox/sync.js

This file was deleted.

30 changes: 0 additions & 30 deletions packages/cli/lang/en.lyaml
Original file line number Diff line number Diff line change
Expand Up @@ -764,30 +764,6 @@ en:
options:
account:
describe: "Account name or id to delete"
sync:
describe: "Sync to a sandbox account"
examples:
default: "Initiates a sync to a sandbox account."
force: "Skips all confirmation prompts when initiating a sync."
info:
developmentSandbox: "This will sync CRM object definitions."
standardSandbox: "This will sync all supported assets.
\nTo sync only specific assets, follow this link: {{#bold}}{{ url }}{{/bold}}"
sync: "\nSync direction:
\n- Target sandbox: {{#cyan}}{{#bold}}{{ sandboxName }}{{/bold}}{{/cyan}}
\n- Source account: {{#bold}}{{ parentAccountName }}{{/bold}}
\n\nRun {{#bold}}hs accounts use{{/bold}} to change your default account and sync to a different target sandbox."
warning:
developmentSandbox: "Syncing will update previously synced object definitions and add new ones from production to your development sandbox. Object definitions that were created in your sandbox will stay the same."
standardSandbox: "Syncing can have a big impact. Updates from your production account may overwrite changes in your standard sandbox. Standard sandboxes are usually shared with other Super Admins."
confirm:
developmentSandbox: "Sync CRM object definitions to {{#cyan}}{{#bold}}{{ sandboxName }}{{/bold}}{{/cyan}} from {{#bold}}{{ parentAccountName }}{{/bold}}?"
standardSandbox: "Sync all supported assets to {{#cyan}}{{#bold}}{{ sandboxName }}{{/bold}}{{/cyan}} from {{#bold}}{{ parentAccountName }}{{/bold}}?"
failure:
invalidAccountType: "Sync must be run in a sandbox account. Your default account is a {{ accountType }}. Run {{#bold}}hs auth{{/bold}} to connect your sandbox account to the CLI or {{#bold}}hs accounts use{{/bold}} to change your default account, then try again."
missingParentPortal: "The production account associated to {{#bold}}{{ sandboxName }}{{/bold}} is not connected to your HubSpot CLI.
\n- Run {{#bold}}hs auth{{/bold}} to connect that account to your terminal, then try again.
\n- Run {{#bold}}hs accounts use{{/bold}} to change your default account, if you want to sync to a different sandbox. Then try again.\n"
secrets:
describe: "Manage HubSpot secrets."
subcommands:
Expand Down Expand Up @@ -1117,12 +1093,6 @@ en:
projectDevCommand:
command: "hs project dev"
message: "Run {{ command }} to set up your test environment and start local development"
sandboxSyncDevelopmentCommand:
command: "hs sandbox sync"
message: "Run {{ command }} to to update CRM object definitions in your sandbox"
sandboxSyncStandardCommand:
command: "hs sandbox sync"
message: "Run {{ command }} to to update all supported assets to your sandbox from production"
sampleProjects:
linkText: "HubSpot's sample projects"
url: "https://developers.hubspot.com/docs/platform/sample-projects?utm_source=cli&utm_content=project_create_whats_next"
Expand Down
1 change: 1 addition & 0 deletions packages/cli/lib/localDev.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ const createSandboxForLocalDev = async (accountId, accountConfig, env) => {
accountConfig,
sandboxAccountConfig
);
// For v1 sandboxes, keep sync here. Once we migrate to v2, this will be handled by BE automatically
await syncSandbox({
accountConfig: sandboxAccountConfig,
parentAccountConfig: accountConfig,
Expand Down

0 comments on commit 1b0c77f

Please sign in to comment.