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

elasticsearch_reader_api configuration overrides id_reader/ elasticsearch_reader configs #501

Open
ciorg opened this issue Sep 24, 2020 · 3 comments

Comments

@ciorg
Copy link
Member

ciorg commented Sep 24, 2020

In this job set up:

"name": "test-job",
"lifecycle": "once",
"workers": 1,
"assets": [
        "elasticsearch:2.1.0"
    ],
"apis":[
  {
    "_name": "elasticsearch_reader_api",
     "connection": "homeslice",
    "index": "test-index",
    "field": "_key",
    "query": "key:someKey",
    "size": 10000
  }
],
    "operations": [
        {
            "_op": "id_reader",
            "connection": "otherConnection",
            "index": "second-test-index",
            "field": "_key",
            "size": 10000
        },
        {
            "_op": "custom-api-reader-op",
            "api_name": "elasticsearch_reader_api"        
      },
    ]

The settings for the elasticsearch_reader_api in the apis property override the id_reader configs. It seems like the elasticsearch_reader_api should have to be called in the _op config for the api configs to be applied.

@ciorg ciorg added bug Something isn't working discussion and removed bug Something isn't working labels Sep 24, 2020
@peterdemartini
Copy link
Contributor

If there is a conflict, it should throw an error.

@ciorg
Copy link
Member Author

ciorg commented Sep 24, 2020

Talked with jared about this. Will add documentation to specify how to handle multiple elasticsearch_reader_api configs in a job.

@ciorg ciorg closed this as completed Sep 24, 2020
@peterdemartini
Copy link
Contributor

I am going to reopen this because it should absolutely fail when submitting the job. You should NOT be able to specify connection, index, field, or any other conflicting config value on both the api and the reader. If there was validation for this, the problem is immediately obvious and there isn't a need to debug why the job isn't working right. Documentation can be used to document business logic but never to enforce it.

@jsnoble I thought we talked about this behavior?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants