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

Move AWS SQS source to contrib #253

Merged
merged 20 commits into from
May 9, 2019
Merged

Conversation

srvaroa
Copy link
Contributor

@srvaroa srvaroa commented Mar 16, 2019

Along with some documentation cleanup and a couple of simplifications of code. Tested on v0.4.0.

@knative-prow-robot knative-prow-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Mar 16, 2019
@srvaroa
Copy link
Contributor Author

srvaroa commented Mar 16, 2019

Superseeds #177 (cc @n3wscott @matzew who were reviewing that one)

@@ -23,8 +36,7 @@ spec:
apiVersion: serving.knative.dev/v1alpha1
kind: Service
metadata:
name: message-dumper
namespace: default
name: awssqs-message-dumper
Copy link
Member

Choose a reason for hiding this comment

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

let's use the new display events thing from @n3wscott

#249

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was watching that one, my plan was to update once it was merged.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@srvaroa srvaroa force-pushed the master branch 3 times, most recently from 2139489 to 1ae86cf Compare March 23, 2019 09:29
@evankanderson
Copy link
Member

Is this ready for re-review? It looks like there were some conflicts that slipped in recently, but I can take a look soon if this is ready.

@googlebot googlebot added the cla: yes Indicates the PR's author has signed the CLA. label Mar 29, 2019
@srvaroa
Copy link
Contributor Author

srvaroa commented Mar 29, 2019

@evankanderson yes it is ready, I have just resolved the conflicts. Some conflicts were in the documentation so I will test it to be sure it's ok, but otherwise the PR should be ready as is.

Thanks in advance!

@srvaroa
Copy link
Contributor Author

srvaroa commented Mar 30, 2019

/retest

contrib/awssqs/samples/README.md Show resolved Hide resolved
Deploy the `AwsSqsSource` controller as part of eventing-source's controller.

```shell
ko -n default apply -f config/
Copy link
Member

Choose a reason for hiding this comment

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

This is wrong. It should be ko -n default apply -f contrib/awssqs/

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 should be correct but it's relative to contrib/awssqs. The Deploy section above indicates that commands are run from that dir.

I understand however that you prefer to have the commands relative to the root of the repo (that is the case for instructions in other sources in contrib/). I'll change it.

Copy link
Contributor Author

@srvaroa srvaroa Apr 9, 2019

Choose a reason for hiding this comment

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

Done 26f79e2

```

You can use [kail](https://github.com/boz/kail/) to tail the logs of the
subscriber.
Copy link
Member

Choose a reason for hiding this comment

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

Other sources use kubectl log to monitor the logs of event-display other than asking people to install a new tool kail. I will suggest to use kubectl log here for consistency. Of course, you can also add guidances about kail together with kubectl log.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Kail is used in all the eventing and eventing-sources documentation, and the previous version of awssqs (this doc is mostly being moved). Examples are gcp pubsub L153 or Camel at L73, L115.

I agree though that the less tools we expect the better, I can do a round and update all these docs, so we remain consistent?

Copy link
Contributor

Choose a reason for hiding this comment

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

+1 for removing kail, we've been removing it as we go forward, but things linger. Perhaps we can just create an issue to track removing it from all the examples and do it in a followup.

@n3wscott
Copy link
Contributor

n3wscott commented Apr 9, 2019

We should get this in asap to stop diverging. Sorry about the time delay.

Can you confirm that the moved source is in-sync with the non-contrib version? If so we can merge and then do followup PRs to clean up.

@srvaroa
Copy link
Contributor Author

srvaroa commented Apr 9, 2019

@n3wscott that'd be great :) This is pretty much the same code as in non-contrib (save for what was necessary to change to make it fully independent inside contrib). I am happy to follow up with improvements / fixes in other PRs.

@srvaroa
Copy link
Contributor Author

srvaroa commented Apr 9, 2019

@n3wscott I suspect the failure in integration tests is not really due to the PR (the last commits only change markdown files.) I'll try retriggering a bit later, but if you think a retry would work and can /retest for me that'd be awesome.

@grantr
Copy link
Contributor

grantr commented Apr 9, 2019

/retest

@srvaroa srvaroa force-pushed the master branch 2 times, most recently from 53f355e to 979a56e Compare April 10, 2019 09:51
@srvaroa
Copy link
Contributor Author

srvaroa commented Apr 10, 2019

@n3wscott looks like this is mergeable now, let me know if you'd like to see the changes about kail done before (see thread).

@srvaroa
Copy link
Contributor Author

srvaroa commented Apr 20, 2019

Force-push fixing merge conflicts.

@srvaroa
Copy link
Contributor Author

srvaroa commented Apr 24, 2019

@n3wscott just a kind ping in case this slipped through your radar :)

srvaroa added 15 commits May 6, 2019 21:09
Signed-off-by: Galo Navarro <[email protected]>
Signed-off-by: Galo Navarro <[email protected]>
Signed-off-by: Galo Navarro <[email protected]>
Signed-off-by: Galo Navarro <[email protected]>
Signed-off-by: Galo Navarro <[email protected]>
Signed-off-by: Galo Navarro <[email protected]>
Signed-off-by: Galo Navarro <[email protected]>
Signed-off-by: Galo Navarro <[email protected]>
@srvaroa
Copy link
Contributor Author

srvaroa commented May 6, 2019

Thanks @evankanderson

@srvaroa
Copy link
Contributor Author

srvaroa commented May 6, 2019

/retest

Copy link
Member

@evankanderson evankanderson left a comment

Choose a reason for hiding this comment

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

You might want to do a quick grep for VerbAll -- I missed one in my previous scan of the code.

@@ -22,24 +22,24 @@ rules:
resources:
- deployments
verbs:
- VerbAll
- *
- apiGroups:
- ""
resources:
- events
verbs:
- VerbAll
Copy link
Member

Choose a reason for hiding this comment

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

You have another "VerbAll" here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I did miss this one, thanks! I could not find any others.

Signed-off-by: Galo Navarro <[email protected]>
@knative-metrics-robot
Copy link

The following is the coverage report on pkg/.
Say /test pull-knative-eventing-sources-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
contrib/awssqs/pkg/adapter/adapter.go Do not exist 61.8%
contrib/awssqs/pkg/apis/sources/v1alpha1/aws_sqs_types.go Do not exist 100.0%
contrib/awssqs/pkg/apis/sources/v1alpha1/register.go Do not exist 100.0%

Copy link
Member

@evankanderson evankanderson left a comment

Choose a reason for hiding this comment

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

/lgtm

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label May 9, 2019
@knative-prow-robot knative-prow-robot merged commit f62c238 into knative:master May 9, 2019
@nachocano
Copy link
Contributor

Just merged master and this seems to be broken. Can you make one more pass @srvaroa?

ko apply -f ./contrib/awssqs/config/ complains with "error processing import paths in "contrib/awssqs/config/201-clusterrole.yaml": yaml: line 25: did not find expected alphabetic or numeric character". It seems you cannot use * for specifying the verbs, we will have to list them all.

Also, the controller never starts as we are not importing the eventing scheme anymore. We need a addtoscheme_eventing_v1alpha1.go inside apis package. You can copy it from gcppubsub.

Thanks!

@srvaroa
Copy link
Contributor Author

srvaroa commented May 10, 2019

Thanks for the heads up @nachocano!

Pushing these fixes in #406 I can't test them right now on a cluster but will do over the weekend.

@nachocano
Copy link
Contributor

I can't test them right now on a cluster but will do over the weekend

Great! Thanks @srvaroa!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cla: yes Indicates the PR's author has signed the CLA. lgtm Indicates that a PR is ready to be merged. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.