Add `config_to_apply_resources_included` to `rails_infos` reconciliation logging
MR: Add extra logging for remote development reconc... (!154853 - merged)
Description
Add config_to_apply_resources_included
entry to rails_infos
reconciliation logging, indicating how config_to_apply
was generated for each rails_infos
entry.
The valid values should be:
all_resources_included
partial_resources_included
no_resources_included
This is an observability-only entry, not actually part of the returned rails_infos
.
Related: !132507 (merged)
Acceptance Criteria
-
The config_to_apply_resources_included
field should be logged correctly for all scenarios. Seeee/spec/lib/remote_development/workspaces/reconcile/output/workspaces_to_rails_infos_converter_spec.rb
for all possible scenarios which will impact the value.
Technical Requirements
This will be accomplished in ee/lib/remote_development/workspaces/reconcile/output/rails_infos_observer.rb
, modify the log statement for Returning workspace_rails_infos
to add the new config_to_apply_resources_included
field.
This means we will somehow need to modify ee/lib/remote_development/workspaces/reconcile/output/workspaces_to_rails_infos_converter.rb to pass along this information to
ee/lib/remote_development/workspaces/reconcile/output/rails_infos_observer.rb`.
The preferred way to do this will probably be to add a new entry to value
, which will be a hash.
The key of the hash in value
will be observability_for_rails_infos_config_to_apply_resources_included
or something like that. (edit: updated, see alternate approach below)
The key of the hash in value will be
observability_for_rails_infos`.
The hash itself will be have a key of the workspace name
.
The value for each workspace's entry will be another hash, with a single entry named config_to_apply_resources_included
, and the value to be logged for that workspace's config_to_apply_resources_included
in ee/lib/remote_development/workspaces/reconcile/output/rails_infos_observer.rb
.
Here's an example of the structure in value
:
value = {
observability_for_rails_infos: {
'workspace_1' => {
config_to_apply_resources_included: :all_resources_included
},
'workspace_2' => {
config_to_apply_resources_included: :partial_resources_included
},
'workspace_3' => {
config_to_apply_resources_included: :no_resources_included
}
}
}
This approach would allow us in the future to more easily add additional observability-only fields for each entry in observability_for_rails_infos
, without having to add a new top-level entry in the `value.
Impact Assessment
This will be useful when debugging Remote Development scenarios especially related to private repos and other cases potentially affected by whether or not a given reconciliation included all resources.