Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: don't pin version of buf #181

Merged
merged 3 commits into from
Jul 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .github/workflows/push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ jobs:
with:
fetch-depth: 0

- uses: bufbuild/buf-setup-action@9990c72db080fa39cf561230b8d2d7b736681f85 # v1.30.1
with:
version: "1.28.1"
- uses: bufbuild/buf-setup-action@35c243d7f2a909b1d4e40399b348a7fdab27d78d # v1.34.0
- uses: bufbuild/buf-push-action@a654ff18effe4641ebea4a4ce242c49800728459 # v1.2.0
with:
buf_token: ${{ secrets.BUF_TOKEN }}
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/review.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ jobs:
- uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3
with:
fetch-depth: 0
- uses: bufbuild/buf-setup-action@9990c72db080fa39cf561230b8d2d7b736681f85 # v1.30.1
with:
version: "1.28.1"
- uses: bufbuild/buf-setup-action@35c243d7f2a909b1d4e40399b348a7fdab27d78d # v1.34.0
- uses: bufbuild/buf-lint-action@06f9dd823d873146471cfaaf108a993fe00e5325 # v1.1.1
- uses: bufbuild/buf-breaking-action@c57b3d842a5c3f3b454756ef65305a50a587c5ba # v1.1.4
with:
Expand All @@ -31,9 +29,7 @@ jobs:
- uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3
with:
fetch-depth: 0
- uses: bufbuild/buf-setup-action@9990c72db080fa39cf561230b8d2d7b736681f85 # v1.30.1
with:
version: "1.28.1"
- uses: bufbuild/buf-setup-action@35c243d7f2a909b1d4e40399b348a7fdab27d78d # v1.34.0
- name: "Generate OpenAPI & Diff"
run: |
make all
Expand Down
30 changes: 15 additions & 15 deletions openfga/v1/authzmodel.proto
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ message AuthorizationModel {
string id = 1 [
(google.api.field_behavior) = REQUIRED,
(validate.rules).string = {
pattern: "^[ABCDEFGHJKMNPQRSTVWXYZ0-9]{26}$",
pattern: "^[ABCDEFGHJKMNPQRSTVWXYZ0-9]{26}$"
ignore_empty: false
},
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {example: "\"01G5JAVJ41T49E9TT3SKVS7X1J\""}
Expand All @@ -19,7 +19,7 @@ message AuthorizationModel {
string schema_version = 2 [
(google.api.field_behavior) = REQUIRED,
(validate.rules).string = {
pattern: "^[1-9].[1-9]$",
pattern: "^[1-9].[1-9]$"
ignore_empty: false
},
json_name = "schema_version"
Expand All @@ -35,7 +35,7 @@ message AuthorizationModel {
json_name = "conditions",
(validate.rules).map.max_pairs = 25,
(validate.rules).map.keys.string = {
pattern: "^[^:#@\\s]{1,50}$",
pattern: "^[^:#@\\s]{1,50}$"
ignore_empty: false
}
];
Expand All @@ -44,7 +44,7 @@ message AuthorizationModel {
message TypeDefinition {
string type = 1 [
(validate.rules).string = {
pattern: "^[^:#@\\s]{1,254}$",
pattern: "^[^:#@\\s]{1,254}$"
ignore_empty: false
},
(google.api.field_behavior) = REQUIRED,
Expand All @@ -64,7 +64,7 @@ message TypeDefinition {

message Relation {
string name = 1 [(validate.rules).string = {
pattern: "^[^:#@\\s]{1,50}$",
pattern: "^[^:#@\\s]{1,50}$"
ignore_empty: false
}];

Expand All @@ -84,7 +84,7 @@ message Metadata {
map<string, RelationMetadata> relations = 1;

string module = 2 [(validate.rules).string = {
pattern: "^[^:#@\\s]{1,50}$",
pattern: "^[^:#@\\s]{1,50}$"
ignore_empty: true
}];

Expand All @@ -93,7 +93,7 @@ message Metadata {

message SourceInfo {
string file = 1 [(validate.rules).string = {
pattern: "^[a-zA-Z0-9_\\-\\/]{1,100}\\.fga$",
pattern: "^[a-zA-Z0-9_\\-\\/]{1,100}\\.fga$"
ignore_empty: true
}];
}
Expand All @@ -102,7 +102,7 @@ message RelationMetadata {
repeated RelationReference directly_related_user_types = 1 [json_name = "directly_related_user_types"];

string module = 2 [(validate.rules).string = {
pattern: "^[^:#@\\s]{1,50}$",
pattern: "^[^:#@\\s]{1,50}$"
ignore_empty: true
}];

Expand All @@ -113,7 +113,7 @@ message RelationMetadata {
message RelationReference {
string type = 1 [
(validate.rules).string = {
pattern: "^[^:#@\\s]{1,254}$",
pattern: "^[^:#@\\s]{1,254}$"
ignore_empty: false
},
(google.api.field_behavior) = REQUIRED,
Expand All @@ -123,7 +123,7 @@ message RelationReference {
oneof relation_or_wildcard {
string relation = 2 [
(validate.rules).string = {
pattern: "^[^:#@\\s]{1,50}$",
pattern: "^[^:#@\\s]{1,50}$"
ignore_empty: true
},
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {example: "\"member\""}
Expand All @@ -134,7 +134,7 @@ message RelationReference {

// The name of a condition that is enforced over the allowed relation.
string condition = 4 [(validate.rules).string = {
pattern: "^[^:#@\\s]{1,50}$",
pattern: "^[^:#@\\s]{1,50}$"
ignore_empty: true
}];
}
Expand Down Expand Up @@ -181,7 +181,7 @@ message ComputedUserset {
string relation = 1 [
(google.api.field_behavior) = REQUIRED,
(validate.rules).string = {
max_bytes: 50,
max_bytes: 50
ignore_empty: false
}
];
Expand All @@ -204,7 +204,7 @@ message Condition {
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(validate.rules).string = {
pattern: "^[^:#@\\s]{1,50}$",
pattern: "^[^:#@\\s]{1,50}$"
ignore_empty: false
}
];
Expand All @@ -213,7 +213,7 @@ message Condition {
string expression = 2 [
(google.api.field_behavior) = REQUIRED,
(validate.rules).string = {
max_bytes: 512,
max_bytes: 512
ignore_empty: false
}
];
Expand All @@ -229,7 +229,7 @@ message Condition {

message ConditionMetadata {
string module = 1 [(validate.rules).string = {
pattern: "^[^:#@\\s]{1,50}$",
pattern: "^[^:#@\\s]{1,50}$"
ignore_empty: true
}];

Expand Down
28 changes: 14 additions & 14 deletions openfga/v1/openapi.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,22 @@ import "protoc-gen-openapiv2/options/annotations.proto";

option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
info: {
title: "OpenFGA";
description: "A high performance and flexible authorization/permission engine built for developers and inspired by Google Zanzibar.";
version: "1.x";
title: "OpenFGA"
description: "A high performance and flexible authorization/permission engine built for developers and inspired by Google Zanzibar."
version: "1.x"
contact: {
name: "OpenFGA";
email: "[email protected]";
url: "https://openfga.dev";
};
name: "OpenFGA"
email: "[email protected]"
url: "https://openfga.dev"
}
license: {
name: "Apache-2.0";
url: "https://github.com/openfga/openfga/blob/main/LICENSE";
};
};
consumes: "application/json";
produces: "application/json";
schemes: HTTPS;
name: "Apache-2.0"
url: "https://github.com/openfga/openfga/blob/main/LICENSE"
}
}
consumes: "application/json"
produces: "application/json"
schemes: HTTPS
responses: {
key: "400"
value: {
Expand Down
42 changes: 21 additions & 21 deletions openfga/v1/openfga.proto
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import "validate/validate.proto";
message Object {
string type = 1 [
(validate.rules).string = {
pattern: "^[^:#@\\s]{1,254}$",
pattern: "^[^:#@\\s]{1,254}$"
ignore_empty: false
},
(google.api.field_behavior) = REQUIRED,
Expand All @@ -25,7 +25,7 @@ message Object {

string id = 2 [
(validate.rules).string = {
pattern: "[^#:\\s]+$",
pattern: "[^#:\\s]+$"
ignore_empty: false
},
(google.api.field_behavior) = REQUIRED,
Expand Down Expand Up @@ -59,7 +59,7 @@ message User {
message UsersetUser {
string type = 1 [
(validate.rules).string = {
pattern: "^[^:#@\\s]{1,254}$",
pattern: "^[^:#@\\s]{1,254}$"
ignore_empty: false
},
(google.api.field_behavior) = REQUIRED,
Expand All @@ -68,7 +68,7 @@ message UsersetUser {

string id = 2 [
(validate.rules).string = {
pattern: "[^#:\\s]+$",
pattern: "[^#:\\s]+$"
ignore_empty: false
},
(google.api.field_behavior) = REQUIRED,
Expand All @@ -77,7 +77,7 @@ message UsersetUser {

string relation = 3 [
(validate.rules).string = {
pattern: "^[^:#@\\s]{1,50}$",
pattern: "^[^:#@\\s]{1,50}$"
ignore_empty: true
},
(google.api.field_behavior) = REQUIRED,
Expand All @@ -89,12 +89,12 @@ message RelationshipCondition {
// A reference (by name) of the relationship condition defined in the authorization model.
string name = 1 [
(validate.rules).string = {
pattern: "^[^\\s]{2,256}$",
pattern: "^[^\\s]{2,256}$"
ignore_empty: false
},
(google.api.field_behavior) = REQUIRED,
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
max_length: 256,
max_length: 256
example: "\"condition1\""
}
];
Expand All @@ -110,31 +110,31 @@ message TupleKeyWithoutCondition {
(google.api.field_behavior) = REQUIRED,
(validate.rules).string = {max_bytes: 512},
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
max_length: 512,
max_length: 512
example: "\"user:anne\""
}
];

string relation = 2 [
(google.api.field_behavior) = REQUIRED,
(validate.rules).string = {
pattern: "^[^:#@\\s]{1,50}$",
pattern: "^[^:#@\\s]{1,50}$"
ignore_empty: true
},
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
max_length: 50,
max_length: 50
example: "\"reader\""
}
];

string object = 3 [
(google.api.field_behavior) = REQUIRED,
(validate.rules).string = {
pattern: "^[^\\s]{2,256}$",
pattern: "^[^\\s]{2,256}$"
ignore_empty: true
},
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
max_length: 256,
max_length: 256
example: "\"document:2021-budget\""
}
];
Expand All @@ -150,7 +150,7 @@ message TupleKeyWithoutCondition {
message TypedWildcard {
string type = 1 [
(validate.rules).string = {
pattern: "^[^:#@\\s]{1,254}$",
pattern: "^[^:#@\\s]{1,254}$"
ignore_empty: false
},
(google.api.field_behavior) = REQUIRED,
Expand All @@ -162,35 +162,35 @@ message TupleKey {
string user = 1 [
(google.api.field_behavior) = REQUIRED,
(validate.rules).string = {
max_bytes: 512,
max_bytes: 512
ignore_empty: false
},
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
max_length: 512,
max_length: 512
example: "\"user:anne\""
}
];

string relation = 2 [
(google.api.field_behavior) = REQUIRED,
(validate.rules).string = {
pattern: "^[^:#@\\s]{1,50}$",
pattern: "^[^:#@\\s]{1,50}$"
ignore_empty: true
},
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
max_length: 50,
max_length: 50
example: "\"reader\""
}
];

string object = 3 [
(google.api.field_behavior) = REQUIRED,
(validate.rules).string = {
pattern: "^[^\\s]{2,256}$",
pattern: "^[^\\s]{2,256}$"
ignore_empty: true
},
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
max_length: 256,
max_length: 256
example: "\"document:2021-budget\""
}
];
Expand Down Expand Up @@ -330,7 +330,7 @@ message Store {
message UserTypeFilter {
string type = 1 [
(validate.rules).string = {
pattern: "^[^:#@\\s]{1,254}$",
pattern: "^[^:#@\\s]{1,254}$"
ignore_empty: false
},
(google.api.field_behavior) = REQUIRED,
Expand All @@ -339,7 +339,7 @@ message UserTypeFilter {

string relation = 2 [
(validate.rules).string = {
pattern: "^[^:#@\\s]{1,50}$",
pattern: "^[^:#@\\s]{1,50}$"
ignore_empty: true
},
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {example: "\"member\""}
Expand Down
Loading
Loading