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

Extend capabilities of the hidden, capture interval field #1319

Merged
merged 30 commits into from
Nov 1, 2024

Conversation

kiahna-tucker
Copy link
Member

@kiahna-tucker kiahna-tucker commented Oct 18, 2024

Issues

The issues directly below are advanced by this PR:
#1194

Changes

1194

The following features are included in this PR:

  • Extend the logic for the component that exposes the interval property in capture workflows.

NOTE: The capture interval field will remain hidden as an investigation into the Duration formats supported by the backend is underway. Additionally, it should be noted that luxon should be leveraged to handle converting to and from strings in a Duration format (ref: luxon documentation).

Tests

Manually tested

Approaches to testing are as follows:

  • Validate that the capture interval section does not appear in any workflows.

Automated tests

Test coverage added for the following utils:

  • formatCaptureInterval

  • getCaptureIntervalSegment

Playwright tests ran locally

  • Admin
  • Captures
  • Collections
  • HomePage
  • Login
  • Materialization

Screenshots

N/A

@kiahna-tucker kiahna-tucker added the change:planned This is a planned change label Oct 18, 2024
@kiahna-tucker kiahna-tucker changed the title Introduce an interval field to capture workflows. Introduce an interval field to capture workflows Oct 18, 2024
@kiahna-tucker kiahna-tucker marked this pull request as ready for review October 25, 2024 14:39
@kiahna-tucker kiahna-tucker requested a review from a team as a code owner October 25, 2024 14:39
return isFinite(numericSegment) ? numericSegment : -1;
});

return { h: hours, m: minutes, s: seconds };
Copy link
Member

Choose a reason for hiding this comment

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

What is driving the renaming to a single letter? The only consumer of this just renames them back to what they were.

Copy link
Member Author

Choose a reason for hiding this comment

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

The value of the select menu items and the need for getCaptureIntervalSegment, which is the second consumer of these functions.

Copy link
Member

Choose a reason for hiding this comment

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

Please add a new more "insane edgecases". Since today you can parse 999999999999999999999999999999999999999s today and that should probably be called out.

Copy link
Member Author

Choose a reason for hiding this comment

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

There are limits the to values that can be used to test but the test coverage can be extended within reason.

Comment on lines +73 to +75
const strippedInterval = interval.endsWith('i')
? interval.slice(0, interval.length - 1)
: interval;
Copy link
Member

Choose a reason for hiding this comment

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

If we are doing stuff like this then the i needs to be a const and this kind of action should go into the utils.

@kiahna-tucker kiahna-tucker reopened this Oct 31, 2024
Copy link
Member

@travjenkins travjenkins left a comment

Choose a reason for hiding this comment

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

lgtm - from a coding perspective. Since we know we'll eventually need to handle a `duration' format in the JSON Schema someday we don't need to make this perfect

Did not manually test.

@travjenkins
Copy link
Member

So the coding is fine - however we have way too many edge cases to try to work around with now. We'll need to complete estuary/flow#1750 before the UI can handle durations.

@kiahna-tucker kiahna-tucker changed the title Introduce an interval field to capture workflows Extend capabilities of the hidden, capture interval field Nov 1, 2024
@kiahna-tucker kiahna-tucker merged commit c6d10cb into main Nov 1, 2024
3 checks passed
@kiahna-tucker kiahna-tucker deleted the kiahna-tucker/capture-interval/init-field branch November 1, 2024 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
change:planned This is a planned change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants