Skip to content

Commit b87a3f9

Browse files
Sayan-cursoragent
andcommitted
step 3: drop --max-persistent-sessions from projects command
Remove the flag, the MaxPersistentSessions input field, the cap-setting plumbing, the "Max Persistent Sessions" limits row, and the matching test fixture field. The cap is moot once persistent browsers are EOL. Part of EOL persistent browsers (KERNEL-1015). Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent c82d9bc commit b87a3f9

2 files changed

Lines changed: 0 additions & 15 deletions

File tree

‎cmd/projects.go‎

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ type ProjectsLimitsGetInput struct {
5757
type ProjectsLimitsSetInput struct {
5858
Identifier string
5959
MaxConcurrentSessions Int64Flag
60-
MaxPersistentSessions Int64Flag
6160
MaxConcurrentInvocations Int64Flag
6261
MaxPooledSessions Int64Flag
6362
Output string
@@ -193,12 +192,6 @@ func (c ProjectsCmd) LimitsSet(ctx context.Context, in ProjectsLimitsSetInput) e
193192
}
194193
inner.MaxConcurrentSessions = param.NewOpt(in.MaxConcurrentSessions.Value)
195194
}
196-
if in.MaxPersistentSessions.Set {
197-
if in.MaxPersistentSessions.Value < 0 {
198-
return fmt.Errorf("--max-persistent-sessions must be non-negative (got %d); use 0 to remove the cap", in.MaxPersistentSessions.Value)
199-
}
200-
inner.MaxPersistentSessions = param.NewOpt(in.MaxPersistentSessions.Value)
201-
}
202195
if in.MaxConcurrentInvocations.Set {
203196
if in.MaxConcurrentInvocations.Value < 0 {
204197
return fmt.Errorf("--max-concurrent-invocations must be non-negative (got %d); use 0 to remove the cap", in.MaxConcurrentInvocations.Value)
@@ -243,7 +236,6 @@ func renderProjectLimits(limits *kernel.ProjectLimits) {
243236
rows := pterm.TableData{
244237
{"Limit", "Value"},
245238
{"Max Concurrent Sessions", formatProjectLimitValue(limits.MaxConcurrentSessions, limits.JSON.MaxConcurrentSessions)},
246-
{"Max Persistent Sessions", formatProjectLimitValue(limits.MaxPersistentSessions, limits.JSON.MaxPersistentSessions)},
247239
{"Max Concurrent Invocations", formatProjectLimitValue(limits.MaxConcurrentInvocations, limits.JSON.MaxConcurrentInvocations)},
248240
{"Max Pooled Sessions", formatProjectLimitValue(limits.MaxPooledSessions, limits.JSON.MaxPooledSessions)},
249241
}
@@ -297,7 +289,6 @@ func runProjectsLimitsGet(cmd *cobra.Command, args []string) error {
297289
func runProjectsLimitsSet(cmd *cobra.Command, args []string) error {
298290
c := getProjectsHandler(cmd)
299291
maxConcurrentSessions, _ := cmd.Flags().GetInt64("max-concurrent-sessions")
300-
maxPersistentSessions, _ := cmd.Flags().GetInt64("max-persistent-sessions")
301292
maxConcurrentInvocations, _ := cmd.Flags().GetInt64("max-concurrent-invocations")
302293
maxPooledSessions, _ := cmd.Flags().GetInt64("max-pooled-sessions")
303294
output, _ := cmd.Flags().GetString("output")
@@ -308,10 +299,6 @@ func runProjectsLimitsSet(cmd *cobra.Command, args []string) error {
308299
Set: cmd.Flags().Changed("max-concurrent-sessions"),
309300
Value: maxConcurrentSessions,
310301
},
311-
MaxPersistentSessions: Int64Flag{
312-
Set: cmd.Flags().Changed("max-persistent-sessions"),
313-
Value: maxPersistentSessions,
314-
},
315302
MaxConcurrentInvocations: Int64Flag{
316303
Set: cmd.Flags().Changed("max-concurrent-invocations"),
317304
Value: maxConcurrentInvocations,
@@ -330,7 +317,6 @@ func addProjectsLimitsOutputFlag(cmd *cobra.Command) {
330317

331318
func addProjectsLimitsSetFlags(cmd *cobra.Command) {
332319
cmd.Flags().Int64("max-concurrent-sessions", 0, "Maximum concurrent browser sessions (0 to remove cap)")
333-
cmd.Flags().Int64("max-persistent-sessions", 0, "Maximum persistent browser sessions (0 to remove cap)")
334320
cmd.Flags().Int64("max-concurrent-invocations", 0, "Maximum concurrent app invocations (0 to remove cap)")
335321
cmd.Flags().Int64("max-pooled-sessions", 0, "Maximum pooled sessions capacity (0 to remove cap)")
336322
addProjectsLimitsOutputFlag(cmd)

‎cmd/projects_test.go‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ func TestProjectsLimitsGet_DefaultOutput(t *testing.T) {
100100
}
101101
limits.JSON.MaxConcurrentSessions = respjson.NewField("10")
102102
limits.JSON.MaxConcurrentInvocations = respjson.NewField("5")
103-
limits.JSON.MaxPersistentSessions = respjson.NewField(respjson.Null)
104103

105104
fakeProjects := &FakeProjectsService{}
106105
fakeLimits := &FakeProjectLimitsService{

0 commit comments

Comments
 (0)