Skip to content

Publish @scality/breakbeat to npm and GitHub Packages - #12

Merged
bert-e merged 4 commits into
development/1.1from
improvement/BREAK-12
Sep 18, 2026
Merged

bert-e merged 4 commits into
development/1.1from
improvement/BREAK-12

Conversation

@francoisferrand

Copy link
Copy Markdown
Contributor

breakbeat is installed straight from a git ref today, so it compiles on every consumer install. That is why typescript sits in dependencies: a compiler has to be present wherever the package lands, which means shipping one into every consumer's production image. Publishing a built artifact removes the whole arrangement — and with it a class of install-time breakage we keep hitting on newer Node.

Same setup as Arsenal (ARSN-605): scoped name, files: ["lib"], build at pack time, and a release workflow dispatched by hand with the tag to publish.

Breaking for consumers

The package is now @scality/breakbeat, so backbeat and scuba have to move their dependency key and every require/import over to the scoped name — roughly 13 call sites, and backbeat carries the dependency on 9 development branches. Follow-up tickets needed; nothing here works for them until that happens. scuba is the one to do first: it imports in TypeScript, so it exercises the type resolution.

That is also why this is 1.1.0 rather than 1.0.4 — a patch number would say "no action needed" while requiring every consumer to be edited. If you would rather land the publishing setup on development/1.0 and decide the version separately, dropping the last commit does exactly that: the workflow refuses to release at 1.0.3 because that tag already exists, so nothing can go out by accident.

declaration: true

Worth flagging, because it is easy to read as tidy-up. Declarations were never emitted — scuba's imports resolve types from the raw .ts sources that a git install happens to include. Those stop shipping with files: ["lib"], so without this the published package would break scuba's build while the diff looked fine.

Before the first release

@scality/breakbeat does not exist on npmjs yet, and npm will not let you configure a trusted publisher for a package that has never been published. The npm job authenticates over OIDC with no token, so the first dispatch will fail on auth until someone publishes one version by hand and sets the trusted publisher up. Noted in the workflow next to the publish step.

If it is dispatched before that, it fails safely: no tag and no release are created, GitHub Packages has already succeeded, and re-dispatching afterwards skips what is already published.

Verified

Packed the tarball and installed it into a clean consumer: no typescript and no tsc anywhere in the tree, require works, and a TypeScript consumer typechecks against the shipped declarations — including under TS 4.8.3, which is the oldest compiler among the consumers, with skipLibCheck: false. Deleting the .d.ts from the tarball reproduces the failure, so the check means something. Git-ref installs still build, so consumers will not break mid-migration.

Issue: BREAK-12

Registries need the package scoped, and it has to carry its own compiled
output rather than compiling on the consumer -- which is why typescript
was a runtime dependency, so a compiler would be around wherever it
landed. Ship only lib/, built at pack time.

Declarations were never emitted, so TypeScript consumers have been
resolving types from the raw sources a git install happens to include.
Those no longer ship, so emit them properly.

Breaking for consumers: backbeat and scuba have to move their dependency
key and every require/import over to the scoped name.

Issue: BREAK-12
Dispatched manually with the tag to release, which is checked against the
version in package.json before anything is built, so the two cannot drift
apart. Refuses to run outside development/* and hotfix/*, and to reuse an
existing tag or release.

Both publish jobs are idempotent, so a failed run can just be dispatched
again once whatever broke is fixed.

Issue: BREAK-12
@bert-e

bert-e commented Sep 16, 2026

Copy link
Copy Markdown

Hello francoisferrand,

My role is to assist you with the merge of this
pull request. Please type @bert-e help to get information
on this process, or consult the user documentation.

Available options
name description privileged authored
/after_pull_request Wait for the given pull request id to be merged before continuing with the current one.
/bypass_author_approval Bypass the pull request author's approval
/bypass_build_status Bypass the build and test status
/bypass_commit_size Bypass the check on the size of the changeset TBA
/bypass_incompatible_branch Bypass the check on the source branch prefix
/bypass_jira_check Bypass the Jira issue check
/bypass_peer_approval Bypass the pull request peers' approval
/bypass_leader_approval Bypass the pull request leaders' approval
/bypass_source_branch_lineage Bypass the cross-branch contamination check
/approve Instruct Bert-E that the author has approved the pull request. ✍️
/create_pull_requests Allow the creation of integration pull requests.
/create_integration_branches Allow the creation of integration branches.
/no_octopus Prevent Wall-E from doing any octopus merge and use multiple consecutive merge instead
/unanimity Change review acceptance criteria from one reviewer at least to all reviewers
/wait Instruct Bert-E not to run until further notice.
Available commands
name description privileged
/help Print Bert-E's manual in the pull request.
/status Print Bert-E's current status in the pull request.
/clear Remove all comments from Bert-E from the history TBA
/retry Re-start a fresh build TBA
/build Re-start a fresh build TBA
/force_reset Delete integration branches & pull requests, and restart merge process from the beginning.
/reset Try to remove integration branches unless there are commits on them which do not appear on the source branch.

Status report is not available.

Comment thread .github/workflows/release.yaml
@SylvainSenechal

Copy link
Copy Markdown

The PR description + commit says 1.1, but the pr targets 1.0

workflow_dispatch:
inputs:
tag:
description: 'Tag to be pushed to registry'

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Don't we have a setup on other repo where we don't even have to pass the tag now ?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Yeah we did it in Arsenal

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

the problem is package.json is sometimes not updated - especially in packages which are seldom modified; so I'd rather keep it this way, and change everywhere once we have a safer way to handle it (like, not coming the version in package.json :-) )

Comment thread .github/workflows/release.yaml Outdated
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Issue: BREAK-12
Minor rather than patch: the package name changes, so consumers have to be
edited to pick this up, and a patch number would say otherwise.

Issue: BREAK-12
@francoisferrand
francoisferrand changed the base branch from development/1.0 to development/1.1 September 18, 2026 15:03
@scality scality deleted a comment from bert-e Sep 18, 2026
@bert-e

bert-e commented Sep 18, 2026

Copy link
Copy Markdown

Waiting for approval

The following approvals are needed before I can proceed with the merge:

  • the author

  • 2 peers

@francoisferrand

Copy link
Copy Markdown
Contributor Author

/approve

@bert-e

bert-e commented Sep 18, 2026

Copy link
Copy Markdown

I have successfully merged the changeset of this pull request
into targetted development branches:

  • ✔️ development/1.1

The following branches have NOT changed:

  • development/1.0

Please check the status of the associated issue BREAK-12.

Goodbye francoisferrand.

The following options are set: approve

@bert-e
bert-e merged commit fbeb074 into development/1.1 Sep 18, 2026
1 check passed
@scality scality deleted a comment from bert-e Sep 18, 2026
@francoisferrand
francoisferrand deleted the improvement/BREAK-12 branch September 18, 2026 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants