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

Add /ok route as an express middleware #4432

Merged
merged 18 commits into from
Jul 18, 2023
Merged

Add /ok route as an express middleware #4432

merged 18 commits into from
Jul 18, 2023

Conversation

erral
Copy link
Member

@erral erral commented Feb 24, 2023

Fixes #4375 adding an Express middleware

This supersedes #4429

@netlify
Copy link

netlify bot commented Feb 24, 2023

Deploy Preview for volto ready!

Name Link
🔨 Latest commit 515af71
🔍 Latest deploy log https://app.netlify.com/sites/volto/deploys/64b52e091220d000083cfe99
😎 Deploy Preview https://deploy-preview-4432--volto.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@cypress
Copy link

cypress bot commented Feb 24, 2023

Passing run #6383 ↗︎

0 523 20 0 Flakiness 0

Details:

Merge branch 'master' into ionlizarazu-ok-view
Project: Volto Commit: 515af71333
Status: Passed Duration: 19:14 💡
Started: Jul 17, 2023 12:06 PM Ended: Jul 17, 2023 12:25 PM

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings.

Copy link
Contributor

@tiberiuichim tiberiuichim left a comment

Choose a reason for hiding this comment

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

In Plone the ok view is namespaced by the @@ symbols, so there's no chance to overlap something else. Let's do something similar here. Maybe /_ok ?

Also, I don't think there's a need for a setting for this, if we solve the namespacing problem.

@plone/volto-team thoughts on this?

@davisagli
Copy link
Member

How about something like .well-known/volto/ok (based on https://en.wikipedia.org/wiki/Well-known_URI)?

Whatever it is, it should be mentioned in the docs.

@avoinea avoinea mentioned this pull request Mar 9, 2023
@avoinea
Copy link
Member

avoinea commented Mar 10, 2023

In Plone the ok view is namespaced by the @@ symbols, so there's no chance to overlap something else. Let's do something similar here. Maybe /_ok ?

Also, I don't think there's a need for a setting for this, if we solve the namespacing problem.

@plone/volto-team thoughts on this?

Well, it also works with /ok in Plone Classic and we're doing all health-checks to this path /ok. Thus, I would stick to /ok. Or use the .well-known approach as @davisagli suggested.

@erral
Copy link
Member Author

erral commented Mar 10, 2023

I would also keep using the /ok route

@sneridagh
Copy link
Member

We need a consensus here. I'm ok with using both /ok and .well-known/volto/ok the reasoning behind both seems ok (no pun intended) for me. Everybody is ok? 😂

@tiberiuichim
Copy link
Contributor

I'm +1 on adopting the industry standard.

@erral
Copy link
Member Author

erral commented Mar 17, 2023

I don't see a ok URL under the well-known URLs right? I mean I don't mind using the .well-known approach, but right now there's no such standard for ok right?

We can start having the ok like we have in classic and evolve to whatever is stablished later on.

@davisagli
Copy link
Member

I was the one who brought up the .well-known idea, but I don't see any big problem with /ok: it is unlikely to conflict with content, and if it does there is the setting. So I would go ahead with this the way it is. The one thing I am missing in the PR is documentation of the new setting.

@stevepiercy
Copy link
Collaborator

The one thing I am missing in the PR is documentation of the new setting.

Would that go here?

https://6.docs.plone.org/volto/configuration/settings-reference.html#server-specific-serverconfig

@sneridagh
Copy link
Member

sneridagh commented May 10, 2023

@erral @stevepiercy yes, good for me. Let's add some docs and merge.

@erral
Copy link
Member Author

erral commented Jul 1, 2023

I have realized that I was missing the documentation part on this PR as requested by @stevepiercy 🤦 so I have added it 😉

Copy link
Collaborator

@stevepiercy stevepiercy left a comment

Choose a reason for hiding this comment

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

Thanks for the docs. Mostly MyST and English syntax and grammar.

docs/source/configuration/settings-reference.md Outdated Show resolved Hide resolved
docs/source/configuration/settings-reference.md Outdated Show resolved Hide resolved
docs/source/configuration/settings-reference.md Outdated Show resolved Hide resolved
docs/source/configuration/settings-reference.md Outdated Show resolved Hide resolved
@erral
Copy link
Member Author

erral commented Jul 2, 2023

Thanks for the docs. Mostly MyST and English syntax and grammar.

thank you as always!

Copy link
Collaborator

@stevepiercy stevepiercy left a comment

Choose a reason for hiding this comment

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

@stevepiercy
Copy link
Collaborator

It is OK to ignore the failing docs job. He Who Shall Not Be Named has once again pulled more feathers from the bird site, now requiring authentication to view a user's twerks.

@sneridagh sneridagh merged commit 8ccab38 into master Jul 18, 2023
39 checks passed
@sneridagh sneridagh deleted the ionlizarazu-ok-view branch July 18, 2023 07:55
sneridagh added a commit that referenced this pull request Jul 21, 2023
Co-authored-by: ionlizarazu <ilizarazu@codesyntax.com>
Co-authored-by: Víctor Fernández de Alba <sneridagh@gmail.com>
Co-authored-by: Alin Voinea <contact@avoinea.com>
sneridagh added a commit that referenced this pull request Jul 21, 2023
Co-authored-by: Mikel Larreategi <mlarreategi@codesyntax.com>
Co-authored-by: ionlizarazu <ilizarazu@codesyntax.com>
Co-authored-by: Alin Voinea <contact@avoinea.com>
sneridagh added a commit that referenced this pull request Jul 24, 2023
* master: (42 commits)
  make selectedView and className props available for Search block (#4997)
  Release @plone/volto-testing 4.0.0-alpha.0
  Release 17.0.0-alpha.21
  Upgrade to Cypress 12.17.1 (latest) (#4981)
  Image rendering (#3337)
  feat(Url.js): add getFieldURL helper function to get the url value of a field based on its structure (#4731)
  Handle @linkintegrity response with items but no breaches (#4832)
  Release 17.0.0-alpha.20
  Use all the apiExpanders in use, so we perform a single request for getting all the required data. (#4946)
  Fix the condition deciding on listing pagination format so it takes into account container blocks as well (#4978)
  Release 17.0.0-alpha.19
  Fix search block input clear button doesn't reset the search (#4837)
  Add /ok route as an express middleware (#4432)
  handles condition for yearly frequency in recurrence (#4604)
  Remove dangling out of place Guillotina Cypress tests (#4980)
  Update to latest plone.restapi and Plone 6.0.6 (#4979)
  Update browserlist (#4977)
  `Links and references` view via content menu [Add `Links to item` view] (#4787)
  Release 17.0.0-alpha.18
  Toc responsive (#4912)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

OK page for Volto
7 participants