Note: This document provides a step-by-step guide for our GitFlow-like experimental branches for our long-lived, multi-collaborator features (e.g., 6–8 weeks or up to 1–1.5 years) that eventually merge back into the main product code.
- Overview
- Key Concepts
- Why NI Wants Experimental Branches in This Repo
- Detailed & Comprehensive Narrative
- Step-by-Step Workflow
- Conclusion & Best Practices
- See Also
Long-lived experimental branches (experiment/<shortName>
) allow you to develop complex features in an isolated environment.
- Multi-collaborator: Multiple contributors can push or PR into the experiment.
- Length: Typically 6–8 weeks or up to 1–1.5 years.
- Goal: Eventually merge these experiments into
develop
if deemed successful.
Why This Model?
- Reduce disruption to day-to-day merges in
develop
. - Provide a “pseudo-develop” for features needing alpha/beta/rc staging.
- Enforce code scanning and manual approval for distributing
.vip
artifacts (or equivalent), ensuring security.
- experiment/
- The main branch for the experiment, created by an NI maintainer post Steering Committee approval.
- Automatic Scanning
- Docker VI Analyzer & CodeQL run on every commit or PR, catching suspicious code before distribution.
- Manual Approval
- By default,
.vip
packaging is disabled. An NI admin must run an “approve-experiment” workflow to enable artifact distribution for the experiment.
- By default,
- Alpha/Beta/RC
- Optional sub-branches under
experiment/<shortName>
if your team wants mini-stages of development.
- Optional sub-branches under
- Big-Bang Merge
- Ultimately,
experiment/<shortName>
merges intodevelop
with a final Steering Committee review and version label (major/minor/patch).
- Ultimately,
NI’s primary goal is to make collaboration on significant, long-running features both safe and productive:
-
Centralized Testing & CI
- By hosting these experiment branches directly in NI’s main repository, contributors can leverage official CI pipelines, scanning tools, and
.vip
build workflows. - This ensures potential large-scale or risky features still benefit from consistent environment checks and automation.
- By hosting these experiment branches directly in NI’s main repository, contributors can leverage official CI pipelines, scanning tools, and
-
Early Feedback & Transparency
- When experiments happen in NI’s repo, stakeholders—including external collaborators and NI R&D—can observe progress in real-time, test artifacts promptly, and give feedback early.
- This transparency supports a faster iteration cycle and a smoother eventual merge into the shipping version of the software.
-
Coordinated Merges & Oversight
- Hosting experimental branches in the main repo facilitates oversight by the Steering Committee, enabling them to guide or course-correct large features.
- It also simplifies final merges: everything is already in the same place, so merging an experiment into
develop
doesn’t involve complicated cross-repo synchronization.
-
Security & Quality
- Experimental branches remain subject to automatic code scanning (Docker VI Analyzer + CodeQL).
- Manual gating of
.vip
distribution ensures NI’s brand and user base are not exposed to unreviewed or potentially insecure code.
-
Enhanced Innovation
- NI wants to encourage bigger ideas from the community. By offering direct experiment branches under its official repo, contributors see that NI invests in supporting innovative or ambitious projects beyond the standard short-lived feature approach.
-
Proposal & Scope
- A contributor—internal or external—proposes a significant feature via a GitHub Issue, detailing high-level goals and a timeline ranging 6–8 weeks to potentially 1–1.5 years.
- The Steering Committee weighs strategic impact, checking if the feature aligns with the roadmap and is worth integrating into
develop
eventually.
-
Steering Committee & Rationale
- If deemed valuable, NI (in coordination with the Steering Committee) will create
experiment/<shortName>
fromdevelop
. - All code scanning (Docker VI Analyzer, CodeQL) applies automatically, but artifacts remain gated to protect the broader user base from incomplete or unverified changes.
- If deemed valuable, NI (in coordination with the Steering Committee) will create
-
Experiment Branch as a Pseudo-Develop
- The experiment branch acts like a “mini development” line. Multiple collaborators can open sub-branches, do alpha/beta testing, or run partial merges—all within the experiment.
- Merges or updates to
develop
can happen periodically to reduce future conflicts.
-
Security & Manual Approval
- NI uses a manual “approve-experiment” workflow to activate
.vip
distribution for that experiment. This ensures potential large-scale distributions only happen once the scans show no critical issues and the maintainers are confident in its safety.
- NI uses a manual “approve-experiment” workflow to activate
-
Alpha/Beta/RC Sub-Branches
- If the feature is especially big or has distinct phases, sub-branches (
alpha
,beta
,rc
) can help test certain milestones or gather feedback from a smaller or larger group.
- If the feature is especially big or has distinct phases, sub-branches (
-
Frequent Synchronization
- Since the experiment might run months, merging
develop
changes into it periodically prevents a massive final conflict resolution stage.
- Since the experiment might run months, merging
-
Integration Path
- Eventually, the experiment lead or Steering Committee opens a PR from
experiment/<shortName>
todevelop
. The Steering Committee:- Chooses a final version bump label (major/minor/patch).
- Merges if everything passes final checks.
- Unsuccessful or partial features can be archived or broken into smaller merges.
- Eventually, the experiment lead or Steering Committee opens a PR from
-
Abandonment or Partial Merges
- Some experiments may fail or lose relevance. NI can archive or delete the branch if so. If only half the experiment is viable, cherry-picking or partial merges are possible.
- GitHub Issue: Outline feature scope, timeline, potential collaborators, rationale for why it needs an experimental approach.
- Steering Committee: They either approve or reject, considering if the feature should live in
experiment/<shortName>
on NI’s repo.
- NI Maintainer: Creates
experiment/<shortName>
fromdevelop
. - NoCI: By default, distributing
.vip
or similar artifacts is disabled until manual approval.
- Docker VI Analyzer + CodeQL: Automatically run on every commit/PR.
- Manual “approve-experiment”: An NI admin triggers a workflow to enable
.vip
or artifact builds for the experiment once scans are deemed acceptable.
- If staged development is beneficial, the experiment lead can create sub-branches:
experiment/<shortName>/alpha
experiment/<shortName>/beta
experiment/<shortName>/rc
- Best Practice: Merge
develop
intoexperiment/<shortName>
every couple of weeks or as needed, preventing large-scale conflicts at the end.
- Open a PR: From
experiment/<shortName>
orrc
sub-branch todevelop
. - Steering Committee: Labels “major/minor/patch.”
- Merge: The entire experiment is integrated into
develop
. Branch is removed or archived.
- Partial Merge: If only some commits are viable, cherry-pick or do a specialized branch to integrate them.
- Abandoned: Archive or delete the experiment branch if it’s no longer relevant.
- Motivation: NI hosts experiments in this repo to offer official CI, early feedback, and centralized scanning for large or innovative features.
- Communication: Keep the Steering Committee and collaborators informed through GitHub issues/PRs.
- Security & Approval: Automated code scans plus manual gating for artifact distribution safeguard the community from half-baked or risky releases.
- Sub-Branches: Use alpha/beta/rc to manage internal staging if desired.
- Frequent Sync: Merging from
develop
regularly saves time on final conflict resolution. - Endgame: Merge the experiment into
develop
in one final PR, or partially if only a subset of commits succeed, or abandon/archiving if it fails.
- MAINTAINERS_GUIDE.md — For how admins run the “approve-experiment” workflow, how final merges are labeled.
- TROUBLESHOOTING_EXPERIMENTS.md — Ten common pitfalls (e.g., missing
.vip
files, partial merges). - GOVERNANCE.md — Steering Committee roles, BDFL membership, and how experiments get approved.