-
-
Notifications
You must be signed in to change notification settings - Fork 10.5k
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
URL service decoupling #10360
Labels
affects:api
Affects the Ghost API
affects:routing
related to the url service & dynamic routing features
later
[triage] Things we intend to work but are not immediate priority
server / core
Issues relating to the server or core of Ghost
Comments
naz
added
server / core
Issues relating to the server or core of Ghost
affects:api
Affects the Ghost API
refactoring/cleanup
affects:routing
related to the url service & dynamic routing features
labels
Jan 10, 2019
kirrg001
changed the title
URL service decoupling and improvements
URL service decoupling
Jan 10, 2019
Updated the issue description a little. More coming soon... |
naz
added a commit
to naz/Ghost
that referenced
this issue
Jan 10, 2019
closes TryGhost#10360 - This change makes sure posts and pages urls are populated in synchronous manner - Further cleanup and restrucruting of this hacky solution is planned to be done in TryGhost#10360
ErisDS
added
the
later
[triage] Things we intend to work but are not immediate priority
label
Jan 23, 2019
@ErisDS 🤔 Could you pls leave a reason why you've closed this issue? |
All issues tagged with |
naz
removed
the
later
[triage] Things we intend to work but are not immediate priority
label
May 16, 2019
This was referenced Jun 14, 2019
ErisDS
added
the
later
[triage] Things we intend to work but are not immediate priority
label
Aug 21, 2019
naz
added a commit
to naz/Ghost
that referenced
this issue
Jun 3, 2022
refs https://github.com/TryGhost/Toolbox/issues/341 refs https://github.com/TryGhost/Toolbox/issues/320 - The snapshot for post's url property is causing test flakyness. The reason is due to the async nature of url processing in the URL Service (TryGhost#10360). Once the underlying issue is solved this hack could be removed. - Having a snapshot tes even in this form is better than having none!
naz
added a commit
that referenced
this issue
Jun 3, 2022
refs https://github.com/TryGhost/Toolbox/issues/341 refs https://github.com/TryGhost/Toolbox/issues/320 - The snapshot for post's url property is causing test flakyness. The reason is due to the async nature of url processing in the URL Service (#10360). Once the underlying issue is solved this hack could be removed. - Having a snapshot tes even in this form is better than having none!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
affects:api
Affects the Ghost API
affects:routing
related to the url service & dynamic routing features
later
[triage] Things we intend to work but are not immediate priority
server / core
Issues relating to the server or core of Ghost
Known Problems
The URL service uses the model layer directly. The decision was made before we invented API versions. The decision was made because raw knex queries are so much faster than using Bookshelf. We couple the URL Service (frontend) with the model layer.
The URL service listens on Ghost events and sometimes we have to re-fetch the data from the database because these events are API independent (!) e.g. v2 does only show authors with posts. But the model layer doesn't know that.
Because of (2), we run into the problem reported here. We can't do any async operations if the Ghost events are triggered, because otherwise, the API will return 404 urls. We couple the API with the URL service.
URL Utils are used throughout codebase which couples it to every module in the system. (solved in Extract URL Service utils into SDK #10773)
Future Architecture
Imagine you split Ghost into two repositories:
You can't because it's too coupled.
Known Challenges:
Also to consider
Some tests were disabled due to delay introduced by additional db call in resources service and would be re-enabled after the new mechanism is in place. Related convo
The text was updated successfully, but these errors were encountered: