Skip to content

[Nexthop] Add build entrypoint for FBOSS Image Builder#804

Closed
raghav-nexthop wants to merge 2 commits intofacebook:mainfrom
nexthop-ai:raghav.distro-cli-entrypoint-part8
Closed

[Nexthop] Add build entrypoint for FBOSS Image Builder#804
raghav-nexthop wants to merge 2 commits intofacebook:mainfrom
nexthop-ai:raghav.distro-cli-entrypoint-part8

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 build entrypoint orchestration for component-based builds:

  • Implement build entrypoint for coordinating component build workflows
  • Add support for build configuration and execution management

Test Plan

Added comprehensive unit tests for entrypoint functionality

cd /work/raghav/private-fboss && git checkout raghav.distro-cli-entrypoint-part8 && cd fboss-image && PYTHONPATH=/work/raghav/private-fboss/fboss-image:$PYTHONPATH python3 -m pytest distro_cli/tests/ -v
Switched to branch 'raghav.distro-cli-entrypoint-part8'
=================================================================== 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 52 items                                                                                                                                         

distro_cli/tests/artifact_test.py::TestArtifactStore::test_data_metadata_separation PASSED                                                           [  1%]
distro_cli/tests/artifact_test.py::TestArtifactStore::test_fetch_fn_receives_stored_files PASSED                                                     [  3%]
distro_cli/tests/artifact_test.py::TestArtifactStore::test_fetch_fn_store_miss_updates_store PASSED                                                  [  5%]
distro_cli/tests/artifact_test.py::TestArtifactStore::test_get_store_hit PASSED                                                                      [  7%]
distro_cli/tests/artifact_test.py::TestArtifactStore::test_get_store_miss PASSED                                                                     [  9%]
distro_cli/tests/artifact_test.py::TestArtifactStore::test_multiple_data_files PASSED                                                                [ 11%]
distro_cli/tests/artifact_test.py::TestArtifactStore::test_store_data_and_metadata PASSED                                                            [ 13%]
distro_cli/tests/artifact_test.py::TestArtifactStore::test_store_data_only PASSED                                                                    [ 15%]
distro_cli/tests/build_entrypoint_test.py::TestBuildEntrypoint::test_entrypoint_with_empty_dependencies PASSED                                       [ 17%]
distro_cli/tests/build_entrypoint_test.py::TestBuildEntrypoint::test_entrypoint_without_dependencies PASSED                                          [ 19%]
distro_cli/tests/build_test.py::TestBuildCommand::test_build_all_stub PASSED                                                                         [ 21%]
distro_cli/tests/build_test.py::TestBuildCommand::test_build_command_exists PASSED                                                                   [ 23%]
distro_cli/tests/build_test.py::TestBuildCommand::test_build_specific_components_stub PASSED                                                         [ 25%]
distro_cli/tests/cli_test.py::ValidatePathTest::test_validate_path_converts_to_path PASSED                                                           [ 26%]
distro_cli/tests/cli_test.py::ValidatePathTest::test_validate_path_existing_file PASSED                                                              [ 28%]
distro_cli/tests/cli_test.py::ValidatePathTest::test_validate_path_nonexistent_file_raises PASSED                                                    [ 30%]
distro_cli/tests/cli_test.py::ValidatePathTest::test_validate_path_nonexistent_file_without_check PASSED                                             [ 32%]
distro_cli/tests/cli_test.py::CommandGroupTest::test_add_command_to_group PASSED                                                                     [ 34%]
distro_cli/tests/cli_test.py::CommandGroupTest::test_add_command_with_arguments PASSED                                                               [ 36%]
distro_cli/tests/cli_test.py::CommandGroupTest::test_command_group_creation PASSED                                                                   [ 38%]
distro_cli/tests/cli_test.py::CommandGroupTest::test_command_group_with_arguments PASSED                                                             [ 40%]
distro_cli/tests/cli_test.py::CLITest::test_add_command PASSED                                                                                       [ 42%]
distro_cli/tests/cli_test.py::CLITest::test_add_command_group PASSED                                                                                 [ 44%]
distro_cli/tests/cli_test.py::CLITest::test_add_command_with_arguments PASSED                                                                        [ 46%]
distro_cli/tests/cli_test.py::CLITest::test_cli_creation PASSED                                                                                      [ 48%]
distro_cli/tests/cli_test.py::CLITest::test_cli_with_verbose_flag PASSED                                                                             [ 50%]
distro_cli/tests/cli_test.py::CLITest::test_cli_without_verbose_flag PASSED                                                                          [ 51%]
distro_cli/tests/device_test.py::TestDeviceCommands::test_device_commands_exist PASSED                                                               [ 53%]
distro_cli/tests/device_test.py::TestDeviceCommands::test_getip_stub PASSED                                                                          [ 55%]
distro_cli/tests/device_test.py::TestDeviceCommands::test_image_stub PASSED                                                                          [ 57%]
distro_cli/tests/device_test.py::TestDeviceCommands::test_image_upstream_stub PASSED                                                                 [ 59%]
distro_cli/tests/device_test.py::TestDeviceCommands::test_reprovision_stub PASSED                                                                    [ 61%]
distro_cli/tests/device_test.py::TestDeviceCommands::test_ssh_stub PASSED                                                                            [ 63%]
distro_cli/tests/device_test.py::TestDeviceCommands::test_update_stub PASSED                                                                         [ 65%]
distro_cli/tests/docker_image_test.py::TestShouldBuildImage::test_custom_expiration_time PASSED                                                      [ 67%]
distro_cli/tests/docker_image_test.py::TestShouldBuildImage::test_image_exists_and_not_expired PASSED                                                [ 69%]
distro_cli/tests/docker_image_test.py::TestShouldBuildImage::test_image_expired PASSED                                                               [ 71%]
distro_cli/tests/docker_image_test.py::TestShouldBuildImage::test_image_not_found PASSED                                                             [ 73%]
distro_cli/tests/docker_test.py::TestDockerInfrastructure::test_run_simple_container PASSED                                                          [ 75%]
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%]

