Skip to content

[Nexthop] Add component system for FBOSS Image Builder#803

Closed
raghav-nexthop wants to merge 1 commit intofacebook:mainfrom
nexthop-ai:raghav.distro-cli-component-part7
Closed

[Nexthop] Add component system for FBOSS Image Builder#803
raghav-nexthop wants to merge 1 commit intofacebook:mainfrom
nexthop-ai:raghav.distro-cli-component-part7

Conversation

@raghav-nexthop
Copy link
Contributor

@raghav-nexthop raghav-nexthop commented Jan 9, 2026

Pre-submission checklist

  • I've ran the linters locally and fixed lint errors related to the files I modified in this PR. You can install the linters by running pip install -r requirements-dev.txt && pre-commit install
  • pre-commit run

Summary

Add abstract build component framework for managing build operations.

  • Implement AbstractComponent base class for build components
  • Add component lifecycle management (prepare, build, extract)
  • Integrate with artifact store, download, and execute modules
  • Enable extensible component-based build architecture

Test Plan

Tests utilizing the above infrastructure will be added when component build supports are included.

cd /work/raghav/private-fboss && git checkout raghav.distro-cli-component-part7 && cd fboss-image && PYTHONPATH=/work/raghav/private-fboss/fboss-image:$PYTHONPATH python3 -m pytest distro_cli/tests/ -v
Switched to branch 'raghav.distro-cli-component-part7'
=================================================================== test session starts ====================================================================
platform linux -- Python 3.10.12, pytest-8.4.1, pluggy-1.6.0 -- /usr/bin/python3
cachedir: .pytest_cache
rootdir: /work/raghav/private-fboss/fboss-image
collected 50 items                                                                                                                                         

distro_cli/tests/artifact_test.py::TestArtifactStore::test_data_metadata_separation PASSED                                                           [  2%]
distro_cli/tests/artifact_test.py::TestArtifactStore::test_fetch_fn_receives_stored_files PASSED                                                     [  4%]
distro_cli/tests/artifact_test.py::TestArtifactStore::test_fetch_fn_store_miss_updates_store PASSED                                                  [  6%]
distro_cli/tests/artifact_test.py::TestArtifactStore::test_get_store_hit PASSED                                                                      [  8%]
distro_cli/tests/artifact_test.py::TestArtifactStore::test_get_store_miss PASSED                                                                     [ 10%]
distro_cli/tests/artifact_test.py::TestArtifactStore::test_multiple_data_files PASSED                                                                [ 12%]
distro_cli/tests/artifact_test.py::TestArtifactStore::test_store_data_and_metadata PASSED                                                            [ 14%]
distro_cli/tests/artifact_test.py::TestArtifactStore::test_store_data_only PASSED                                                                    [ 16%]
distro_cli/tests/build_test.py::TestBuildCommand::test_build_all_stub PASSED                                                                         [ 18%]
distro_cli/tests/build_test.py::TestBuildCommand::test_build_command_exists PASSED                                                                   [ 20%]
distro_cli/tests/build_test.py::TestBuildCommand::test_build_specific_components_stub PASSED                                                         [ 22%]
distro_cli/tests/cli_test.py::ValidatePathTest::test_validate_path_converts_to_path PASSED                                                           [ 24%]
distro_cli/tests/cli_test.py::ValidatePathTest::test_validate_path_existing_file PASSED                                                              [ 26%]
distro_cli/tests/cli_test.py::ValidatePathTest::test_validate_path_nonexistent_file_raises PASSED                                                    [ 28%]
distro_cli/tests/cli_test.py::ValidatePathTest::test_validate_path_nonexistent_file_without_check PASSED                                             [ 30%]
distro_cli/tests/cli_test.py::CommandGroupTest::test_add_command_to_group PASSED                                                                     [ 32%]
distro_cli/tests/cli_test.py::CommandGroupTest::test_add_command_with_arguments PASSED                                                               [ 34%]
distro_cli/tests/cli_test.py::CommandGroupTest::test_command_group_creation PASSED                                                                   [ 36%]
distro_cli/tests/cli_test.py::CommandGroupTest::test_command_group_with_arguments PASSED                                                             [ 38%]
distro_cli/tests/cli_test.py::CLITest::test_add_command PASSED                                                                                       [ 40%]
distro_cli/tests/cli_test.py::CLITest::test_add_command_group PASSED                                                                                 [ 42%]
distro_cli/tests/cli_test.py::CLITest::test_add_command_with_arguments PASSED                                                                        [ 44%]
distro_cli/tests/cli_test.py::CLITest::test_cli_creation PASSED                                                                                      [ 46%]
distro_cli/tests/cli_test.py::CLITest::test_cli_with_verbose_flag PASSED                                                                             [ 48%]
distro_cli/tests/cli_test.py::CLITest::test_cli_without_verbose_flag PASSED                                                                          [ 50%]
distro_cli/tests/device_test.py::TestDeviceCommands::test_device_commands_exist PASSED                                                               [ 52%]
distro_cli/tests/device_test.py::TestDeviceCommands::test_getip_stub PASSED                                                                          [ 54%]
distro_cli/tests/device_test.py::TestDeviceCommands::test_image_stub PASSED                                                                          [ 56%]
distro_cli/tests/device_test.py::TestDeviceCommands::test_image_upstream_stub PASSED                                                                 [ 58%]
distro_cli/tests/device_test.py::TestDeviceCommands::test_reprovision_stub PASSED                                                                    [ 60%]
distro_cli/tests/device_test.py::TestDeviceCommands::test_ssh_stub PASSED                                                                            [ 62%]
distro_cli/tests/device_test.py::TestDeviceCommands::test_update_stub PASSED                                                                         [ 64%]
distro_cli/tests/docker_image_test.py::TestShouldBuildImage::test_custom_expiration_time PASSED                                                      [ 66%]
distro_cli/tests/docker_image_test.py::TestShouldBuildImage::test_image_exists_and_not_expired PASSED                                                [ 68%]
distro_cli/tests/docker_image_test.py::TestShouldBuildImage::test_image_expired PASSED                                                               [ 70%]
distro_cli/tests/docker_image_test.py::TestShouldBuildImage::test_image_not_found PASSED                                                             [ 72%]
distro_cli/tests/docker_test.py::TestDockerInfrastructure::test_run_simple_container PASSED                                                          [ 74%]
distro_cli/tests/download_test.py::TestDownloadArtifact::test_download_file_url PASSED                                                               [ 76%]
distro_cli/tests/download_test.py::TestDownloadArtifact::test_download_file_url_mtime_caching PASSED                                                 [ 78%]
distro_cli/tests/download_test.py::TestDownloadArtifact::test_metadata_file_structure PASSED                                                         [ 80%]
distro_cli/tests/download_test.py::TestDownloadHTTP::test_download_http_caching PASSED                                                               [ 82%]
distro_cli/tests/download_test.py::TestDownloadHTTP::test_download_http_url PASSED                                                                   [ 84%]
distro_cli/tests/image_builder_test.py::TestImageBuilder::test_build_all_stub PASSED                                                                 [ 86%]
distro_cli/tests/image_builder_test.py::TestImageBuilder::test_build_components_stub PASSED                                                          [ 88%]
distro_cli/tests/image_builder_test.py::TestImageBuilder::test_builder_initialization PASSED                                                         [ 90%]
distro_cli/tests/manifest_test.py::TestImageManifest::test_has_component PASSED                                                                      [ 92%]
distro_cli/tests/manifest_test.py::TestImageManifest::test_load_manifest PASSED                                                                      [ 94%]
distro_cli/tests/manifest_test.py::TestImageManifest::test_missing_components PASSED                                                                 [ 96%]
distro_cli/tests/manifest_test.py::TestImageManifest::test_resolve_path_relative PASSED                                                              [ 98%]
distro_cli/tests/manifest_test.py::TestImageManifest::test_resolve_path_url PASSED                                                                   [100%]

==================================================================== 50 passed in 1.36s ====================================================================

@meta-cla meta-cla bot added the CLA Signed label Jan 9, 2026
@raghav-nexthop raghav-nexthop force-pushed the raghav.distro-cli-component-part7 branch from c299cfe to e18c6e2 Compare January 12, 2026 18:21
@raghav-nexthop raghav-nexthop force-pushed the raghav.distro-cli-component-part7 branch 6 times, most recently from 90d40a0 to 2973c31 Compare January 29, 2026 03:08
@facebook-github-bot
Copy link
Contributor

@raghav-nexthop has updated the pull request. You must reimport the pull request before landing.

@raghav-nexthop raghav-nexthop force-pushed the raghav.distro-cli-component-part7 branch from 2973c31 to d4c3119 Compare February 3, 2026 01:59
@facebook-github-bot
Copy link
Contributor

@raghav-nexthop has updated the pull request. You must reimport the pull request before landing.

@raghav-nexthop raghav-nexthop force-pushed the raghav.distro-cli-component-part7 branch from d4c3119 to 5197a2f Compare February 5, 2026 01:32
@facebook-github-bot
Copy link
Contributor

@raghav-nexthop has updated the pull request. You must reimport the pull request before landing.

@kevin645
Copy link

kevin645 commented Feb 5, 2026

can we rebase this

@raghav-nexthop raghav-nexthop force-pushed the raghav.distro-cli-component-part7 branch from 5197a2f to d476228 Compare February 5, 2026 19:15
@facebook-github-bot
Copy link
Contributor

@raghav-nexthop has updated the pull request. You must reimport the pull request before landing.

@raghav-nexthop
Copy link
Contributor Author

I've rebased the entire PR stack

@raghav-nexthop raghav-nexthop force-pushed the raghav.distro-cli-component-part7 branch from d476228 to d358eac Compare February 5, 2026 22:41
@facebook-github-bot
Copy link
Contributor

@raghav-nexthop has updated the pull request. You must reimport the pull request before landing.

@raghav-nexthop raghav-nexthop force-pushed the raghav.distro-cli-component-part7 branch from d358eac to 4e8ea2b Compare February 6, 2026 22:25
@facebook-github-bot
Copy link
Contributor

@raghav-nexthop has updated the pull request. You must reimport the pull request before landing.

@meta-codesync
Copy link

meta-codesync bot commented Feb 6, 2026

@kevin645 has imported this pull request. If you are a Meta employee, you can view this in D91737214.

@raghav-nexthop raghav-nexthop force-pushed the raghav.distro-cli-component-part7 branch from 4e8ea2b to 97a4dfb Compare February 7, 2026 00:32
@facebook-github-bot
Copy link
Contributor

@raghav-nexthop has updated the pull request. You must reimport the pull request before landing.

@raghav-nexthop raghav-nexthop force-pushed the raghav.distro-cli-component-part7 branch from 97a4dfb to 90870df Compare February 10, 2026 02:25
@facebook-github-bot
Copy link
Contributor

@raghav-nexthop has updated the pull request. You must reimport the pull request before landing.

@raghav-nexthop raghav-nexthop force-pushed the raghav.distro-cli-component-part7 branch from 90870df to f38218a Compare February 10, 2026 02:34
@facebook-github-bot
Copy link
Contributor

@raghav-nexthop has updated the pull request. You must reimport the pull request before landing.

@raghav-nexthop raghav-nexthop force-pushed the raghav.distro-cli-component-part7 branch from f38218a to 0d07ebf Compare February 10, 2026 02:38
@facebook-github-bot
Copy link
Contributor

@raghav-nexthop has updated the pull request. You must reimport the pull request before landing.

Add abstract build component framework for managing build operations.

- Implement AbstractComponent base class for build components
- Add component lifecycle management (prepare, build, extract)
- Integrate with artifact store, download, and execute modules
- Enable extensible component-based build architecture

Tests utilizing the above infrastructure will be added when component build supports are included.
@raghav-nexthop raghav-nexthop force-pushed the raghav.distro-cli-component-part7 branch from 0d07ebf to ba14bdc Compare February 10, 2026 02:45
@facebook-github-bot
Copy link
Contributor

@raghav-nexthop has updated the pull request. You must reimport the pull request before landing.

@meta-codesync
Copy link

meta-codesync bot commented Feb 12, 2026

@kevin645 merged this pull request in dcb5fe5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments