Skip to content

Commit d4e02ee

Browse files
committed
Use smaller builder machine when trial is active
Currently, trial users are unable to use Fly-managed builders as the default machine configuration exceeds their max allowed size. flyctl previously used a smaller builder for free users, but this was never updated after the removal of plans.
1 parent b59154f commit d4e02ee

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

internal/build/imgsrc/ensure_builder.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import (
2323
type Provisioner struct {
2424
orgID string
2525
orgSlug string
26+
orgTrial bool
2627
orgPaidPlan bool
2728
orgRemoteBuilderImage string
2829
useVolume bool
@@ -34,6 +35,7 @@ func NewProvisionerUiexOrg(org *uiex.Organization) *Provisioner {
3435
return &Provisioner{
3536
orgID: org.ID,
3637
orgSlug: org.Slug,
38+
orgTrial: org.BillingStatus == uiex.BillingStatusTrialActive,
3739
orgPaidPlan: org.PaidPlan,
3840
orgRemoteBuilderImage: org.RemoteBuilderImage,
3941
useVolume: true,
@@ -386,7 +388,7 @@ func (p *Provisioner) createBuilder(ctx context.Context, region, builderName str
386388
CPUs: 4,
387389
MemoryMB: 4096,
388390
}
389-
if p.orgPaidPlan {
391+
if p.orgPaidPlan && !p.orgTrial {
390392
guest = fly.MachineGuest{
391393
CPUKind: "shared",
392394
CPUs: 8,

0 commit comments

Comments
 (0)