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

docs: Trunk-based development use case tutorial #8867

Merged
merged 12 commits into from
Dec 3, 2024
Merged

Conversation

nnennandukwe
Copy link
Contributor

@nnennandukwe nnennandukwe commented Nov 27, 2024

About the changes

Trunk-based development preview

Gearing up to publish the Trunk-Based Development use case tutorial.
Screenshot 2024-11-27 at 6 56 48 AM

Closes #

Important files

Discussion points

Copy link

vercel bot commented Nov 27, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
unleash-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 3, 2024 2:22pm
unleash-monorepo-frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 3, 2024 2:22pm

Copy link
Contributor

github-actions bot commented Nov 27, 2024

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails

Scanned Files

Copy link
Member

@sighphyre sighphyre left a comment

Choose a reason for hiding this comment

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

Nice! This is great


Regardless of the specific strategy, Unleash feature flag management capabilities are designed to support a wide range of trunk-based development styles, empowering you to implement the best strategy for your teams.

### Microservices vs. Monoliths
Copy link
Member

Choose a reason for hiding this comment

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

This is bit of a hairy topic. I think all the points you've listed here can be challenged because they depend on a lot of things, like how well the code itself is structured and how source control is done. Are you mentioning this for completeness?

Not against this, just not sure where we're going with the thought

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was suggested to be mentioned so I asked a customer what their thoughts on this topic was in relation to feature flags. Microservices vs. monoliths is not directly linked to trunk-based with feature flags, but I think this is a snippet that could be expanded to its own post and maybe linked from this doc to the future one. Definitely a provocative conversation-starter topic.


#### Leverage Tagging and Metadata

In addition to meaningful names, apply relevant tags and metadata to your feature flags in Unleash. This metadata can include information such as:
Copy link
Member

Choose a reason for hiding this comment

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

Metadata? Like in the description of the flag?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes!

- Per-customer release
- General release

To target users accordingly, let's create an [activation strategy](/reference/activation-strategies). This Unleash concept defines who will be exposed to a particular flag. Unleash comes pre-configured with multiple activation strategies that let you enable a feature only for a specified audience, depending on the parameters under which you would like to release a feature.
Copy link
Member

Choose a reason for hiding this comment

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

Small detail here but a flag that's on in Unleash always has an activation strategy. If you haven't changed that in anyway it's set to 100% rollout, so you'll need to delete or just edit that strategy


Unleash provides a powerful mechanism for safely managing and controlling these features in production, enabling enterprises to deliver software faster and with greater reliability. Effective feature flag management ensures that trunk-based development supports continuous delivery without compromising stability. In this tutorial, we’ll leverage Unleash to manage trunk-based development in your codebase.

## How to Implement Trunk-Based Development with Feature Flags
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could we do sentence case for these please? 🙏 🙈

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we could give a more realistic example here than the 'simple' tag, since we want to promote best practices.


### Merge Every Commit

The most frequent approach to trunk-based development is merging every commit directly into the main branch. This strategy maximizes the rate of continuous integration and delivery, as changes are integrated into the trunk as soon as they are ready. Some advantages are:
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it really the "most frequent approach"? What's that based on? Seems like a strange claim to make, and it's not necessarily useful.

maybe something like "the most straightforward approach"? "The simplest approach"? Though, of course, if you have sources, cite away! 😄

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I wouldn't call this an absolute and can be based on team size: https://trunkbaseddevelopment.com/committing-straight-to-the-trunk/
I like "the most straightforward approach" or simplest approach.

Develop a clear and consistent naming convention for your feature flags. This will help maintain clarity and make it easier to understand the purpose and context of each flag. Some recommended elements to include in your flag names:

- The feature or functionality the flag is associated with
- The environment or user segment the flag is intended for (e.g., "prod", "beta", "mobile\*users")
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure about this point. especially as it relates to Unleash. Features usually move through multiple envs. And where is a feature destined for if it isn't "prod"? Isn't that where all features go when they grow up? Same with "beta". Surely it's only beta until it's ready?

I'm not sure about "mobile users", but ... that might be okay?

By the way, what's with mobile\*users? What's the asterisk doing? Should it be an underscore or a hyphen?

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

Successfully merging this pull request may close these issues.

4 participants