-
Notifications
You must be signed in to change notification settings - Fork 78
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
[RFC] - Carbon v10 Migration Strategy #268
Comments
@tay1orjones Not sure I understand the reasoning to use both branches and feature flags? If I'm in the V10 branch, then I'm wanting to use the V10 components, so why would I need to set a feature flag? Just seems like unnecessary work for you and me. Maybe I'm missing something? It would seem that merging from V9 to V10 would be almost impossible with feature flags existing in V10 and not in V9. ie, the Table component in V10 will be vastly different with introduction of the feature flag in the main component. As part of the V10 branch, I assume there is a pipeline to publish the V10 Storybook? (otherwise how will people review the V10 components) As for 1 repo per component. I go back and forth on this. Conceptually I like the idea, but, practically it almost never makes sense, and generally makes things harder to consume. Something that I've considered in our project is to have a base repo for the "common" component, but, put more volatile components like charts, and tables, into a separate repos. Using multiple repos also makes is harder for ZenHub integration and issue tracking. ie, sometimes issues get put into the wrong repo.. zenhub has a limit on the # of repos, etc. |
I'll speak from a personal, UX practitioner perspective and try to keep away from the things I know little about (the cost vs benefits of monorepo vs alternatives for example). @tay1orjones Let me know if this isn't the apt place for these thoughts/comments and I can happily move them to a general discussion space or something 😄 First thing I believe we need is a commitment from teams on when they will target V10 adoption. Once this date has been established and agreed, then we call that our 'V9 halt of support day'. At this point, we resolve to only maintain V10 versions of all of our custom components. Equally, designers can then gauge release dates of whatever flow they are working on, and understand if they should design it with v9 or v10 in mind. Topic 1: Component by component upgrades vs The whole hog.
Topic 2: If we do that, how should teams transition from 9 to 10?
The benefits of this are threefold:
This roadmap for each product could look like:
Topic Three: So what does that mean for our core component library:**Quite simply, we get the V9 halt day date. We create a V10 branch and upgrade our existing components in there. Anything new needs to be asked 'do you need it before or after V9 day?'. If before, then we do double work (create in 9 and 10 together), if after then we build directly in 10. At V9 day, we freeze the V9 branch and focus all work on the V10 branch, support etc for V9 would be frozen. |
@stuckless Very good food for thought! Why a branch?I think it would be best to have a branch to contain the v10 updates, mainly because we're going to have to bump our Carbon dev dependencies to v10 versions in order to make the updates. Without the branch, we'd have to do this for each feature branch and would be prone to version mismatches between developer environments. It would also facilitate publishing pre-release versions to npm a bit more cleanly, maybe even automated with semantic-release. Even still, consumers won't be installing a v9 or v10 branch, it would just be an alternate version published to npm. Why feature flags?Your question about feature flags rings true - we might be able to ditch feature flags altogether. It might be easier to sum this whole RFC up as:
No feature flags means less overhead. I like it, and it doesn't feel like we need them. What's the upgrade path without feature flags?Consuming projects can stay on v1.x until they're ready to update to v2.x with the Carbon v10 updates. If there's a severe bugfix or other issue in v1.x, we can cut a manual release to npm. At that point, @lukefirth This line of thinking above matches with your proposal - a hard line between Carbon v9 and Carbon v10 support. We also did hear that the Carbon team has found the feature flags to be difficult to manage in certain situations. Less overhead overall would be ideal. In addition we can follow this procedure again for future Carbon releases, major or minor. v10 StorybookYes, we can configure netlify to publish the pre-release branch to a separate url so we can view without having the development environment running. Reviews will still happen in PRs - branching off of Monorepo follow up@stuckless - Carbon has moved to a monorepo architecture. They're considering recommending the same for Addons and potentially opening up their npm scope ( Carbon v10 transition@lukefirth I very much agree with your comment and would love to publish some migration guidance just like you suggest in addition to the guidance provided by Carbon. They recommend the same approach, doing it all at once. Branching the UI repo, making the updates, pushing all at once including new UI development. Love the idea that v10 support might come with new features as well. These shared components here are a small part of the migration for consuming projects. The bulk of the work won't be the instances where they consume this repo, it's Carbon proper. I think we can begin this work without a total v9 halt day, as long as there's an agreed-upon set of components that will have v10 support. Those agreed-upon components will need a v9 halt date. |
|
Semantic release supports prerelease channels in their beta release, we'll just need to update and then set configs for different branches |
Also would like to propose a couple additional items here for the v2 release of this package:
|
Closed via #304 |
I've attempted to keep this as brief as possible, but wanted to capture some of the various concerns and ideas we've heard on this topic.
This is a request for comments - a proposal of what we could do. Please leave feedback in the comments below.
Summary
Carbon has updated to v10, the components as of today in this package are built with v9. Carbon v10 contains breaking changes which can make adoption difficult. In addition, products may opt to upgrade in sections, so a massive v10 adoption may not be practical. The components here need to have the Carbon components they rely on updated to Carbon v10 without impacting current consumers of the v9 version.
Motivation
Portfolio unification is an imperative for the products that consume this package. Without a v10 migration, stagnation of the components will cause product teams to develop their own v10-compatible components, instead of contributing back here.
Unifying the efforts of our product teams is also crucial - product feature deliveries will slow if individual product teams each have to develop their own custom v10 implementation of the Watson IoT Design System and associated components.
With a migration plan in place and features to support incremental adoption, we can continue to house all our components in one place across multiple Carbon versions.
Detailed design
@davidicus and I have discussed some potential solutions to this problem. The proposal we think might work best consists of 5 primary steps:
alpha
/pre-release
/@next
tag1. Implement a feature flag system
We can export a new feature flag module to enable set/get of feature flags.
The Carbon team has these, we could follow a similar configuration:
Internal Component Conditional Example:
External Consumer Example:
These feature flags would be v9 by default. At some point in the future we can switch the flag to 'v10' by default. Even further down the road, we can deprecate v9 support altogether and remove the v9 conditions in the components.
Definetly open to suggestions here on the format of these feature flags. Could alternatively do a boolean structure,
buttonEnhanced@next = true || false
2. Create a branch to house all v10 updates to the components
A longstanding new branch will house all work updating the components to v10. The first step will be to update the dev deps for carbon to v10 and squashing any compliation/build bugs.
This will allow work on components on v9 to continue as we work to bring all the components stable under Carbon v10.
3. Update our components to support Carbon v10 behind a feature flag
Components will be examined one by one and made to be compliant from a design perspective in the new branch. PRs should be reviewed by designers to ensure there aren't any defects.
4. Publish the new branch under alpha/pre-release/@next tag
Manually on a case-by-case basis, we should release these updated components for testing in products/consumers codebases. Potentially after a component has been completed and updated to v10. Also, for teams who are already on v10 and just waiting for us to support v10, they will be able to consume these components as they become available.
Consumers who want to use both v9 and v10 versions of our components can use yarn's aliasing feature to install both versions.
5. Write documentation to support the migration path
Installation steps will need to be revised. This is also a good opportunity to improve our getting started documentation and more clearly state how to contribute, what our purpose is, etc.
Details on consuming/testing the pre-release version should be included.
A table showing status of v10 adoption would be beneficial, to know at a glance which components are v10-ready.
6. Merge into master
Once all components are updated, finalize the update by merging the pre-release branch into master, cut a new major version in github/npm. Carbon v10 will be the offically 'supported' version moving forward. v9 development can continue, but is discouraged and will require a manual minor/patch release to the previous major version.
See unresolved questions below regarding v9 bugfixes and peer dependency versions.
Drawbacks
Alternatives
Some things discussed:
Adoption strategy
After the pre-release branch is merged, consumers would update to Carbon v10, update our package, and things should "just work".
The components' overall API shouldn't change with this update, but we should anticipate encoutering bugs or defects. The update is mainly a visual/styling change from what I can tell on the components we have today. Although that might not entirely be true for heavily extended components like
Table
.How we teach this
Overhaul the readme.md to include clearer getting-started documentation, the purpose of this repo, how to contribute, and links to a small migration guide.
As consumers update and run across issues, we can tag them with a new label in GitHub to understand the continued impact of this change.
Unresolved questions
The text was updated successfully, but these errors were encountered: