Prevent Agentk remote_development module from processing new config if rails agent_config validation fails
MR: Pending <!-- NOTE: For context on MR heading, see: https://handbook.gitlab.com/handbook/engineering/devops/dev/create/remote-development/index.html#relationship-of-issues-to-mrs --> ## Description gitlab-org/gitlab#553324+ presented us with a case where, after failing to save the agent_config in Rails, we still have a configuration that the agent sees as "valid", e.g [dns_zone validation in rails ](https://gitlab.com/gitlab-org/gitlab/-/blob/5574606502bb5421746b3d668b2f9f02f277f210/ee/app/models/remote_development/workspaces_agent_config.rb#L25) prevents values like `example-.com`, but the agent does not validate at such a level. This led to the workspace module starting and calling the `/prerequisite` endpoint in Rails, expecting the agent to have an associated configuration record, leading to runtime errors when not found (we not guard against this). The real and long-term fix for this class of errors is to have a proper configuration update flow, but that might not be possible right now (link settings epic). Alternatively, we could also look into adding similar validation in Rails on the remote_development protobuf schema in the agent and reject config updates that likely failed in Rails ( agentk uses https://buf.build/bufbuild/protovalidate I believe, maybe explore that?) <!-- TODO: What kind of issue is this? Please uncomment and include one of the following: /label ~"type::feature" /label ~"type::bug" /label ~"type::maintenance" --> <!-- OPTIONAL: Is this a feature/enhancement? - Please describe the impact this feature/enhancement will have on the user experience and/or the product as a whole. - Provide a user story to illustrate the use case for this feature/enhancement. Include examples to help communicate the intended functionality. --> <!-- OPTIONAL: Is this a bug? Please uncomment and include the following: - **Current behavior:** - **Expected behavior:** - **Steps to reproduce:** - **Additional information:** please include VSCode version, browser dev tool logs, etc that might be helpful to debug the issue! --> ## Acceptance criteria TBD ## Implementation plan <!-- NOTE: Feel free to expand with more sections and headers as needed --> <!-- DO NOT TOUCH BELOW -->
issue