diff --git a/.gitignore b/.gitignore index cd103c130..d803704de 100644 --- a/.gitignore +++ b/.gitignore @@ -24,6 +24,7 @@ dist .yalc yalc.lock node_modules +.cursor # ignore any executables we build /gitness diff --git a/app/api/controller/gitspace/common/resource_validation.go b/app/api/controller/gitspace/common/resource_validation.go index f557c7516..481ec124e 100644 --- a/app/api/controller/gitspace/common/resource_validation.go +++ b/app/api/controller/gitspace/common/resource_validation.go @@ -179,11 +179,6 @@ func validateBootDiskChanges(existingMeta, newMeta map[string]string) (bool, err return false, fmt.Errorf( "invalid boot disk size format: cannot parse boot disk sizes for comparison") } - if newVal < existingVal { - return false, usererror.BadRequestf( - "reducing boot disk size is not allowed: from %d to %d", - existingVal, newVal) - } if newVal != existingVal { markForHardReset = true } diff --git a/app/api/controller/gitspace/update.go b/app/api/controller/gitspace/update.go index b28e176b4..43945ca58 100644 --- a/app/api/controller/gitspace/update.go +++ b/app/api/controller/gitspace/update.go @@ -66,10 +66,9 @@ func (c *Controller) Update( // Check the gitspace state. Update can be done only in stopped, error or uninitialized state currentState := gitspaceConfig.State if currentState != enum.GitspaceStateStopped && - currentState != enum.GitspaceStateError && currentState != enum.GitspaceStateUninitialized { return nil, usererror.BadRequest( - "Gitspace update can only be performed when gitspace is stopped, in error state, or uninitialized", + "Gitspace update can only be performed when gitspace is stopped or uninitialized", ) } diff --git a/app/store/database/infra_provisioned.go b/app/store/database/infra_provisioned.go index 168826e07..34c6150b2 100644 --- a/app/store/database/infra_provisioned.go +++ b/app/store/database/infra_provisioned.go @@ -214,7 +214,7 @@ func (i infraProvisionedStore) FindStoppedInfraForGitspaceConfigIdentifier( SELECT gits.gits_id FROM %s gits JOIN %s conf ON gits.gits_gitspace_config_id = conf.gconf_id - WHERE conf.gconf_uid = '%s' AND gits.gits_state = 'starting' + WHERE conf.gconf_uid = '%s' AND (gits.gits_state = 'starting' OR gits.gits_state = 'pending_cleanup') LIMIT 1`, gitspaceInstanceTable, gitspaceConfigsTable, gitspaceConfigIdentifier) diff --git a/registry/app/pkg/npm/local.go b/registry/app/pkg/npm/local.go index 1bad9f77e..d3881eee6 100644 --- a/registry/app/pkg/npm/local.go +++ b/registry/app/pkg/npm/local.go @@ -598,7 +598,7 @@ func NewJSONStringStreamReader(r *bufio.Reader) io.Reader { if escaped { // We’re inside an escape sequence — pass this byte through // JSON escape sequences don’t affect base64, but we handle it for correctness - //nolint: errcheck + //nolint: errcheck,gosec pw.Write([]byte{b}) escaped = false continue @@ -615,7 +615,7 @@ func NewJSONStringStreamReader(r *bufio.Reader) io.Reader { } // Normal base64 character - //nolint: errcheck + //nolint: errcheck,gosec pw.Write([]byte{b}) } }()