Skip to content
This repository has been archived by the owner on Jul 12, 2023. It is now read-only.

Support more flyte types #1093

Merged
merged 1 commit into from
Jul 6, 2023
Merged

Conversation

andresgomezfrr
Copy link
Contributor

@andresgomezfrr andresgomezfrr commented Jul 6, 2023

Hey, I just made a Pull Request!

Description

Add support to DURATION/INTEGER/FLOAT/MAP/COLLECTION flyte inputs.

Motivation and Context

Have you tested this? If so, how?

Checklist for PR author(s)

  • Changes are covered by unit test
  • All tests pass
  • Code coverage check passes
  • Error handling is tested
  • Errors are handled at the appropriate layer
  • Errors that cannot be handled where they occur are propagated
  • (optional) Changes are covered by system test
  • Relevant documentation updated
  • This PR has NO breaking change to public API
  • This PR has breaking change to public API and it is documented

Checklist for PR reviewer(s)

  • This PR has been incorporated in release note for the coming version
  • Risky changes introduced by this PR have been all considered

@andresgomezfrr andresgomezfrr enabled auto-merge (squash) July 6, 2023 09:33
@andresgomezfrr andresgomezfrr merged commit cd31d0b into master Jul 6, 2023
@andresgomezfrr andresgomezfrr deleted the support-more-flyte-inputs branch July 6, 2023 09:38
@codecov
Copy link

codecov bot commented Jul 6, 2023

Codecov Report

Merging #1093 (ea8d105) into master (dcec378) will increase coverage by 0.10%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##             master    #1093      +/-   ##
============================================
+ Coverage     92.33%   92.44%   +0.10%     
- Complexity     2150     2152       +2     
============================================
  Files           200      200              
  Lines          8326     8326              
  Branches        504      504              
============================================
+ Hits           7688     7697       +9     
+ Misses          522      515       -7     
+ Partials        116      114       -2     

private static final Set<TypeCase> COMPLEX_TYPES =
Set.of(TypeCase.COLLECTION_TYPE, TypeCase.MAP_VALUE_TYPE);

private static final ObjectMapper mapper = new ObjectMapper(new YAMLFactory());
Copy link
Member

Choose a reason for hiding this comment

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

try {
return parseCollectionType(key, value, literalType.getCollectionType());
} catch (Exception ex) {
throw new UnsupportedOperationException(
Copy link
Member

Choose a reason for hiding this comment

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

It's a good practice to chain exceptions so we don't loose the full stacktrace.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants