Skip to content

Commit

Permalink
Added flag to register as well
Browse files Browse the repository at this point in the history
Signed-off-by: Vanshika Chowdhary <[email protected]>
  • Loading branch information
Vanshika Chowdhary committed Sep 8, 2022
1 parent 7227af8 commit 957d18a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion flytekit/clis/sdk_in_container/register.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,12 @@
type=str,
help="Version the package or module is registered with",
)
@click.option(
"--deref-symlinks",
default=False,
is_flag=True,
help="Enables symlink dereferencing when packaging files in fast registration",
)
@click.argument("package-or-module", type=click.Path(exists=True, readable=True, resolve_path=True), nargs=-1)
@click.pass_context
def register(
Expand All @@ -111,6 +117,7 @@ def register(
service_account: str,
raw_data_prefix: str,
version: typing.Optional[str],
deref_symlinks: bool,
package_or_module: typing.Tuple[str],
):
"""
Expand Down Expand Up @@ -142,7 +149,7 @@ def register(
# Create a zip file containing all the entries.
detected_root = find_common_root(package_or_module)
cli_logger.debug(f"Using {detected_root} as root folder for project")
zip_file = fast_package(detected_root, output)
zip_file = fast_package(detected_root, output, deref_symlinks)

# Upload zip file to Admin using FlyteRemote.
md5_bytes, native_url = remote._upload_file(pathlib.Path(zip_file))
Expand Down

0 comments on commit 957d18a

Please sign in to comment.