-
Notifications
You must be signed in to change notification settings - Fork 15
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
BCDA-8215: Remove completed job count application logic #964
Conversation
## 🎫 Ticket https://jira.cms.gov/browse/BCDA-8227 ## 🛠 Changes - Replace completed_job_count with a count of unique job keys (based on job_key.que_job_id) - Avoid re-processing ALR job if que job was already processed ## ℹ️ Context As part of #964, I discovered that the completed_job_count was still being used as part of ALR jobs. This applies the same fix from the "normal" export jobs in #962. Note that many different job keys can be produced by an ALR job. To simplify the determination of whether a que job was processed, I added a new "getUniqueJobKeyCount" method. For some historical context, the ALR endpoints are not enabled in deployed environments - see #853 for more details. To avoid making a decision on whether to remove the code entirely, I am applying these changes for now to remove completed_job_count. ## 🧪 Validation Unit Testing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
had one question, but other than that, LGTM. For the addition of CountUniq
, were there possibility of duplicates being reported before?
Validation:
- cleared docker locally and ran process to load fixtures and seed database, with no errors
- ran all tests (unit, postman, etc) with no errors
- did a command search for instances of
completedjobcount
andcompleted_job_count
, found no references except for one string in ALR that does not need to be changed.
Yes - previously it was relying on completed_job_count so it was potentially inaccurate (although didn't really matter much assuming folks weren't using that response header for critical logic!) |
## 🎫 Ticket https://jira.cms.gov/browse/BCDA-8215 ## 🛠 Changes - Remove completed_job_count column ## ℹ️ Context Removes column from DB after #964 is merged (see related PR for details.) Since migrations are run manually, this can be placed in the same release and run _after_ the application deployment. ## 🧪 Validation Unit tests --------- Co-authored-by: alex-dzeda <[email protected]>
🎫 Ticket
https://jira.cms.gov/browse/BCDA-8215
🛠 Changes
ℹ️ Context
This column, by it's own commented definition, is not a reliable indicator of the number of actually completed sub-jobs for an export job. It appears that its only use is in the in-progress job status header to indicate roughly how far along the job processing is.
Instead of attempting to maintain this field, we should be relying on the source of truth (the number of completed job keys). To avoid confusion and to reduce code complexity, we are removing this column.
Before removing the column from the database, we must stop reading it from the application.
🧪 Validation