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

Revert config migration #397

Merged
merged 4 commits into from
Dec 9, 2020
Merged

Revert config migration #397

merged 4 commits into from
Dec 9, 2020

Conversation

drewjenkins
Copy link
Contributor

Description and Context

We decided to revert migrating portal->account in the hubspot.config.yml. This is because we cannot account for the following scenario

  1. User has a hubspot.config.yml at a top level directory, ~/
  2. Project 1 has the latest version of the CLI with the migrated changes. It works fine
  3. Project 2 has an old version of the CLI. It is still expecting portal, not account. It will fail because Project 1 already migrated portal->account

@anthmatic
Copy link
Contributor

General question: should we still support reading accountId in config files?

Copy link
Contributor

@miketalley miketalley left a comment

Choose a reason for hiding this comment

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

The CLI readme needs to be updated https://github.com/HubSpot/hubspot-cms-tools/blob/master/packages/cms-cli/README.md

Also, we need to update the hs upload command to use portalId instead of accountId in https://github.com/HubSpot/hubspot-cms-tools/blob/master/CONTRIBUTING.md

Also, should we change back multiple accounts to multiple portals in https://github.com/HubSpot/hubspot-cms-tools/blob/master/docs/TechnicalDesign.md

May want to check out this PR for other potential changes that we need to change back fd031f0

packages/cms-cli/lib/commonOpts.js Show resolved Hide resolved
@drewjenkins
Copy link
Contributor Author

Talking with mike over slack about his comments. Decided to change the --account flag to default to --portal instead, since it is directly referencing the hubspot.config.yml file. All other wordings are staying "account"

@drewjenkins
Copy link
Contributor Author

General question: should we still support reading accountId in config files?

I don't know if this would confuse things more or not. Since the config files are generally generated by us, and then modified by the user, I don't know if the user would ever expect to put in accountId instead of portalId

@drewjenkins drewjenkins merged commit 36b4cc5 into master Dec 9, 2020
@drewjenkins drewjenkins deleted the revert-config-migration branch December 9, 2020 15:03
@TheWebTech
Copy link
Contributor

Just making sure everyone related to this update is aware.

since this change was reverted, the website changelog announcement does not feel necessary. All of the other changes going out are either bug fixes, or for alpha functionality. There's no blocker from DevRel on the remainder of the updates going for the CLI.

@gcorne
Copy link
Contributor

gcorne commented Dec 11, 2020

since this change was reverted, the website changelog announcement does not feel necessary. All of the other changes going out are either bug fixes, or for alpha functionality. There's no blocker from DevRel on the remainder of the updates going for the CLI.

Correct me if this is not true, but I think the other info is still needed. The revert only impacts the config file.

@TheWebTech
Copy link
Contributor

TheWebTech commented Dec 11, 2020

@gcorne I think there was miscommunication. It was my original understanding we were just reverting the config file change but it appeared based on the comments and some 1:1 conversations that we reverted basically everything to do with --account accountId and account.

Also, we need to update the hs upload command to use portalId instead of accountId in https://github.com/HubSpot/hubspot-cms-tools/blob/master/CONTRIBUTING.md

Also, should we change back multiple accounts to multiple portals in https://github.com/HubSpot/hubspot-cms-tools/blob/master/docs/TechnicalDesign.md

May want to check out this PR for other potential changes that we need to change back

Talking with mike over slack about his comments. Decided to change the --account flag to default to --portal instead, since it is directly referencing the hubspot.config.yml file. All other wordings are staying "account"

I somehow missed that "all other wordings are staying 'account'" bit.
I also directly asked Mike about this but I realize looking back the way I framed the question accidentally caused him to give an answer that further confused it. (that's completely on me)

So I think this is on me. If this is true that --account and most of the account references are still working but portal is still used in the config file - do we think that the experience is more confusing as a result?

I simply ask because instead of a hard-cut over we put developers in a weird hybrid state where they're using both terms.

Perhaps we introduce a schema version to the config file? v2 only supports account, and we offer a command to convert an entire config file to a v2 config?

@gcorne
Copy link
Contributor

gcorne commented Dec 11, 2020

So I think this is on me. If this is true that --account and most of the account references are still working but portal is still used in the config file - do we think that the experience is more confusing as a result?

It is more confusing than it is today, but my assumption is that most if not all developers are using hs init and hs auth to modify the config instead of manually editing the config file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants