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 Update #118

Merged
merged 21 commits into from
Aug 5, 2018
Merged

ElasticSearch Update #118

merged 21 commits into from
Aug 5, 2018

Conversation

clenk
Copy link
Contributor

@clenk clenk commented Apr 4, 2018

  • Upgrade to ES version 6
  • Clean up ES template
  • Make API/storage more resilient (retry to connect when starting up)
  • Remove "doc_type" as a configuration option
  • Make Report page display an error if task_id does not exist in task database
  • Fix bug when getting non-existent report from ElasticSearch

Fixes #64, fixes #74, fixes #117, fixes #120.

@awest1339
Copy link
Contributor

We should use the ElasticSearch recommended doc type of "_doc". From here: https://www.elastic.co/guide/en/elasticsearch/reference/6.x/removal-of-types.html

# Setup each enabled storage
self.load_modules()

def load_modules(self, required_module=""):
Copy link
Contributor

Choose a reason for hiding this comment

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

Does it make sense for this method to return a module sometimes and a dictionary others?

Copy link
Contributor

Choose a reason for hiding this comment

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

I guess it only returns a module if required_module is set.


if storage_error:
if required_module:
sys.exit('ERROR: {} module not loaded!'.format(required_module))
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe raise our own exception instead of SystemExit...?

@ptcNOP
Copy link
Contributor

ptcNOP commented Apr 23, 2018

I had a couple of comments about the new method, load_modules, but other than that, these changes are working for me.

- Use a custom exception instead of sys.exit()
- Use values from config file for task database
- Ensure required storage module is ENABLED in the config
- Make load_modules() always return the same type of object
@ptcNOP
Copy link
Contributor

ptcNOP commented Apr 25, 2018

I like these changes. This looks good to me.

@ptcNOP ptcNOP merged commit 6bd9893 into mitre:dev Aug 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants