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

Remove import jobs stats from /health/info #1336

Merged
merged 5 commits into from
Sep 26, 2024

Conversation

Cruikshanks
Copy link
Member

@Cruikshanks Cruikshanks commented Sep 17, 2024

https://eaflood.atlassian.net/browse/WATER-4670

After making some changes to water-abstraction-import we found it was no longer completing when run. The issue seemed to be

  • a step we introduced to let water-abstraction-system see importing licences was overloading the environment because it was acting like a DOS on the system app
  • each job was taking much longer than realised to complete, and the existing job schedule was overlapping them, again leading to limited system resources

We've always suspected that the features the previous team added to improve performance (pg-boss message queues and caching to Redis) were actually impacting it.

Initially, we planned to go through all the 'jobs' involved in importing data from NALD and strip out this overhead. We carried out a spike, and our timings are much, much better, proving our suspicions.

However, this was a live issue, so we removed the step and tweaked the times to get the import working again.

In the meantime, we'll either complete the spike or WATER-4535, a replacement for the licence import. Either way, the block of job stats we display on the /health/info page will be redundant. In fact, we don't use or look at it anyway, even when there is an issue.

So, this removes all logic related to job information from the /health/info page in readiness.

https://eaflood.atlassian.net/browse/WATER-4670

After making some changes to [water-abstraction-import](https://github.com/DEFRA/water-abstraction-import) we found it was no longer completing when run. The issue seemed to be

- a step we introduced to let [water-abstraction-system](https://github.com/DEFRA/water-abstraction) see importing licences was overloading the environment because it was acting like a DOS on the system app
- each job was taking much longer than realised to complete, and the existing job schedule was overlapping them, again leading to limited system resources

Initially, we were going to create a new 'job' that would daisy chain the existing jobs to avoid the overlap. Plus we'd drop the step that pinged the **water-abstraction-system** app. But then we realised based on current timings the whole process risked still running when users logged on in the AM.

So, we've always suspected that the features the previous team added to improve performance (pg-boss message queues and caching to redis) were actually impacting it. We've now gone through all the 'jobs' that were involved in importing data from NALD and stripped out this overhead. Our timings are much, _much_ better proving our suspicions.

What this means though is the block of job stats we display in the `/health/info` page is now redundant. In fact, with the jobs not being there when the update **water-abstraction-import** ships this page will error because the attempt to retrieve them will fail.

So, this strips out all logic related to job info from the `/health/info` page.
@Cruikshanks Cruikshanks added the housekeeping Refactoring, tidying up or other work which supports the project label Sep 17, 2024
@Cruikshanks Cruikshanks self-assigned this Sep 17, 2024
@Cruikshanks Cruikshanks marked this pull request as ready for review September 26, 2024 11:52
@Cruikshanks Cruikshanks merged commit 87442cf into main Sep 26, 2024
6 checks passed
@Cruikshanks Cruikshanks deleted the remove-import-log-stats-from-health-info branch September 26, 2024 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
housekeeping Refactoring, tidying up or other work which supports the project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants