Add extra logging for remote development reconcoliation loop
issue - Add `config_to_apply_resources_included` to `ra... (#426808 - closed)
What does this MR do and why?
add extra logging for debugging purposes during the reconciliation loop for remote development
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Pls see the below logging for my local test case
RemoteDevelopment::Workspace.create(
project_id: 3,
force_include_all_resources: true,
cluster_agent_id: 2,
user_id: 16,
personal_access_token_id: 1,
editor: 'webide',
max_hours_before_termination: 24,
dns_zone: "workspaces.localdev.me",
desired_state: RemoteDevelopment::Workspaces::States::STOPPED,
actual_state: RemoteDevelopment::Workspaces::States::STOPPED,
name: "zl-workspace",
namespace: "zl-workspace-namespace",
devfile_ref: 'main',
devfile_path: '.devfile.yaml',
# config_version: RemoteDevelopment::Workspaces::ConfigVersion::LATEST_VERSION
).save!
foo = ::RemoteDevelopment::Workspaces::Reconcile::Output::ResponsePayloadBuilder.build(
{
update_type: "partial",
settings: {
full_reconciliation_interval_seconds: 120,
partial_reconciliation_interval_seconds: 30
},
logger: RemoteDevelopment::Logger.build,
workspaces_to_be_returned: [
RemoteDevelopment::Workspace.find(5)
],
agent: Clusters::Agent.find(2)
}
)
::RemoteDevelopment::Workspaces::Reconcile::Output::ResponsePayloadObserver.observe(foo)
{"severity":"DEBUG","time":"2024-05-27T03:03:21.871Z","message":"Returning verified response_payload","agent_id":2,"update_type":"partial","response_payload":{"workspace_rails_info_count":1,"workspace_rails_infos":[{"name":"zl-workspace","namespace":"zl-workspace-namespace","desired_state":"Stopped","actual_state":"Stopped","deployment_resource_version":null}],"settings":{"full_reconciliation_interval_seconds":120,"partial_reconciliation_interval_seconds":30}},"observability_for_rails_infos":{"zl-workspace":{"config_to_apply_resources_included":"no_resources_included"}}}
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
Edited by Zhaochen Li