vectordotdev/vector · error

Too many changelog fragments

Error message

Too many changelog fragments ({} > {}).

What it means

To keep release notes digestible, the checker caps how many new fragments a single PR may add (configurable via max_fragments). It bails when the count of added, non-README fragments exceeds that cap.

Solutions

  1. Split the PR into smaller PRs, each with a few fragments (most likely correct fix)
  2. If the bulk addition is intentional, increase max_fragments in the check invocation/config
  3. Consolidate several fragments covering one change into a single fragment

Example fix

// before
vdev check changelog-fragments  // 12 fragments > default max
// after (intentional bulk add)
vdev check changelog-fragments --max-fragments 20
Defensive patterns

Strategy: validation

Validate before calling

const added = listAddedFragments(mergeBase);
if (added.length > maxFragments) splitPullRequest(added);

Try / catch

try { runCheck(); } catch (e) { const m = /Too many changelog fragments \((\d+) > (\d+)\)/.exec(e.message); if (m) bumpMaxFragmentsOrSplitPr(); else throw e; }

Prevention

When it happens

Trigger: Running the check on a PR whose diff vs. merge base adds more than max_fragments fragment files to changelog.d/ in one branch.

Common situations: Bundling many unrelated features/fixes into one PR; bulk-adding fragments when squashing several branches into one; forgetting to raise max_fragments for intentional mega-PRs (e.g. dependency sweeps).

Understand the failure class

Background: "File too large" / "file size exceeds limit" errors: why libraries cap file sizes and how to fix them — this error's family across 46 libraries.

Related errors


AI-assisted analysis of vectordotdev/vector@bdb87aeaa4 (2026-09-16). Data as JSON: /api/errors/276527609a559261. Report an issue: GitHub.

Appendix: source

Thrown at vdev/src/commands/check/changelog_fragments.rs:59

        // The gate "did the PR add a new fragment?" uses A (added) only — modifying an
        // existing on-master fragment doesn't count toward the required changelog entry.
        // Schema validation, on the other hand, must see M (modified) fragments too.
        let is_real_fragment =
            |p: &PathBuf| p.file_name().and_then(|s| s.to_str()) != Some("README.md");
        let added_real: Vec<PathBuf> = diff_fragments(&self.merge_base, "A")?
            .into_iter()
            .filter(is_real_fragment)
            .collect();
        if added_real.is_empty() {
            bail!(
                "No changelog fragments detected. \
                 If no changes necessitate user-facing explanations, add the 'no-changelog' label. \
                 Otherwise, add fragments to {CHANGELOG_DIR}/ (see {CHANGELOG_DIR}/README.md)."
            );
        }
        if added_real.len() > self.max_fragments {
            bail!(
                "Too many changelog fragments ({} > {}).",
                added_real.len(),
                self.max_fragments
            );
        }

        // Every touched fragment (added or modified) must pass the schema check.
        let modified: Vec<PathBuf> = diff_fragments(&self.merge_base, "M")?
            .into_iter()
            .filter(is_real_fragment)
            .collect();
        let expected_parent = std::path::Path::new(CHANGELOG_DIR);
        for path in added_real.iter().chain(modified.iter()) {
            let Some(name) = path.file_name().and_then(|s| s.to_str()) else {
                bail!("Unexpected fragment path: {}", path.display());
            };
            if path.parent() != Some(expected_parent) {
                bail!(

View on GitHub (pinned to bdb87aeaa4)