cloud-ops-sandbox icon indicating copy to clipboard operation
cloud-ops-sandbox copied to clipboard

Develop SRE recipe that introduce general delay for home page rendering in Online Boutique

Open minherz opened this issue 1 year ago • 3 comments

Implement an SRE recipe that will replace recipe 0 and will introduce latency in displaying the Online Boutique's home page by injecting code in one of the other services that support source code refresh at runtime (e.g. Javascript or Python*).

-- * cpython does not support this feature without the use of additional modules (e.g. watchdog). Another way to do it is to convert one or more of the Online Boutique services to run on pypy.

minherz avatar Mar 12 '23 21:03 minherz

Downgrading the issue priority to reflect the decrease in the maintenance capacity of the project.

minherz avatar Jul 26 '23 22:07 minherz

Hi @minherz, I understand this issue and #1010 are the main reasons why SRE Recipes were temporarily disabled in 0.9.

Instead of injecting code into the current running version of the Online Boutique provisioned by Kustomize, would it make more sense to open PRs on the Online Boutique so faults can be injected by modifying the value of an environment variable, like in 0.8? For example, we could request an update to recommendation_server.py, from:

max_responses = 5

to:

max_responses = int(os.environ.get("MAX_RESPONSES", 5))

This is compliant with the twelve-factor app good practices and does not introduce any breaking change, so I do not see why the Online Boutique maintainers would decline the PR.

That could work for other recipes as well.

WDYT?

lvaylet avatar Sep 26 '23 15:09 lvaylet

We would like to avoid introducing unrelated code changes to other projects. One of the primary goals to remove the code of the demo application from COS was to reduce chorn maintenance of artifacts that aren't related to COS. Adding code that is used solely in COS to the demo projects will (re)introduce these maintenance tasks that we want to avoid. The new recipe engine in COS should provide flexibility to recipe developers to demonstrate targeting scenarios without maintaining a specialized branch or code in the demo apps that are used with COS. Regarding the particular proposal, it seems unrelated to the scenario that is described in this issue. However, if the demo app allows to simulate a desired behavior by misconfiguration, it can be used as an alternative to the suggested approach.

minherz avatar Sep 27 '23 16:09 minherz