As SRE
I don’t want to see errors from shellbox-constraints in the logs
and I don’t want retried requests to increase load.
So that we do not spend unnecessary resources
A/C
- No "preg_match" errors are included in the logs
Notes
- Shellbox is a library for remote command execution, and a server for secure command execution.
- shellbox-constraints is for Wikidata constraint regex checking, with only PHP installed using the RPC interface
- shellbox-constraints is available internally at https://shellbox-constraints.discovery.wmnet:4010 and http://localhost:6025 on appservers
Planned changes:
- When using shellbox, don’t directly call preg_match(), but instead send along a small snippet of PHP code that wraps the call and detects errors and returns them over the RPC interface (T362084#9700099, last part)
- Instead of replacing / with \/ in the pattern, try using a different delimiter that makes additional escaping inside the pattern unnecessary (T362084#10113028)
- Add a configuration setting for known-good patterns (default empty) and check these patterns directly using preg_match() without shellbox, and configure common patterns for that setting in production (T214378#9892636)