Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support regexp path #191

Merged
merged 1 commit into from
Mar 2, 2019
Merged

Support regexp path #191

merged 1 commit into from
Mar 2, 2019

Conversation

dtaniwaki
Copy link
Member

I think supporting regexp paths is very useful when you want to monitor multiple files created in a specific directory.

@dtaniwaki dtaniwaki force-pushed the path-regexp branch 4 times, most recently from 9f800b3 to 12cf203 Compare March 1, 2019 17:13
@dtaniwaki
Copy link
Member Author

I found the following error on the gateway-client side when I was testing this function and there's no output on the gateway side. I'm investigating it...

2019-03-01T17:33:01Z | info  | msg: detected ConfigMap addition. Updating the controller run config. |  config-map:hdfs-gateway-configmap gateway-name:hdfs-gateway gateway-namespace:default
2019-03-01T17:33:01Z | info  | msg: event source |  config-key:tmpdir config-value:"directory: \"/tmp/\"\ntype: \"CREATE\"\npathRegexp: \"[0-9]\\\\.txt\"\naddresses:\n- my-hdfs-namenode-0.my-hdfs-namenode.default.svc.cluster.local:8020\n- my-hdfs-namenode-1.my-hdfs-namenode.default.svc.cluster.local:8020\nhdfsUser: root\nkrbCCacheSecret:\n  name: krb\n  key: krb5cc_0\n# krbKeytabSecret:\n#   name: krb\n#   key: user1.keytab\n# krbUsername: \"user1\"\n# krbRealm: \"MYCOMPANY.COM\"\nkrbConfigConfigMap:\n  name: my-hdfs-krb5-config\n  key: krb5.conf\nkrbServicePrincipalName: hdfs/_HOST" gateway-name:hdfs-gateway gateway-namespace:default hash:3664361829
2019-03-01T17:33:01Z | info  | msg: state of the connection |  gateway-name:hdfs-gateway gateway-namespace:default state:READY
2019-03-01T17:33:01Z | info  | msg: event sources hashes |  current-event-sources-keys:null gateway-name:hdfs-gateway gateway-namespace:default
2019-03-01T17:33:01Z | info  | msg: event sources hashes |  gateway-name:hdfs-gateway gateway-namespace:default updated-event-sources--keys:["3664361829"]
2019-03-01T17:33:01Z | info  | msg: stale event sources |  event-sources:null gateway-name:hdfs-gateway gateway-namespace:default
2019-03-01T17:33:01Z | info  | msg: new event sources |  event-sources:["3664361829"] gateway-name:hdfs-gateway gateway-namespace:default
2019-03-01T17:33:01Z | info  | msg: activating new event source |  event-source-name:tmpdir gateway-name:hdfs-gateway gateway-namespace:default
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x102bfdf]

goroutine 55 [running]:
github.com/argoproj/argo-events/gateways.(*GatewayConfig).startEventSources.func1(0xc0004d2300, 0xc00041ed80)
        /home/vaibhav/go/src/github.com/argoproj/argo-events/gateways/event-sources.go:140 +0xef
created by github.com/argoproj/argo-events/gateways.(*GatewayConfig).startEventSources
        /home/vaibhav/go/src/github.com/argoproj/argo-events/gateways/event-sources.go:123 +0x181

@VaibhavPage
Copy link
Contributor

VaibhavPage commented Mar 1, 2019

looks like the valid object is nil which it shouldn't be because ValidateGatewayEventSource returns a non-empty valid object

@dtaniwaki
Copy link
Member Author

dtaniwaki commented Mar 2, 2019

@VaibhavPage Looks like my the versions of gateway-client and hdfs-gateway are inconsistent. I confirmed the problem above doesn't happen after I updated the gateway-client image.

Could you review this PR?

Copy link
Contributor

@VaibhavPage VaibhavPage left a comment

Choose a reason for hiding this comment

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

lgtm!!! Nice to see file watcher gateway benefitting from common path regex functionality.

@VaibhavPage VaibhavPage merged commit 7c89f75 into argoproj:master Mar 2, 2019
juliev0 pushed a commit to juliev0/argo-events that referenced this pull request Mar 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants