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

Update artifact IDL with new time partition #4737

Merged
merged 2 commits into from
Jan 24, 2024
Merged

Conversation

wild-endeavor
Copy link
Contributor

@wild-endeavor wild-endeavor commented Jan 17, 2024

The current partition information coerces the time value into a string and uses the special ds key to indicate that it's a time. This is awkward so let's pull it out into a separate field that's correctly typed.

Changes

Admin

  • Remove tag handling when running artifact queries.
  • Update the query handling to fill in the new time partition if needed.
  • Left the time parsing bit in there for now, but updated to ensure UTC.
  • Some tests.

IDL

  • Update ArtifactBindingData to be able to bind to the time partition, and also move the old and new field together into a oneof.
  • Add a new TimePartition message which has a timestamp field.
  • Add a new timestamp type field time_value to the LabelValue value oneof. This value should only be used for the new time partition message.
  • Unrelated, but made the existing partitions field in the ArtifactID not a oneof. Even if we one day need existence checking, the fact that it's a separate message already gives us that (the HasField call in python and the nil check in go).

Copy link

codecov bot commented Jan 17, 2024

Codecov Report

Attention: 12 lines in your changes are missing coverage. Please review.

Comparison is base (047924d) 58.20% compared to head (17ecb05) 58.32%.

Files Patch % Lines
flyteadmin/pkg/manager/impl/execution_manager.go 61.29% 9 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4737      +/-   ##
==========================================
+ Coverage   58.20%   58.32%   +0.12%     
==========================================
  Files         626      626              
  Lines       53950    53938      -12     
==========================================
+ Hits        31402    31460      +58     
+ Misses      20038    19954      -84     
- Partials     2510     2524      +14     
Flag Coverage Δ
unittests 58.32% <61.29%> (+0.12%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@wild-endeavor wild-endeavor changed the title Artifacts shell Update artifact IDL with new time partition Jan 17, 2024
squiishyy
squiishyy previously approved these changes Jan 17, 2024
@@ -19,8 +20,13 @@ message ArtifactBindingData {
uint32 index = 1;

// These two fields are only relevant in the partition value case
string partition_key = 2;
string transform = 3;
oneof partition_data {
Copy link
Contributor

Choose a reason for hiding this comment

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

above this, ArtifactBindingData is listed as being only valid for triggers, why is that?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it's just only used for trigger handling. this message means that the system needs some input, but that input is one of the triggering artifacts that was recently created (as opposed to an input variable).

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jan 17, 2024
wild-endeavor added a commit to flyteorg/flytekit that referenced this pull request Jan 18, 2024
Signed-off-by: Yee Hing Tong <[email protected]>

update idl

Signed-off-by: Yee Hing Tong <[email protected]>

make execution manager changes

Signed-off-by: Yee Hing Tong <[email protected]>

rename field

Signed-off-by: Yee Hing Tong <[email protected]>
@wild-endeavor wild-endeavor marked this pull request as ready for review January 24, 2024 20:55
@dosubot dosubot bot added size:XXL This PR changes 1000+ lines, ignoring generated files. enhancement New feature or request labels Jan 24, 2024
Signed-off-by: Yee Hing Tong <[email protected]>
@wild-endeavor wild-endeavor merged commit bcb7abe into master Jan 24, 2024
45 checks passed
@wild-endeavor wild-endeavor deleted the artifacts-shell branch January 24, 2024 22:03
pmahindrakar-oss pushed a commit that referenced this pull request May 1, 2024
* test changes to time partition (#4737)

Signed-off-by: Yee Hing Tong <[email protected]>

* trigger from core -> artifact, artifact->artifacts

* artifacts.proto package to cloud

* data proxy package to cloud

* deactivateAllTriggers endpoint

* proto package paths, gen protos

---------

Signed-off-by: Yee Hing Tong <[email protected]>
Co-authored-by: Yee Hing Tong <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request lgtm This PR has been approved by a maintainer size:XXL This PR changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants