Git Product home page Git Product logo

knative-gcp's Issues

Storage creates multiple Notifications

Occasionally I see that Storage creates two GCS notifications. Then, when the Storage CO is deleted, only the more recent notifications is deleted. This caused me to hit the limit of 10 notifications on a bucket.

$ gsutil notification list gs://eventing-demo
# Nothing

$ kn importers create storage desjani --parameters bucket=eventing-demo
# Finishes when the importer is ready.

$ gsutil notification list gs://eventing-demo
projects/_/buckets/eventing-demo/notificationConfigs/67
        Cloud Pub/Sub topic: projects/harwayne2/topics/storage-e711b0c4-f647-4723-be61-99ce59801287
        Custom attributes:
                knative-gcp: google.storage

projects/_/buckets/eventing-demo/notificationConfigs/68
        Cloud Pub/Sub topic: projects/harwayne2/topics/storage-b7cbfa63-a7ba-4f8f-8306-efc574daa7e4
        Custom attributes:
                knative-gcp: google.storage

$ ./kn importers generic delete storage desjani  
# Finishes successfully.

$ gsutil notification list gs://eventing-demo
projects/_/buckets/eventing-demo/notificationConfigs/67
        Cloud Pub/Sub topic: projects/harwayne2/topics/storage-e711b0c4-f647-4723-be61-99ce59801287
        Custom attributes:
                knative-gcp: google.storage

#Bug Updating the event types of an GCS importer doesn't work and is not immutable

Create a GCS importer with just the "finalize" event type.
Then edit it to add "metadataupdate". Webhook accepts it and the object is ready.
However, gsutil notification list doesn't show the new type. (also old ones stay forever, but I believe there is another bug tracking it).

I haven't tested for other fields.

Expected behavior:
Either make the field immutable, or reconcile (ideal) it.

Refactor sync code for channel subscribers.

#26 (comment)

This is where I found some confusion, coupled with the lines below where we actually create it. They seem very similar to just create. Or put another way, why do you need subCreates and don't just throw everything into subUpdates. I think this is where the comments would help. It was difficult to visually diff what really was different about these two loops for the create case.

Originally posted by @vaikas-google in #26

updateFinalizers should use update

This code seems unnecessary. updateFinalizers is only called if we changed the finalizers during reconcile. IIUC the only thing this is protecting against is if something else changes the object while we reconciled, but we can let the patch fail and try again, right?

Originally posted by @grantr in #35 (comment)

E2E test for the storage source/importer

We need an E2E for the storage source/importer. It will have to do the proper cluster setup (e.g., creating secrets, a bucket, etc.), then upload a file, and see that a notification is received on the sink.

There is a working example with PullSubscription, where we might be able to reuse some of the code. Need to sync with @n3wscott

Event Display shows errors in its output for Extensions

When using Event Display (which uses Cloud SDK), both Storage and Scehduler examples show errors in the output:
For example:
โ˜๏ธ cloudevents.Event
Validation: valid
Context Attributes,
specversion: 0.3
type: google.storage.object.finalize
source: //storage.googleapis.com/buckets/vaikasvaikas-notification-test
subject: testfilehere
id: 710717795564381
time: 2019-08-27T16:35:03.742Z
schemaurl: https://raw.githubusercontent.com/google/knative-gcp/master/schemas/storage/schema.json
datacontenttype: application/json
Extensions,
error: unexpected end of JSON input

Tracing through Channel

Problem
A request made to the Channel should generate traces that link the request to the subscribers. It should either use an existing Trace if present, or create a new Trace if one isn't.

The trace from the Channel to any subscribers MUST be annotated with the subscription's name.

Persona:
System Integrator

Exit Criteria
Each of the following generate a trace that includes both the incoming request and the request to any subscribers. The trace from the Channel to any subscribers MUST be annotated with the subscription's name:

  • A request sent to an Channel without any trace information.
  • A request sent to an Channel with trace information in the HTTP headers (B3 format).
  • A request sent to an Channel with trace information in the Cloud Event's traceparent attribute, but not in the HTTP headers.

Note that this is very similar to knative/eventing#1757

Scheduler needs instructions to enable Schedule API

followed the instructions but job fails with

{"level":"info","ts":1567617015.9008741,"logger":"fallback-logger","caller":"scheduler/job.go:217","msg":"Failed to create Job \"projects/fooo/locations/us-central1/jobs/XXX\": rpc error: code = PermissionDenied desc = Cloud Scheduler API has not been used in project XXX before or it is disabled. Enable it by visiting https://console.cloud.google.com/apis/api/cloudscheduler.googleapis.com/overview?project=XXX then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.","action":"create","project":"fooo","jobName":"projects/fooo/locations/us-central1/jobs/XXX"}

Distinct ServiceAccounts

The current ServiceAccount name for the controller is controller. This works well while in the cloud-run-events namespace. But we saw in knative/eventing that people wanted to install the controllers and webhooks into user defined namespaces, at which point the name controller is likely to collide.

I recommend cloud-run-events-controller.

This leaves the finalizer hanging around -- should we give up on the finalizer at some point (for example, if we don't have permissions to delete the subscription, or if it is already deleted)?

This leaves the finalizer hanging around -- should we give up on the finalizer at some point (for example, if we don't have permissions to delete the subscription, or if it is already deleted)?

I seem to recall that the GitHub source had issues where it would stick around forever if (for example) you created a source but it hadn't had a chance to register the webhook yet.

Originally posted by @evankanderson in https://github.com/GoogleCloudPlatform/cloud-run-events/diffs

This assumes you have actually downloaded the files (or cloned the git repo). It would be nice if we could have a 'curl' way to get these files so that we don't raise the bar unnecessarily for just kicking the tires.

bit of a nit here. This assumes you have actually downloaded the files (or cloned the git repo). It would be nice if we could have a 'curl' way to get these files so that we don't raise the bar unnecessarily for just kicking the tires.

Originally posted by @vaikas-google in https://github.com/_render_node/MDExOlB1bGxSZXF1ZXN0Mjg2Nzk0NTgz/pull_requests/unread_timeline

Jobs: Use well defined name and not list them using label selectors.

Is there a reason why we can't use a well defined name and not have to list them using label selectors. I think there might be a race here. We had this same discussion with Channels and decided to use predictable naming and that also has been what serving has been doing.

Originally posted by @vaikas-google in #24

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.