Skip to content
This repository has been archived by the owner on Jun 19, 2022. It is now read-only.

Add PullSubscription and Topic to internal.events.cloud.google.com #951

Merged
merged 5 commits into from
May 1, 2020

Conversation

Harwayne
Copy link
Contributor

@Harwayne Harwayne commented Apr 27, 2020

First PR for #905

Proposed Changes

  • Add PullSubscription and Topic to internal.events.cloud.google.com.
    • They are exact copies of the versions in pkg/apis/pubsub.
  • Symlink the files for PullSubscription and Topic so that they are forced to stay in sync.

Release Note

`PullSubscription` and `Topic` now exist in the `internal.events.cloud.google.com` API group.

@googlebot googlebot added the cla: yes (override cla status due to multiple authors bug) label Apr 27, 2020
// +k8s:deepcopy-gen=package,register
// +k8s:conversion-gen=github.com/google/knative-gcp/pkg/apis/pubsub
// +k8s:defaulter-gen=TypeMeta
// +groupName=pubsub.cloud.google.com
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be updated to internal.events.*?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes it should. Actually switched to base off of pkg/apis/intevents/v1alpha1/doc.go (it used to be based on pkg/apis/pubsub/v1beta1/doc.go).

@knative-metrics-robot
Copy link

The following is the coverage report on the affected files.
Say /test pull-google-knative-gcp-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/intevents/v1alpha1/pullsubscription_conversion.go Do not exist 82.6%
pkg/apis/intevents/v1alpha1/pullsubscription_defaults.go Do not exist 100.0%
pkg/apis/intevents/v1alpha1/pullsubscription_lifecycle.go Do not exist 100.0%
pkg/apis/intevents/v1alpha1/pullsubscription_types.go Do not exist 92.9%
pkg/apis/intevents/v1alpha1/pullsubscription_validation.go Do not exist 88.4%
pkg/apis/intevents/v1alpha1/register.go Do not exist 100.0%
pkg/apis/intevents/v1alpha1/topic_conversion.go Do not exist 78.3%
pkg/apis/intevents/v1alpha1/topic_defaults.go Do not exist 100.0%
pkg/apis/intevents/v1alpha1/topic_lifecycle.go Do not exist 60.7%
pkg/apis/intevents/v1alpha1/topic_types.go Do not exist 100.0%
pkg/apis/intevents/v1alpha1/topic_validation.go Do not exist 100.0%
pkg/apis/intevents/v1beta1/pullsubscription_conversion.go Do not exist 100.0%
pkg/apis/intevents/v1beta1/pullsubscription_defaults.go Do not exist 100.0%
pkg/apis/intevents/v1beta1/pullsubscription_lifecycle.go Do not exist 100.0%
pkg/apis/intevents/v1beta1/pullsubscription_types.go Do not exist 92.9%
pkg/apis/intevents/v1beta1/pullsubscription_validation.go Do not exist 88.4%
pkg/apis/intevents/v1beta1/register.go Do not exist 100.0%
pkg/apis/intevents/v1beta1/topic_conversion.go Do not exist 100.0%
pkg/apis/intevents/v1beta1/topic_defaults.go Do not exist 100.0%
pkg/apis/intevents/v1beta1/topic_lifecycle.go Do not exist 57.7%
pkg/apis/intevents/v1beta1/topic_types.go Do not exist 100.0%
pkg/apis/intevents/v1beta1/topic_validation.go Do not exist 100.0%

Copy link
Contributor

@grantr grantr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

/hold
Holding for the one question below. Cancel the hold if no code change is needed.

