Skip to content

Commit

Permalink
[antlir2] extend fbpkg_install feature with canonical_uuid and organi…
Browse files Browse the repository at this point in the history
…ze_alias options

Summary:
See discussion with vmagro in [workplace](https://fb.workplace.com/groups/metalos.dev/posts/24499260009720465).

Here I am adding two new options:

* `canonical_uuid`: if true instead of using compressed UUID (first 7 digits) we use the canonical UUID
* `organized_alias`: I found out that this option was implemented but not exposed and it is one thing I need :)

Test Plan:
This has been tested in the diff above this but here is a paste bin of a buck run using the diff above:

```
bash-5.1# ls -lh /etc/packages/*
/etc/packages/neteng-ai-te_agent:
total 12K
lrwxrwxrwx 1 root root 32 Jan 12 06:53 LAST -> e74e737643c674aaa65a8b7afd9a05ba
lrwxrwxrwx 1 root root 37 Jan 12 06:53 current -> /etc/packages/neteng-ai-te_agent/prod
drwxr-xr-x 1 root root 60 Jan 12 06:53 e74e737643c674aaa65a8b7afd9a05ba
lrwxrwxrwx 1 root root 32 Jan 12 06:53 prod -> e74e737643c674aaa65a8b7afd9a05ba

/etc/packages/neteng-fboss-bgpd:
total 12K
drwxr-xr-x 1 root root 78 Jan 12 06:52 074a1fcbc1ef393372492d8f6d97ba9e
lrwxrwxrwx 1 root root 32 Jan 12 06:52 LAST -> 074a1fcbc1ef393372492d8f6d97ba9e
lrwxrwxrwx 1 root root 36 Jan 12 06:53 current -> /etc/packages/neteng-fboss-bgpd/prod
lrwxrwxrwx 1 root root 32 Jan 12 06:52 prod -> 074a1fcbc1ef393372492d8f6d97ba9e

/etc/packages/neteng-fboss-fsdb:
total 12K
drwxr-xr-x 1 root root 32 Jan 12 06:53 94462b2ca4d3371d0e9806ab3a423597
lrwxrwxrwx 1 root root 32 Jan 12 06:53 LAST -> 94462b2ca4d3371d0e9806ab3a423597
lrwxrwxrwx 1 root root 36 Jan 12 06:53 current -> /etc/packages/neteng-fboss-fsdb/prod
lrwxrwxrwx 1 root root 32 Jan 12 06:53 prod -> 94462b2ca4d3371d0e9806ab3a423597

/etc/packages/neteng-fboss-mka_service:
total 12K
drwxr-xr-x 1 root root 86 Jan 12 06:53 78496b76e3e3eab14918e364abb0039d
lrwxrwxrwx 1 root root 32 Jan 12 06:53 LAST -> 78496b76e3e3eab14918e364abb0039d
lrwxrwxrwx 1 root root 43 Jan 12 06:53 current -> /etc/packages/neteng-fboss-mka_service/prod
lrwxrwxrwx 1 root root 32 Jan 12 06:53 prod -> 78496b76e3e3eab14918e364abb0039d

/etc/packages/neteng-fboss-qsfp_service:
total 12K
drwxr-xr-x 1 root root 178 Jan 12 06:53 6642dbb5175fe7dd8ac9891b0ef3b89f
lrwxrwxrwx 1 root root  32 Jan 12 06:53 LAST -> 6642dbb5175fe7dd8ac9891b0ef3b89f
lrwxrwxrwx 1 root root  44 Jan 12 06:53 current -> /etc/packages/neteng-fboss-qsfp_service/prod
lrwxrwxrwx 1 root root  32 Jan 12 06:53 prod -> 6642dbb5175fe7dd8ac9891b0ef3b89f

/etc/packages/neteng-fboss-wedge_agent:
total 12K
lrwxrwxrwx 1 root root  32 Jan 12 06:52 LAST -> e1436044932274bfdce494e97f13f382
lrwxrwxrwx 1 root root  43 Jan 12 06:53 current -> /etc/packages/neteng-fboss-wedge_agent/prod
drwxr-xr-x 1 root root 390 Jan 12 06:52 e1436044932274bfdce494e97f13f382
lrwxrwxrwx 1 root root  32 Jan 12 06:52 prod -> e1436044932274bfdce494e97f13f382

/etc/packages/openr:
total 12K
drwxr-xr-x 1 root root 148 Jan 12 06:52 474c608296856a97da81f06cde6554b4
lrwxrwxrwx 1 root root  32 Jan 12 06:52 LAST -> 474c608296856a97da81f06cde6554b4
lrwxrwxrwx 1 root root  24 Jan 12 06:53 current -> /etc/packages/openr/prod
lrwxrwxrwx 1 root root  32 Jan 12 06:52 prod -> 474c608296856a97da81f06cde6554b4
```

Reviewed By: vmagro

Differential Revision: D52733725

fbshipit-source-id: e42c9c86e158a798244cbf3da9be93e79140d07c
  • Loading branch information
pallotron authored and facebook-github-bot committed Jan 13, 2024
1 parent fa61500 commit ced29b7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions antlir/antlir2/antlir2_compile/src/plan.rs
Expand Up @@ -113,6 +113,7 @@ pub struct InstallFbpkg {
pub dst: Option<PathBuf>,
pub organize: bool,
pub organize_alias: Option<String>,
pub canonical_uuid: bool,
}

#[derive(Debug, Clone, Deserialize, Serialize)]
Expand Down

0 comments on commit ced29b7

Please sign in to comment.