Skip to content

Commit 23f3c2a

Browse files
authored
Merge pull request crossplane#6429 from negz/tooooools
Update to latest buf and buf-action
2 parents 3c27d58 + beaaf43 commit 23f3c2a

File tree

12 files changed

+78
-83
lines changed

12 files changed

+78
-83
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -428,29 +428,10 @@ jobs:
428428
- name: Checkout
429429
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
430430

431-
- name: Setup Buf
432-
uses: bufbuild/buf-setup-action@76ddbd1bcb9da6da11cb7c41bd97e47f81c39a39 # v1.37.0
433-
with:
434-
github_token: ${{ secrets.GITHUB_TOKEN }}
435-
436-
- name: Lint Protocol Buffers
437-
uses: bufbuild/buf-lint-action@06f9dd823d873146471cfaaf108a993fe00e5325 # v1.1.1
431+
- name: Lint and Push Protocol Buffers
432+
uses: bufbuild/buf-action@v1
438433
with:
434+
token: ${{ secrets.BUF_TOKEN }}
435+
pr_comment: false
439436
input: apis
440437

441-
# buf-breaking-action doesn't support branches
442-
# https://github.com/bufbuild/buf-push-action/issues/34
443-
- name: Detect Breaking Changes in Protocol Buffers
444-
uses: bufbuild/buf-breaking-action@a074e988ee34efcd4927079e79c611f428354c01 # v1
445-
# We want to run this for the main branch, and PRs against main.
446-
if: ${{ github.ref == 'refs/heads/main' || github.base_ref == 'main' }}
447-
with:
448-
input: apis
449-
against: "https://github.com/${GITHUB_REPOSITORY}.git#branch=main,subdir=apis"
450-
451-
- name: Push Protocol Buffers to Buf Schema Registry
452-
if: ${{ github.repository == 'crossplane/crossplane' && github.ref == 'refs/heads/main' }}
453-
uses: bufbuild/buf-push-action@a654ff18effe4641ebea4a4ce242c49800728459 # v1.2.0
454-
with:
455-
input: apis
456-
buf_token: ${{ secrets.BUF_TOKEN }}

apis/apiextensions/fn/proto/v1/run_function.pb.go

Lines changed: 6 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apis/apiextensions/fn/proto/v1/run_function.proto

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,27 @@
11
/*
2-
Copyright 2022 The Crossplane Authors.
2+
Copyright 2022 The Crossplane Authors.
33
4-
Licensed under the Apache License, Version 2.0 (the "License");
5-
you may not use this file except in compliance with the License.
6-
You may obtain a copy of the License at
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
77
8-
http://www.apache.org/licenses/LICENSE-2.0
8+
http://www.apache.org/licenses/LICENSE-2.0
99
10-
Unless required by applicable law or agreed to in writing, software
11-
distributed under the License is distributed on an "AS IS" BASIS,
12-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
See the License for the specific language governing permissions and
14-
limitations under the License.
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
1515
*/
1616

1717
syntax = "proto3";
1818

19-
import "google/protobuf/struct.proto";
20-
import "google/protobuf/duration.proto";
21-
19+
//buf:lint:ignore PACKAGE_DIRECTORY_MATCH // Too late to fix this now.
2220
package apiextensions.fn.proto.v1;
2321

22+
import "google/protobuf/duration.proto";
23+
import "google/protobuf/struct.proto";
24+
2425
option go_package = "github.com/crossplane/crossplane/apis/apiextensions/fn/proto/v1";
2526

2627
// A FunctionRunnerService is a Composition Function.
@@ -71,7 +72,7 @@ message RunFunctionRequest {
7172

7273
// Optional credentials that this Function may use to communicate with an
7374
// external system.
74-
map <string, Credentials> credentials = 7;
75+
map<string, Credentials> credentials = 7;
7576
}
7677

7778
// Credentials that a Function may use to communicate with an external system.
@@ -205,7 +206,7 @@ message Resource {
205206
google.protobuf.Struct resource = 1;
206207

207208
// The resource's connection details.
208-
//
209+
//
209210
// * Crossplane will set this field in a RunFunctionRequest to communicate the
210211
// the observed connection details of a composite or composed resource.
211212
//
@@ -218,7 +219,7 @@ message Resource {
218219
map<string, bytes> connection_details = 2;
219220

220221
// Ready indicates whether the resource should be considered ready.
221-
//
222+
//
222223
// * Crossplane will never set this field in a RunFunctionRequest.
223224
//
224225
// * A Function should set this field to READY_TRUE in a RunFunctionResponse

apis/apiextensions/fn/proto/v1/run_function_grpc.pb.go

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apis/apiextensions/fn/proto/v1beta1/zz_generated_run_function.pb.go

Lines changed: 6 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apis/apiextensions/fn/proto/v1beta1/zz_generated_run_function.proto

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,29 @@
11
/*
2-
Copyright 2022 The Crossplane Authors.
2+
Copyright 2022 The Crossplane Authors.
33
4-
Licensed under the Apache License, Version 2.0 (the "License");
5-
you may not use this file except in compliance with the License.
6-
You may obtain a copy of the License at
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
77
8-
http://www.apache.org/licenses/LICENSE-2.0
8+
http://www.apache.org/licenses/LICENSE-2.0
99
10-
Unless required by applicable law or agreed to in writing, software
11-
distributed under the License is distributed on an "AS IS" BASIS,
12-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
See the License for the specific language governing permissions and
14-
limitations under the License.
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
1515
*/
1616

17-
syntax = "proto3";
18-
19-
import "google/protobuf/struct.proto";
20-
import "google/protobuf/duration.proto";
21-
2217
// Generated from apiextensions/fn/proto/v1/run_function.proto by ../hack/duplicate_proto_type.sh. DO NOT EDIT.
2318

19+
syntax = "proto3";
20+
21+
//buf:lint:ignore PACKAGE_DIRECTORY_MATCH // Too late to fix this now.
2422
package apiextensions.fn.proto.v1beta1;
2523

24+
import "google/protobuf/duration.proto";
25+
import "google/protobuf/struct.proto";
26+
2627
option go_package = "github.com/crossplane/crossplane/apis/apiextensions/fn/proto/v1beta1";
2728

2829
// A FunctionRunnerService is a Composition Function.
@@ -73,7 +74,7 @@ message RunFunctionRequest {
7374

7475
// Optional credentials that this Function may use to communicate with an
7576
// external system.
76-
map <string, Credentials> credentials = 7;
77+
map<string, Credentials> credentials = 7;
7778
}
7879

7980
// Credentials that a Function may use to communicate with an external system.
@@ -207,7 +208,7 @@ message Resource {
207208
google.protobuf.Struct resource = 1;
208209

209210
// The resource's connection details.
210-
//
211+
//
211212
// * Crossplane will set this field in a RunFunctionRequest to communicate the
212213
// the observed connection details of a composite or composed resource.
213214
//
@@ -220,7 +221,7 @@ message Resource {
220221
map<string, bytes> connection_details = 2;
221222

222223
// Ready indicates whether the resource should be considered ready.
223-
//
224+
//
224225
// * Crossplane will never set this field in a RunFunctionRequest.
225226
//
226227
// * A Function should set this field to READY_TRUE in a RunFunctionResponse

apis/apiextensions/fn/proto/v1beta1/zz_generated_run_function_grpc.pb.go

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apis/buf.gen.yaml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
# This file contains configuration for the `buf generate` command.
2-
# See generate.go for more details.
3-
version: v1
1+
version: v2
42
plugins:
5-
- plugin: go
3+
- local: protoc-gen-go
64
out: .
75
opt: paths=source_relative
8-
- plugin: go-grpc
6+
- local: protoc-gen-go-grpc
97
out: .
10-
opt: paths=source_relative
8+
opt: paths=source_relative

apis/buf.lock

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# Generated by buf. DO NOT EDIT.
2-
version: v1
2+
version: v2
33
deps:
4-
- remote: buf.build
5-
owner: protocolbuffers
6-
repository: wellknowntypes
4+
- name: buf.build/protocolbuffers/wellknowntypes
75
commit: 44e83bc050a4497fa7b36b34d95ca156
6+
digest: b5:0d4aa31a2420a509799d6287d49ef590e14dcef5048816d446d1324b7c5b4026f4a81771babb1553b8faa5b0f79e70e1069af693682941323b7a172de48f1a17

apis/buf.yaml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
1-
version: v1
1+
version: v2
22
name: buf.build/crossplane/crossplane
33
deps:
4-
- buf.build/protocolbuffers/wellknowntypes:v24.4
4+
- buf.build/protocolbuffers/wellknowntypes:v24.4
5+
lint:
6+
use:
7+
- STANDARD
8+
except:
9+
- FIELD_NOT_REQUIRED
10+
- PACKAGE_NO_IMPORT_CYCLE
511
breaking:
612
use:
713
- FILE
8-
lint:
9-
use:
10-
- DEFAULT
14+
except:
15+
- EXTENSION_NO_DELETE
16+
- FIELD_SAME_DEFAULT

0 commit comments

Comments
 (0)