Skip to content

Commit d0c7c28

Browse files
fix: merge conflict and lint
Signed-off-by: Kartikay <[email protected]>
1 parent d9e4001 commit d0c7c28

File tree

4 files changed

+3
-53
lines changed

4 files changed

+3
-53
lines changed

internal/services/shared/errors.go

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -72,54 +72,6 @@ func NewDeprecationError(err error) DeprecationError {
7272
}
7373
}
7474

75-
// DeprecationError is an error returned when a schema object or relation is deprecated.
76-
type DeprecationError struct {
77-
error
78-
}
79-
80-
func (err DeprecationError) GRPCStatus() *status.Status {
81-
return spiceerrors.WithCodeAndDetails(
82-
err,
83-
codes.Aborted,
84-
spiceerrors.ForReason(
85-
// TODO: replace with a deprecation type error reason
86-
v1.ErrorReason_ERROR_REASON_SCHEMA_TYPE_ERROR,
87-
map[string]string{},
88-
),
89-
)
90-
}
91-
92-
// NewDeprecationError wraps an error to indicate an attempted write to a deprecated object type, subject or allowed relation type.
93-
func NewDeprecationError(err error) DeprecationError {
94-
return DeprecationError{
95-
error: err,
96-
}
97-
}
98-
99-
// DeprecationError is an error returned when a schema object or relation is deprecated.
100-
type DeprecationError struct {
101-
error
102-
}
103-
104-
func (err DeprecationError) GRPCStatus() *status.Status {
105-
return spiceerrors.WithCodeAndDetails(
106-
err,
107-
codes.Aborted,
108-
spiceerrors.ForReason(
109-
// TODO: replace with a deprecation type error reason
110-
v1.ErrorReason_ERROR_REASON_SCHEMA_TYPE_ERROR,
111-
map[string]string{},
112-
),
113-
)
114-
}
115-
116-
// NewDeprecationError wraps an error to indicate an attempted write to a deprecated object type, subject or allowed relation type.
117-
func NewDeprecationError(err error) DeprecationError {
118-
return DeprecationError{
119-
error: err,
120-
}
121-
}
122-
12375
// SchemaWriteDataValidationError occurs when a schema cannot be applied due to leaving data unreferenced.
12476
type SchemaWriteDataValidationError struct {
12577
error

internal/services/v1/relationships.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,6 @@ type PermissionsServerConfig struct {
107107
// DeprecatedRelationshipsEnabled defines whether or not deprecated relationships are enabled.
108108
DeprecatedRelationshipsAndObjectsEnabled bool
109109

110-
// DeprecatedRelationshipsEnabled defines whether or not deprecated relationships are enabled.
111-
DeprecatedRelationshipsAndObjectsEnabled bool
112-
113110
// CaveatTypeSet is the set of caveat types to use for caveats. If not specified,
114111
// the default type set is used.
115112
CaveatTypeSet *caveattypes.TypeSet
@@ -144,7 +141,7 @@ func NewPermissionsServer(
144141
ExpiringRelationshipsEnabled: config.ExpiringRelationshipsEnabled,
145142
DeprecatedRelationshipsAndObjectsEnabled: config.DeprecatedRelationshipsAndObjectsEnabled,
146143
PerformanceInsightMetricsEnabled: config.PerformanceInsightMetricsEnabled,
147-
EnableExperimentalLookupResources3: config.EnableExperimentalLookupResources3,
144+
EnableExperimentalLookupResources3: config.EnableExperimentalLookupResources3,
148145
}
149146

150147
return &permissionServer{

pkg/cmd/server/server.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ type Config struct {
124124
MaxLookupResourcesLimit uint32 `debugmap:"visible"`
125125
MaxBulkExportRelationshipsLimit uint32 `debugmap:"visible"`
126126
EnableExperimentalLookupResources bool `debugmap:"visible"`
127+
ExperimentalLookupResourcesVersion string `debugmap:"visible"`
127128
EnableExperimentalRelationshipExpiration bool `debugmap:"visible"`
128129
EnableExperimentalRelationshipDeprecation bool `debugmap:"visible"`
129130
EnableRevisionHeartbeat bool `debugmap:"visible"`

pkg/schema/definition_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1467,7 +1467,7 @@ func TestTypeSystemAccessors(t *testing.T) {
14671467
traits, err = vts.PossibleTraitsForAnySubject("viewer")
14681468
require.NoError(t, err)
14691469
require.False(t, traits.AllowsCaveats)
1470-
require.True(t, traits.AllowsExpiration)
1470+
require.False(t, traits.AllowsExpiration)
14711471

14721472
traits, err = vts.PossibleTraitsForAnySubject("caveated_viewer")
14731473
require.NoError(t, err)

0 commit comments

Comments
 (0)