Skip to content

Commit

Permalink
Merge tag 'v1.14.1' into sync-upstream-release-1.14
Browse files Browse the repository at this point in the history
v1.14.1
  • Loading branch information
Piotr Zaniewski committed Nov 14, 2023
2 parents 4f02738 + d12f043 commit 1f8a144
Show file tree
Hide file tree
Showing 8 changed files with 68 additions and 8 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -439,3 +439,45 @@ jobs:
with:
name: artifacts
path: ./out/artifacts

# TODO(negz): Refactor this job. Should the parts pertaining to release
# branches live in promote.yaml instead?
protobuf-schemas:
runs-on: ubuntu-22.04
needs: detect-noop
if: needs.detect-noop.outputs.noop != 'true'

steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4

- name: Setup Buf
uses: bufbuild/buf-setup-action@v1

- name: Lint Protocol Buffers
uses: bufbuild/buf-lint-action@v1
with:
input: apis

- name: Detect Breaking Changes in Protocol Buffers (Master Branch)
uses: bufbuild/buf-breaking-action@a074e988ee34efcd4927079e79c611f428354c01 # v1
# We want to run this for the master branch, and PRs.
if: ${{ ! startsWith(github.ref, 'refs/heads/release-') }}
with:
input: apis
against: "https://github.com/${GITHUB_REPOSITORY}.git#branch=master,subdir=apis"

- name: Detect Breaking Changes in Protocol Buffers (Release Branch)
uses: bufbuild/buf-breaking-action@a074e988ee34efcd4927079e79c611f428354c01 # v1
# We want to run this only on release branches.
if: ${{ startsWith(github.ref, 'refs/heads/release-') }}
with:
input: apis
against: "https://github.com/${GITHUB_REPOSITORY}.git#branch=${GITHUB_REF_NAME},subdir=apis"

- name: Push Protocol Buffers to Buf Schema Registry
if: ${{ github.repository == 'crossplane/crossplane' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release-')) }}
uses: bufbuild/buf-push-action@v1
with:
input: apis
buf_token: ${{ secrets.BUF_TOKEN }}
7 changes: 7 additions & 0 deletions apis/buf.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Generated by buf. DO NOT EDIT.
version: v1
deps:
- remote: buf.build
owner: protocolbuffers
repository: wellknowntypes
commit: 44e83bc050a4497fa7b36b34d95ca156
10 changes: 10 additions & 0 deletions apis/buf.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: v1
name: buf.build/crossplane/crossplane
deps:
- buf.build/protocolbuffers/wellknowntypes:v24.4
breaking:
use:
- FILE
lint:
use:
- DEFAULT
1 change: 1 addition & 0 deletions cmd/crank/xpkg/push.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ func (c *pushCmd) Run(logger logging.Logger) error { //nolint:gocyclo // This fe
return errors.Wrapf(err, errFmtPushPackage, c.PackageFiles[0])
}
logger.Debug("Pushed package", "path", c.PackageFiles[0], "ref", tag.String())
return nil
}

// If there's more than one package file we'll write (push) them all by
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ require (
github.com/Masterminds/semver v1.5.0
github.com/alecthomas/kong v0.8.1
github.com/bufbuild/buf v1.27.1
github.com/crossplane/crossplane-runtime v1.14.0
github.com/crossplane/crossplane-runtime v1.14.2
github.com/docker/docker v24.0.6+incompatible
github.com/docker/go-connections v0.4.0
github.com/emicklei/dot v1.6.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ github.com/cpuguy83/go-md2man/v2 v2.0.3 h1:qMCsGGgs+MAzDFyp9LpAe1Lqy/fY/qCovCm0q
github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY=
github.com/crossplane/crossplane-runtime v1.14.0 h1:MFo93iOJLvYaMCaCoyH2vFWsHebdA1kv3QdOm7hcm5k=
github.com/crossplane/crossplane-runtime v1.14.0/go.mod h1:aOP+5W2wKpvthVs3pFNbVOe1jwrKYbJho0ThGNCVz9o=
github.com/crossplane/crossplane-runtime v1.14.2 h1:pV5JMzyzi/kcbeVBVPCat5MHH8zS94MBUapAyGx/Ry0=
github.com/crossplane/crossplane-runtime v1.14.2/go.mod h1:aOP+5W2wKpvthVs3pFNbVOe1jwrKYbJho0ThGNCVz9o=
github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg=
github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4=
github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0=
Expand Down
4 changes: 2 additions & 2 deletions internal/controller/apiextensions/claim/reconciler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -757,7 +757,7 @@ func TestReconcile(t *testing.T) {
var customStatusUpdate test.MockSubResourceUpdateFn
mockGet := func(ctx context.Context, key client.ObjectKey, obj client.Object) error {
if o, ok := obj.(*claim.Unstructured); ok {
tc.args.claim.DeepCopyInto(&o.Unstructured)
tc.args.claim.Unstructured.DeepCopyInto(&o.Unstructured)
return nil
}
if customGet != nil {
Expand All @@ -768,7 +768,7 @@ func TestReconcile(t *testing.T) {

mockStatusUpdate := func(ctx context.Context, obj client.Object, opts ...client.SubResourceUpdateOption) error {
if o, ok := obj.(*claim.Unstructured); ok {
o.DeepCopyInto(&tc.args.claim.Unstructured)
o.Unstructured.DeepCopyInto(&tc.args.claim.Unstructured)
}
if customStatusUpdate != nil {
return customStatusUpdate(ctx, obj, opts...)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1011,14 +1011,14 @@ func TestEnqueueForCompositionRevisionFunc(t *testing.T) {
obj1.SetCompositionUpdatePolicy(&automatic)
obj1.SetCompositionReference(&corev1.ObjectReference{Name: "dachshund"})

obj2 := composite.Unstructured{Unstructured: *obj1.DeepCopy()}
obj2 := composite.Unstructured{Unstructured: *obj1.Unstructured.DeepCopy()}
obj2.SetName("obj2")

obj3 := composite.Unstructured{Unstructured: *obj1.DeepCopy()}
obj3 := composite.Unstructured{Unstructured: *obj1.Unstructured.DeepCopy()}
obj3.SetName("obj3")
obj3.SetCompositionReference(&corev1.ObjectReference{Name: "bernese"})

obj4 := composite.Unstructured{Unstructured: *obj1.DeepCopy()}
obj4 := composite.Unstructured{Unstructured: *obj1.Unstructured.DeepCopy()}
obj4.SetName("obj4")
manual := xpv1.UpdateManual
obj4.SetCompositionUpdatePolicy(&manual)
Expand Down

0 comments on commit 1f8a144

Please sign in to comment.