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

CV2-5086 Move Smooch NLU to presto #1996

Conversation

DGaffney
Copy link
Contributor

Description

More work to move some of the lower level Alegre uses over to presto.

References: CV2-5086

How has this been tested?

Not yet tested - changing code first to determine effect of changes then work through necessary changes from there - testing will need to just ensure that articles do in fact get indexed if you send these commands to alegre from check-api

Things to pay attention to during code review

Nothing in particular

Checklist

  • I have performed a self-review of my own code
  • I have added unit and feature tests, if the PR implements a new feature or otherwise would benefit from additional testing
  • I have added regression tests, if the PR fixes a bug
  • I have added logging, exception reporting, and custom tracing with any additional information required for debugging
  • I considered secure coding practices when writing this code. Any security concerns are noted above.
  • I have commented my code in hard-to-understand areas, if any
  • I have made needed changes to the README
  • My changes generate no new warnings
  • If I added a third party module, I included a rationale for doing so and followed our current guidelines

@DGaffney
Copy link
Contributor Author

@caiosba not sure why this last error is happening so may want to discuss but otherwise ready for review! I'm going to hold in draft until later though so we can not have a flood of these at the same time.

@caiosba
Copy link
Contributor

caiosba commented Aug 19, 2024

@caiosba not sure why this last error is happening so may want to discuss but otherwise ready for review! I'm going to hold in draft until later though so we can not have a flood of these at the same time.

OK! This failure seems to be related to the changes at least.

Allow lists (core, custom, search results, articles, filtered or not) to be exported to a CSV file that is sent to e-mail.

- [x] Add an `exportList` GraphQL mutation
- [x] Implement a generic export class that supports media, articles and feeds
- [x] Validate maximum number of results (which is a global configuration key)
- [x] Validate permission
- [x] Create Sidekiq job to export results
- [x] Create a CSV for the export
- [x] Save CSV in S3 using a pre-signed URL that expires after X days ("X" is a global configuration key)
- [x] Add support to MailCatcher
- [x] Send CSV by e-mail
- [x] Automated tests
- [x] Make sure it works for articles as well
- [x] Make sure it works for shared feeds as well

References: CV2-5067 and CV2-4979.
@DGaffney DGaffney changed the base branch from develop to epic/cv2-5050-text-vectorization-via-presto August 27, 2024 13:03
@DGaffney DGaffney marked this pull request as ready for review August 27, 2024 14:19
@caiosba caiosba requested review from caiosba and removed request for caiosba August 27, 2024 14:22
Comment on lines 47 to 54
alegre_operation = 'post'
alegre_params = common_alegre_params.merge({ text: keyword, models: ALEGRE_MODELS_AND_THRESHOLDS.keys })
Bot::Alegre.get_sync_raw_params(alegre_params, "text") if alegre_operation && alegre_params
elsif operation == 'remove'
keywords -= [keyword]
alegre_operation = 'delete'
alegre_params = common_alegre_params.merge({ quiet: true })
Bot::Alegre.request_delete_from_raw(alegre_params, "text") if alegre_operation && alegre_params
Copy link
Contributor

Choose a reason for hiding this comment

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

This can be simplified further, it seems... you don't need alegre_operation anymore, since the calls were moved to the condition blocks... right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

you're right! Updated.

chinelo-obitube and others added 10 commits August 27, 2024 16:50
Allow lists (core, custom, search results, articles, filtered or not) to be exported to a CSV file that is sent to e-mail.

- [x] Add an `exportList` GraphQL mutation
- [x] Implement a generic export class that supports media, articles and feeds
- [x] Validate maximum number of results (which is a global configuration key)
- [x] Validate permission
- [x] Create Sidekiq job to export results
- [x] Create a CSV for the export
- [x] Save CSV in S3 using a pre-signed URL that expires after X days ("X" is a global configuration key)
- [x] Add support to MailCatcher
- [x] Send CSV by e-mail
- [x] Automated tests
- [x] Make sure it works for articles as well
- [x] Make sure it works for shared feeds as well

References: CV2-5067 and CV2-4979.
@DGaffney DGaffney closed this Aug 27, 2024
@DGaffney DGaffney deleted the cv2-5086-smooch-nlu-presto branch August 27, 2024 19:55
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.

3 participants