==================================================================== 52 passed in 2.78s ====================================================================

@meta-cla meta-cla bot added the CLA Signed label Jan 9, 2026
@raghav-nexthop raghav-nexthop force-pushed the raghav.distro-cli-entrypoint-part8 branch from 070868b to f61517d Compare January 12, 2026 18:30
@raghav-nexthop raghav-nexthop force-pushed the raghav.distro-cli-entrypoint-part8 branch 7 times, most recently from f16f7f7 to 2ce56f8 Compare January 29, 2026 03:10
@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-entrypoint-part8 branch from 2ce56f8 to 4bc32e0 Compare February 3, 2026 02:01
@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-entrypoint-part8 branch from 4bc32e0 to 853ec88 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

@raghav-nexthop raghav-nexthop force-pushed the raghav.distro-cli-entrypoint-part8 branch from 853ec88 to 04c8cc0 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 PR stack

@raghav-nexthop raghav-nexthop force-pushed the raghav.distro-cli-entrypoint-part8 branch from 04c8cc0 to aa1095f 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-entrypoint-part8 branch from aa1095f to c1e4b33 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.

@raghav-nexthop raghav-nexthop force-pushed the raghav.distro-cli-entrypoint-part8 branch from c1e4b33 to b14cc99 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.

@meta-codesync
Copy link

meta-codesync bot commented Feb 7, 2026

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

@raghav-nexthop raghav-nexthop force-pushed the raghav.distro-cli-entrypoint-part8 branch from b14cc99 to 9f2bd38 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-entrypoint-part8 branch from 9f2bd38 to fec982e 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-entrypoint-part8 branch from fec982e to 49aa526 Compare February 10, 2026 02:39
@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.
Add build entrypoint orchestration for component-based builds.

- Implement build entrypoint for coordinating component build workflows
- Add support for build configuration and execution management
- Include comprehensive unit tests for entrypoint functionality
@raghav-nexthop raghav-nexthop force-pushed the raghav.distro-cli-entrypoint-part8 branch from 49aa526 to 42ab1d2 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 1534e53.

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