fix: emit warning for legacy target names#4905
Conversation
| , relSpread :: Maybe SpreadType | ||
| , relSelect :: [RelSelectField] | ||
| , depth :: Depth -- ^ used for aliasing | ||
| , relIsLegacyTargetNameMatch :: Bool -- ^ used to ease migration into a new version with breaking change |
There was a problem hiding this comment.
Main idea is to add an attribute to ReadPlan, that is then aggregated in App.hs with legacyWarnings to generate the logs. That keeps the Plan module pure.
While working on building this warning, I noticed that we might avoid the breaking change if we look for the filter twice in the list of embeddings:
All tests pass when I try this, including the one that revealed the breaking change, but there could be outliers that may still show a breaking change so I'd have to look for them. I think it's worth the try, but before doing that @steve-chavez do you see it as a viable alternative against this whole breaking change warning stuff? (this would still be useful for future breaking changes though) |
|
@laurenceisla I'd say go ahead if you think it's doable without a breaking change (not sure if possible). But we do need to add loadtests for these alias cases to see if the double searching you propose won't cause a noticeable regression. |
|
I think we should do the breaking change at some point anyway. The previous behavior was just wrong - once you rename it via an alias, that's the name it should go by. If you want another release with a warning etc. I'd be OK with that. But I'd also be OK without that added complexity and the status quo (the breaking fix as it is currently done on main). |
Right, after pondering it for some time, I believe the breaking change is inevitable. Will continue with the TODO list for this PR. |
|
Now that #4904 is closed. Can we still emit the @wolfgangwalther WDYT? |
Reverts #4104 and eases transition towards the breaking change.
When the request with the deprecated syntax comes we log a warning, like so:
Note that:
taskstothe_tasks,clientstoclientes"TODO
server-legacy-features=target-names.test/load/targets.httpthat uses the alias to see the impact of this new logic. This should be done in another PR.log-level=warn, this requires Switch tolog-level=warnas default #4904 to be effective