Feature/refetch#6118
Conversation
ocket8888
left a comment
There was a problem hiding this comment.
I tried to look kind of broad-strokes at the design; there's more to say but it's not worth saying yet since this is just a draft.
Biggest thing that stood out to me was the CRUDer rearing its ugly head again
10c0c2a to
1171fd4
Compare
This PR doesn't appear to be using the CRUDer any more than the original |
|
I guess it's not fair to expect him to do more work than he needs to. It's just so terrible right now I can't believe he thought any of it was worth keeping. |
95b54f6 to
e367988
Compare
rawlinp
left a comment
There was a problem hiding this comment.
Didn't manage to complete this review, but here are 22 comments in the meantime. A lot of them are related to using a "major version alias", so let me know if I need to explain that better. The basic idea is that it should be easy to add new minor version structs without having to update hundreds of function signatures all over the place.
rawlinp
left a comment
There was a problem hiding this comment.
Almost done reviewing this entire thing -- just need to finish the 2nd half of traffic_ops/traffic_ops_golang/invalidationjobs/invalidationjobs.go .
rawlinp
left a comment
There was a problem hiding this comment.
Ok, I've finally finished going through this entire thing.
e367988 to
9b89295
Compare
9b89295 to
9f6c6c8
Compare
679530b to
683e5a8
Compare
18a4ada to
5ada94b
Compare
5ada94b to
ca68f62
Compare
|
I think the DB migrations may need to be updated to a more recent timestamp: Because there have been other migrations that have come in with more recent timestamps, this one won't be run in dev environments that have already run those more recent migrations. |
The load_schema calls are being performed after migrations have occured. This is resulting in create_tables.sql attempting to be applied to a DB state that can conflict. If a table exists, is modified by the migrations then it may not match the original schema as defined in create_tables.sql. This can result in a failure when the script is run.
Use concrete values instead of pointers in DB call. Use explicit ignore for returned error in db call. Keep routes major+minor aware.
…or InvalidationJob Read is added
…ang. Remove references to Perl in README.md test file Move common database call(s) to dbhelper Change pointer fields to concrete values
Make the id query param required for updates. Fix the named parameter colon escape. Ensure helper function still remains in atscfg library.
When a change is done in go-tc that causes a new struct, use a type alias to ensure the change is localized and minimized throughout go-atscfg and t3c
ca68f62 to
01d2fe6
Compare
|
TP integration test failure appears to be a transient issue unrelated to this PR, merging ahead. |
This PR is to merge the changes necessary to implement the Traffic Ops related changes for the Refetch Blueprint (PR 5910).
TLDR; Modified the /jobs endpoints for Traffic Ops to take an InvalidationType string that must be either 'REFRESH' or 'REFETCH'. There was some extra work around this modification, but that was its primary purpose.
The changes primarily fall on schema changes for the database and Traffic Ops API changes. Currently this is targeting Traffic Ops API 4.0.
TO Database:
TODO/Outstanding: UpdateDoneapp/db/seeds.sqlandapp/db/patches.sqlto account for db schema changesTO API:
TO clients:
TP:
T3C (formerly ORT):
Documentation:
Which Traffic Control components are affected by this PR?
What is the best way to verify this PR?
To test whether REFETCH works specifically or not, you will need to set the parameter
refetch_enabledtotruefor the global config file in the DB parameter table. Otherwise only REFRESH jobs will be allowed.The TO database migration scripts will need to be run to ensure the transition from a previous schema works to the new. This is accomplished by using the
db/adminutility as outlined here.Once the DB migration has taken place, the Traffic Ops client API integration tests can be run. You will need TO to be up and running with the to_test database set up as described here.
Once the Traffic Ops Integration tests confirm the new and previous implementations of the /jobs endpoints still work then you can proceed to running and testing the TP integration tests still work. This will verify that TP is utilizing the previous stable version of the TO API (v3.1) and not the new /jobs endpoints.
Ensure a local version of TO is up and running with the correct DB schema. This should already be the case based on the TO client integration tests from before.
Ensure Traffic Portal is building and running as outline (here)[https://traffic-control-cdn.readthedocs.io/en/latest/development/traffic_portal.html#traffic-portal].
PR submission checklist