Repository navigation
Shell state persistence - #903
Conversation
munimthahmid
left a comment
There was a problem hiding this comment.
@W-OK-E No worries, and thanks for the effort! Everything looks good to me now. @Saadmrp1038, could you take a look and merge it?
|
@munimthahmid feel free to merge it if you are confident. I talked to @Saadmrp1038 earlier (on how to relieve his bottleneck) and the conclusion was that he wanted to keep an eye on the problems, but feature PRs are fine -- if there is a big bug, it breaks immediatley. |
|
@munimthahmid Let me know if you don't have the priv to merge. (we should give it to you) |
|
btw, for most feature PRs, it's always a good idea to provide a feature flag. You can turn the feature to be on by default. With a feature flag, if there's something wrong, there is an easy way to disable it. |
|
Last but not the least, great work @W-OK-E ! Thanks for taking initiatives and being persistent! |
@tianyin I don't have the privilege. |
|
Thanks @tianyin!! I will try to be more organized with the future changes. |
That's a great idea. Should we enforce a feature flag in this PR before merging? |
|
Why the CI tests fail? |
|
Based on the logs, it seems to be related to the hotel-reservation app deployment as part of the smoke-test where it fails to get the pod statuses and times out. The cli had not even started. My guess is network error or API misonfig. |
|
Seems like it was a flakey issue 😕 |
|
Great work @W-OK-E ! |
* Include shell persistence * Include shell persistence
* Updated default mitigation oracle * Stop timeout for 0 replicas * TBC in CloudLab * Pushing all attempts at the problem * Enable idempotence * Add mutating_webhook_resource_limits problem (#847) * Add mutating_webhook_resource_limits problem * Add mutating_webhook_resource_limits to Problem List * mutating_webhook_resource_limits problem docstring fix Removed incorrect information about mitigation options. * Additions to mutating_webhook_limits_resource_limits problem - Memory limit/request patching before activating the webhook - Decoy pods for increased complexity * More additions to mutating_webhook problem - Make decoys realisticly named - Similar minor changes --------- Co-authored-by: Saad Mohammad Rafid Pial <[email protected]> * Derive the default problem namespace from the application (#876) * add the the probem redundency * base. * the fixed and dynamic app name are fixed. hte namespace are also fixed. * unessessry formating is reverted. * unessessry formating is reverted. * formating correction. * formating correction. * formating correction. * add fault injection decorator markers to test_problem_bsae.py --------- Co-authored-by: Saad Mohammad Rafid Pial <[email protected]> * Confluent kafka attempt * Custom image attempt * Threaded producer and added consumer * Syntax error * Added some imports * fix edge cases * run ruff check adn format * New OOM attempt * Force crash on OOM * Add file_descriptor_exhaustion problem (#832) * add file_descriptor_exhaustion problem * Modify fault injection and recovery methods * Fix fault recovery * Change fault injection method Add fault injection by flooding connections * Update fault injection method and add custom oracle --------- Co-authored-by: Saad Mohammad Rafid Pial <[email protected]> * Finalizer deadlock controller clean (#873) * finalizzer code is reaoslve dadlock benchmark. * yaml file corrected. * reverting hte comments back to their place. * read only rbac * controller log is generalized and avoiding any sregym related name exposing. * applied ruff linter formatter accordingly. * replace metadata naming and includding all the oprations on mitigation side. --------- Co-authored-by: Saad Mohammad Rafid Pial <[email protected]> * Add: secret_rotation_stale_env_credentials_astronomy_shop problem (#851) * Add secret rotation stale env credentials problem * Simplify secret rotation mitigation oracle checks * Require rotated PostgreSQL in oracle * Fix stale DB credential rotation shortcuts - Remove old password from postgresql-init ConfigMap - Keep PostgreSQL password rotation durable after pod restart - Reject mitigations that revert otelu to the old password - Remove old password leaks from unrelated pods * Fix fault recovery to satisfy the oracle * Fix problem registry import ordering --------- Co-authored-by: Saad Mohammad Rafid Pial <[email protected]> * Add cumulative_admission_webhook_timeout_hotel_reservation problem (#886) * Add cumulative_admission_webhook_timeout_hotel_reservation problem * Pin webhook backends to worker nodes via nodeAffinity * Make webhook backends realistic admission services Replace the dummy webhook backends with HTTPS admission servers that terminate TLS using Secret-mounted certificates, validate AdmissionReview requests, and return proper admission responses. Certificates are signed by the same CA referenced in each webhook's `caBundle`, with SANs covering the backend Service DNS names. The admission logic enforces a trusted image registry allowlist and a per-container CPU limit. All Hotel Reservation workloads satisfy these policies, so the webhooks remain transparent during normal operation and recovery. Also: * Vary webhook `timeoutSeconds` (12, 8, 11, 9) to make the cumulative timeout less obvious. * Rename the CA CN from `sregym-webhook-ca` to `compliance-webhook-ca`. * Remove a duplicate `rule.from_` check in the oracle. * Fix create-or-replace handling for webhooks, NetworkPolicies, Deployments, and Services so re-injection updates existing resources instead of failing or silently skipping changes. * Model the fault as a missing apiserver NetworkPolicy allow * Model the fault as a missing apiserver allow with a near-miss policy --------- Co-authored-by: Saad Mohammad Rafid Pial <[email protected]> * Add psa_restricted_blocks_recreation problem (#891) Labelling a namespace pod-security.kubernetes.io/enforce=restricted leaves running pods untouched but makes the apiserver reject recreated pods that run as root / set no seccomp profile, so a deployment silently goes under-replicated. Unlike the existing webhook problems, the policy is enforced by the apiserver via a namespace label, not a webhook config. * Add copilot cli agent (#893) * add copilot cli agent * remove -s flag * Fix MCP retry error handling and CRLF parsing in CI (#896) * fix(mcp): broaden MCP retry exceptions and return error instead of raising * fix(ci): strip CRLF from PR description before parsing problem ID * Fix kind cluster detection (#897) * Fix custom kind cluster detection * Handle failed kind detection output * fix edge cases * run ruff check adn format * Shell state persistence (#903) * Include shell persistence * Include shell persistence * Isolate problem IDs from agent runtime artifacts * update SREGym-applications (18620ed) (#910) * Add Calico route-reflector label drift problem (#828) * Add Calico route-reflector label drift problem * Address Calico route-reflector review comments * Harden Calico cleanup ownership tracking * Fix Codex agent install verification * Tighten Codex platform package detection * Restore kubelet eviction reset cleanup * Neutralize Calico ownership metadata --------- Co-authored-by: Munim Thahmid <[email protected]> Co-authored-by: Saad Mohammad Rafid Pial <[email protected]> * Fail alert oracle on Prometheus query errors (#912) * Decouple failure configmaps from mongo pods in `hotel-reservation` (#899) * decouple failure configmaps from mongo pods * remove empty failure configmaps creation * Support local LLM endpoints for Stratus and OpenCode (#917) * Support local LLM endpoints for Stratus * Prefer env vars for local LLM endpoints * Support local LLM endpoints for OpenCode * Route local endpoints into agent containers * Normalize OpenCode local judge models --------- Co-authored-by: Saad Mohammad Rafid Pial <[email protected]> * Preflight check the judge model (#924) * Add support for uniform agent trajectory (ATIF format) (#918) * add support for ATIF trajectory conversion and normalization, add claudecode adapter * fix: make _finish_problem idempotent * isolate .codex mount in container runner * better temp dir cleanup * add codex adapter * add opencode adapter * add copilot adapter * add stratus adapter * fix antropic caching for stratus * add gemini adapter * store normalized ATIF trajectories in SQLite indexed by problem type * edge tests * bump litellm, tikoken * update docker lib versions * Add node_clock_drift Problem (#894) * adding clock drift problem * fixing race condition causing sidecar log delay * fixing recover_fault to reverse time sync removal applied, improve cleanup * global cleanup added + fixed restoration for node_clock_drift problem * fixing mitigation oracle to ensure correct node checked * adding problem to non emulated cluster problems list * extending wait * indentation error fix * fixing time restoration in global cleanup * adding in check to make sure it picks worker node * adding another control plane filter, fixing clock step-back in global recovery * increase sidecar rollout timeout, make podnames/labels generic, idempotancy check * formatting fixes * format fix * fix * fix ruff check/format issues --------- Co-authored-by: Saad Mohammad Rafid Pial <[email protected]> * Minimum viable python version * Changed diagnosis oracle * Cleaned up fault recovery * Edit tasklist.yml * Removed old Java artifacts * Updated mitigation oracle to be more robust * Added polling * Fail Kafka producer leak injection on timeout --------- Co-authored-by: Saad Mohammad Rafid Pial <[email protected]> Co-authored-by: Kerem Akcalioglu <[email protected]> Co-authored-by: ermias mulugeta <[email protected]> Co-authored-by: Tejas Shukla <[email protected]> Co-authored-by: Petr Myagkov <[email protected]> Co-authored-by: Omar Faruqe Riyad <[email protected]> Co-authored-by: Mohammad Tamimul Ehsan <[email protected]> Co-authored-by: Munim Thahmid <[email protected]> Co-authored-by: Om Kumar <[email protected]> Co-authored-by: Munim Thahmid <[email protected]> Co-authored-by: Tanzim Hossain Romel <[email protected]> Co-authored-by: haani-maybe <[email protected]>
This PR introduces shell state persistence in the
SREGym>cli and emerges from the discussion in #883 and #898. Previously #900, I sincerely apologize for the confusion due to untracked changes in the old PR, and thank @munimthahmid for patiently pointing out the errors.