Skip to content

Conversation

svij-sc
Copy link
Collaborator

@svij-sc svij-sc commented Sep 7, 2025

Scope of work done

bootstrap_resource_config.py is currently too flexible, which makes bootstrapping unnecessarily complex. We will simplify it by removing support for arbitrary input/output paths and focusing only on the primary use case: setting up resource configs for local testing. The script’s sole purpose is to help developers quickly configure their machines for unit, integration, and end-to-end tests. For larger projects, configs are set up manually anyway, and this script isn’t being used. Its intended audience is developers onboarding their local environments.

Where is the documentation for this feature?: N/A

Did you add automated tests or write a test plan?

Was used to test the following changes; particularly note the use of env variables:

resource_config_uri: "${oc.env:GIGL_TEST_DEFAULT_RESOURCE_CONFIG,deployment/configs/e2e_cicd_resource_config.yaml}"
cora_snc_test:
task_config_uri: "gigl/src/mocking/configs/e2e_supervised_node_classification_template_gbml_config.yaml"
resource_config_uri: "${oc.env:GIGL_TEST_DEFAULT_RESOURCE_CONFIG,deployment/configs/e2e_cicd_resource_config.yaml}"
cora_udl_test:
task_config_uri: "gigl/src/mocking/configs/e2e_udl_node_anchor_based_link_prediction_template_gbml_config.yaml"
resource_config_uri: "${oc.env:GIGL_TEST_DEFAULT_RESOURCE_CONFIG,deployment/configs/e2e_cicd_resource_config.yaml}"
dblp_nalp_test:
task_config_uri: "gigl/src/mocking/configs/dblp_node_anchor_based_link_prediction_template_gbml_config.yaml"
resource_config_uri: "${oc.env:GIGL_TEST_DEFAULT_RESOURCE_CONFIG,deployment/configs/e2e_cicd_resource_config.yaml}"
hom_cora_sup_test:
task_config_uri: "examples/link_prediction/configs/e2e_hom_cora_sup_task_config.yaml"
resource_config_uri: "${oc.env:GIGL_TEST_IN_MEMORY_DEFAULT_RESOURCE_CONFIG,deployment/configs/e2e_glt_resource_config.yaml}"
het_dblp_sup_test:
task_config_uri: "examples/link_prediction/configs/e2e_het_dblp_sup_task_config.yaml"
resource_config_uri: "${oc.env:GIGL_TEST_IN_MEMORY_DEFAULT_RESOURCE_CONFIG,deployment/configs/e2e_glt_resource_config.yaml}"

See the following for the tests that were kicked off:
#301 (comment)

Updated Changelog.md? NO

Ready for code review?: NO

Comment on lines -127 to 156
export_lines = [
start_marker + "\n",
"# This section is auto-generated by GiGL/scripts/bootstrap_resource_config.py.\n",
f'export GIGL_TEST_DEFAULT_RESOURCE_CONFIG="{gigl_test_default_resource_config}"\n',
f'export GIGL_PROJECT="{gigl_project}"\n',
f'export GIGL_DOCKER_ARTIFACT_REGISTRY="{gigl_docker_artifact_registry_path}"\n',
end_marker + "\n",
f'export {key}="{value}"\n' for key, value in shell_env_vars.items()
]
export_lines = (
[
start_marker + "\n",
"# This section is auto-generated by GiGL/scripts/bootstrap_resource_config.py.\n",
]
+ export_lines
+ [
end_marker + "\n",
]
)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this whole bit is a bit confusing with the different variables and hard-coded strings and lists.

Can we just use one f-string?

Comment on lines +326 to +330
file_loader.load_file(
file_uri_src=file_uri_src, file_uri_dst=resource_config_destination_path
)
shell_env_vars[
template_config.env_var_to_update
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

btw should we log that we created these configs somehwere?

Comment on lines +336 to +339
update_shell_config(
shell_config_path=shell_config_path,
shell_env_vars=shell_env_vars,
)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, can we keep this update shell config bit as an option? I feel like I would not want to update my shell config when I do this (e.g. when I create some new configs for oss but want to keep the internal config for personal use)


# Template configurations to process
TEMPLATE_CONFIGS = {
"default": TemplateConfig(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we name this tabularized?

template_path=GIGL_ROOT_DIR
/ "deployment"
/ "configs"
/ "e2e_cicd_resource_config.yaml",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just pointing out some inconsistency in naming re: cicd vs. glt. not sure if this is appropriate / intended

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants