Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add copy all options to register script #2464

Conversation

bgedik
Copy link
Contributor

@bgedik bgedik commented Jun 6, 2024

Why are the changes needed?

FlyteRemote.register_script() copies the entire source directory with some default ignore filters, but does not let the user customize the ignore filters.

What changes were proposed in this pull request?

API changes to allow additional ignore filters during workflow registery.

How was this patch tested?

Unit tests for fast_registration.py

Setup process

Screenshots

Check all the applicable boxes

  • I updated the documentation accordingly.
  • All new and existing tests passed.
  • All commits are signed-off.

Related PRs

?

Docs link

?

Copy link

welcome bot commented Jun 6, 2024

Thank you for opening this pull request! 🙌

These tips will help get your PR across the finish line:

  • Most of the repos have a PR template; if not, fill it out to the best of your knowledge.
  • Sign off your commits (Reference: DCO Guide).

bugra.gedik added 6 commits June 6, 2024 08:24
Signed-off-by: bugra.gedik <bugra.gedik@predera.ai>
Signed-off-by: bugra.gedik <bugra.gedik@predera.ai>
Signed-off-by: bugra.gedik <bugra.gedik@predera.ai>
… github.com:bgedik/flytekit into bugra.gedik/add_copy_all_options_to_register_script
Copy link

codecov bot commented Jun 10, 2024

Codecov Report

Attention: Patch coverage is 94.44444% with 1 line in your changes missing coverage. Please review.

Project coverage is 78.44%. Comparing base (63f190e) to head (4df6f26).

Current head 4df6f26 differs from pull request most recent head 817dce5

Please upload reports for the commit 817dce5 to get more accurate results.

Files Patch % Lines
flytekit/remote/remote.py 75.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           master    #2464       +/-   ##
===========================================
+ Coverage   41.82%   78.44%   +36.62%     
===========================================
  Files         182      182               
  Lines       18505    18514        +9     
  Branches     3856     3643      -213     
===========================================
+ Hits         7740    14524     +6784     
+ Misses      10637     3331     -7306     
- Partials      128      659      +531     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

FastPackageOptions is used to set configuration options when packaging files.
"""

ignores: list[Ignore] = None
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
ignores: list[Ignore] = None
ignores: Optional[list[Ignore]] = None

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My bad, this was supposed to be a mandatory one, removed the None

@@ -965,7 +970,7 @@ def register_script(
project: typing.Optional[str] = None,
domain: typing.Optional[str] = None,
destination_dir: str = ".",
copy_all: bool = False,
copy_all: typing.Union[bool, FastPackageOptions] = False,
Copy link
Contributor

Choose a reason for hiding this comment

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

can we make this a separate arg? it can be ignored if copy is not used.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@wild-endeavor
Copy link
Contributor

thanks @bgedik - the copy_all union though, could we split that out please? I think it's nicer to have that explicitly split out.

@wild-endeavor
Copy link
Contributor

test error looks like it's not related, but take a look at lint?

@bgedik
Copy link
Contributor Author

bgedik commented Jun 13, 2024

test error looks like it's not related, but take a look at lint?

@wild-endeavor The lint is fixed, but there is now an unrelated error from Mac build

@wild-endeavor
Copy link
Contributor

@bgedik not sure what is happening with the test failure, but it's been fixed on master. Can you pull in master and push to this pr please?

@wild-endeavor wild-endeavor merged commit 17835e0 into flyteorg:master Jun 13, 2024
43 of 46 checks passed
Copy link

welcome bot commented Jun 13, 2024

Congrats on merging your first pull request! 🎉

bgedik added a commit to bgedik/flytekit that referenced this pull request Jul 3, 2024
Signed-off-by: bugra.gedik <bugra.gedik@predera.ai>
Signed-off-by: bugra.gedik <bugra.gedik@predera.ai>
fiedlerNr9 pushed a commit that referenced this pull request Jul 25, 2024
Signed-off-by: bugra.gedik <bugra.gedik@predera.ai>
Signed-off-by: Jan Fiedler <jan@union.ai>
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.

2 participants