Best Practice for Flags across multiple active branches #763
Unanswered
nikosatwork
asked this question in
Q&A
Replies: 1 comment
-
Hi @rohan-at-sentry @spalmurray - hope all is well. When you have a moment, could you please review this question? Thank you! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi Codecov team,
I'd like to confirm the recommended best practice for using flags in a monorepo with multiple active branches (e.g.,
main
,release/v1
,release/v2
).Our understanding is that we should use a single, consistent flag (e.g.,
my-component_tests
) for the same test suite across all branches. The assumption is that Codecov's backend automatically associates the coverage data with the correct branch, therefore the flags should not contain a branch identifier (e.g.,main_my-component_tests
,v1_my-component_tests
). So, when a PR is opened targeting themain
branch, the comparison would be between themy-component_tests
flag in the source branch and themain
branch, and similarly, when a PR is opened targeting therelease/v1
branch, the comparison would be between themy-component_tests
flag in the source branch and therelease/v1
branch. Could you confirm if this is the correct and recommended approach?On a related note, we've noticed that the "Flags" tab lists all flags from all branches, without a branch dropdown filter like the one available on the "Components" tab. This can make it difficult to navigate when many branches are active. Is this the intended behavior, and are there any plans to add a branch filter to the Flags tab in the future? Related issue #620
Thanks for your help and clarification!
Beta Was this translation helpful? Give feedback.
All reactions