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

Feature/pdct 774 remove csvs from backends pipeline trigger #216

Conversation

olaughter
Copy link
Contributor

@olaughter olaughter commented Jan 25, 2024

Description

Thanks to the admin service we no longer need to pass csv's into the pipeline trigger endpoint. This means a whole swathe of code is no longer used. Unpicking this means we can simplify the trigger and no longer run some unnecessary and cumbersome tests (A minute and a half! Which is half the unit tests!).

Unfortunately, pulling on the code-deletion thread revealed a place the old ingest code was in fact still used in two places:

  • A handful of minor components where used for the app, so have been preserved
  • The whole process was actually being used for test setup

The test setup one presents a problem. But also points to a wider issue beyond the scope of this humble change, that we have multiple different test setup functionalities across our test suite. For now, I have simply moved the ingest code into tests (Which will make it easier to clean up and means we can still turn off the tests for it). I've also added a task to our linear board to consolidate all our test setup strategies (and move away from inline csv data fixtures 🙀) so that this can be flollowed up on in the future

Type of change

Please select the option(s) below that are most relevant:

  • Bug fix
  • New feature
  • Breaking change

How Has This Been Tested?

Please describe the tests that you added to verify your changes.

Reviewer Checklist

  • The PR represents a single feature (small driveby fixes are also ok)
  • The PR includes tests that are sufficient for the level of risk
  • The code is sufficiently commented, particularly in hard-to-understand areas
  • Any required documentation updates have been made
  • Any TODOs added are captured in future tickets
  • No FIXMEs remain

We no longer use the csv ingest process so don't need to waste test time
on it
This had a bunch of overhang from before the admin service. Turning it
into a dedicated trigger makes it easier to call and run
Some of these paths are still used by other code. Leaving them in for now
is the path of least resistance for getting this done and gets closer to
a tidier state. With any luck we'll be able to take it further next time
Unfortunatly we rely on the ingest code for test setup. So although this
has been removed from the app, we still need it to maintain test coverage.
That being said, we are one step closer to deleting it and no longer need
to test it, so this is still progress.

The ideal solution here probably to replace the many fragmented test
setup with a single, repurposable setup factory. But thats beyond the
scope of the current change
These are no longer needed following the previous commit
Copy link

linear bot commented Jan 25, 2024

app/main.py Outdated Show resolved Hide resolved
Copy link
Contributor

@diversemix diversemix left a comment

Choose a reason for hiding this comment

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

lgtm - the suggested rename can always get done as part of the next stage of tidy up 🤞 it happens 😄

@olaughter
Copy link
Contributor Author

lgtm - the suggested rename can always get done as part of the next stage of tidy up 🤞 it happens 😄

Good shout, changing now in case we never get to round two of cleanup 😅

@olaughter olaughter force-pushed the feature/pdct-774-remove-csv-validation-from-backends-pipeline-trigger branch from 278b731 to b6c29c2 Compare January 31, 2024 10:51
@olaughter olaughter merged commit c8886f5 into main Jan 31, 2024
2 checks passed
@olaughter olaughter deleted the feature/pdct-774-remove-csv-validation-from-backends-pipeline-trigger branch January 31, 2024 11:07
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.

2 participants