@@ -0,0 +1,41 @@
/*
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What method did you use to choose the files to symlink? This file seems identical to https://github.com/google/knative-gcp/blob/aa7d86b360964c9891af1065c3ba32359c446ec9/pkg/apis/pubsub/v1alpha1/implements_test.go but it's not a symlink.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is identical, but the 'real' files are in intevents, the symlinks are in pubsub.

ls -l pkg/apis/pubsub/v1beta1
total 64
-rw-r--r--  1 harwayne  eng   861 Apr 30 15:05 doc.go
lrwxr-xr-x  1 harwayne  eng    42 Apr 30 15:04 implements_test.go -> ../../intevents/v1beta1/implements_test.go
lrwxr-xr-x  1 harwayne  eng    54 Apr 30 15:04 pullsubscription_conversion.go -> ../../intevents/v1beta1/pullsubscription_conversion.go
lrwxr-xr-x  1 harwayne  eng    59 Apr 30 15:04 pullsubscription_conversion_test.go -> ../../intevents/v1beta1/pullsubscription_conversion_test.go
lrwxr-xr-x  1 harwayne  eng    52 Apr 30 15:04 pullsubscription_defaults.go -> ../../intevents/v1beta1/pullsubscription_defaults.go
lrwxr-xr-x  1 harwayne  eng    57 Apr 30 15:04 pullsubscription_defaults_test.go -> ../../intevents/v1beta1/pullsubscription_defaults_test.go
lrwxr-xr-x  1 harwayne  eng    53 Apr 30 15:04 pullsubscription_lifecycle.go -> ../../intevents/v1beta1/pullsubscription_lifecycle.go
lrwxr-xr-x  1 harwayne  eng    58 Apr 30 15:04 pullsubscription_lifecycle_test.go -> ../../intevents/v1beta1/pullsubscription_lifecycle_test.go
lrwxr-xr-x  1 harwayne  eng    49 Apr 30 15:04 pullsubscription_types.go -> ../../intevents/v1beta1/pullsubscription_types.go
-rw-r--r--  1 harwayne  eng  4114 Apr 27 14:29 pullsubscription_types_test.go
lrwxr-xr-x  1 harwayne  eng    54 Apr 30 15:04 pullsubscription_validation.go -> ../../intevents/v1beta1/pullsubscription_validation.go
lrwxr-xr-x  1 harwayne  eng    59 Apr 30 15:04 pullsubscription_validation_test.go -> ../../intevents/v1beta1/pullsubscription_validation_test.go
-rw-r--r--  1 harwayne  eng  1704 Apr 27 14:23 register.go
-rw-r--r--  1 harwayne  eng  1711 Apr 27 14:23 register_test.go
lrwxr-xr-x  1 harwayne  eng    43 Apr 30 15:04 topic_conversion.go -> ../../intevents/v1beta1/topic_conversion.go
lrwxr-xr-x  1 harwayne  eng    48 Apr 30 15:04 topic_conversion_test.go -> ../../intevents/v1beta1/topic_conversion_test.go
lrwxr-xr-x  1 harwayne  eng    41 Apr 30 15:04 topic_defaults.go -> ../../intevents/v1beta1/topic_defaults.go
lrwxr-xr-x  1 harwayne  eng    46 Apr 30 15:04 topic_defaults_test.go -> ../../intevents/v1beta1/topic_defaults_test.go
lrwxr-xr-x  1 harwayne  eng    42 Apr 30 15:04 topic_lifecycle.go -> ../../intevents/v1beta1/topic_lifecycle.go
lrwxr-xr-x  1 harwayne  eng    47 Apr 30 15:04 topic_lifecycle_test.go -> ../../intevents/v1beta1/topic_lifecycle_test.go
lrwxr-xr-x  1 harwayne  eng    38 Apr 30 15:04 topic_types.go -> ../../intevents/v1beta1/topic_types.go
-rw-r--r--  1 harwayne  eng  2534 Apr 27 14:29 topic_types_test.go
lrwxr-xr-x  1 harwayne  eng    43 Apr 30 15:04 topic_validation.go -> ../../intevents/v1beta1/topic_validation.go
lrwxr-xr-x  1 harwayne  eng    48 Apr 30 15:04 topic_validation_test.go -> ../../intevents/v1beta1/topic_validation_test.go
-rw-r--r--  1 harwayne  eng  7011 Apr 30 15:11 zz_generated.deepcopy.go

$ ls -l pkg/apis/intevents/v1beta1
total 296
-rw-r--r--  1 harwayne  eng    953 Apr 30 15:11 doc.go
-rw-r--r--  1 harwayne  eng   1146 Apr 30 15:04 implements_test.go
-rw-r--r--  1 harwayne  eng   1037 Apr 30 15:04 pullsubscription_conversion.go
-rw-r--r--  1 harwayne  eng    974 Apr 30 15:04 pullsubscription_conversion_test.go
-rw-r--r--  1 harwayne  eng   1723 Apr 30 15:04 pullsubscription_defaults.go
-rw-r--r--  1 harwayne  eng   4958 Apr 30 15:04 pullsubscription_defaults_test.go
-rw-r--r--  1 harwayne  eng   3972 Apr 30 15:04 pullsubscription_lifecycle.go
-rw-r--r--  1 harwayne  eng  11715 Apr 30 15:04 pullsubscription_lifecycle_test.go
-rw-r--r--  1 harwayne  eng   7770 Apr 30 15:04 pullsubscription_types.go
-rw-r--r--  1 harwayne  eng   4123 Apr 30 15:04 pullsubscription_types_test.go
-rw-r--r--  1 harwayne  eng   4389 Apr 30 15:04 pullsubscription_validation.go
-rw-r--r--  1 harwayne  eng  16330 Apr 30 15:04 pullsubscription_validation_test.go
-rw-r--r--  1 harwayne  eng   1709 Apr 30 15:04 register.go
-rw-r--r--  1 harwayne  eng   2148 Apr 30 15:04 register_test.go
-rw-r--r--  1 harwayne  eng   1015 Apr 30 15:04 topic_conversion.go
-rw-r--r--  1 harwayne  eng    941 Apr 30 15:04 topic_conversion_test.go
-rw-r--r--  1 harwayne  eng   1126 Apr 30 15:04 topic_defaults.go
-rw-r--r--  1 harwayne  eng   1144 Apr 30 15:04 topic_defaults_test.go
-rw-r--r--  1 harwayne  eng   4034 Apr 30 15:04 topic_lifecycle.go
-rw-r--r--  1 harwayne  eng   4692 Apr 30 15:04 topic_lifecycle_test.go
-rw-r--r--  1 harwayne  eng   6289 Apr 30 15:04 topic_types.go
-rw-r--r--  1 harwayne  eng   2543 Apr 30 15:04 topic_types_test.go
-rw-r--r--  1 harwayne  eng   1661 Apr 30 15:04 topic_validation.go
-rw-r--r--  1 harwayne  eng   2797 Apr 30 15:04 topic_validation_test.go
-rw-r--r--  1 harwayne  eng   7011 Apr 30 15:04 zz_generated.deepcopy.go

Copy link
Contributor

@grantr grantr Apr 30, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Thanks for the ls output, it's much clearer there.

/hold cancel

@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: grantr, Harwayne

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@Harwayne
Copy link
Contributor Author

Harwayne commented May 1, 2020

/retest

@knative-prow-robot knative-prow-robot merged commit 68fcea5 into google:master May 1, 2020
@Harwayne Harwayne deleted the 905-create-new branch May 1, 2020 16:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved cla: yes (override cla status due to multiple authors bug) lgtm size/XXL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants