Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: FE parsing of schedule with day strings#2006

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
greyscaled merged 2 commits intomainfromvapurrmaid/gh-1901/cron-parser
Jun 3, 2022

Conversation

greyscaled
Copy link
Contributor

@greyscaledgreyscaled commentedJun 2, 2022
edited
Loading

Resolves:#1901

Summary:

We had a homegrown parser that only understood numbers, not strings like
MON or TUES. We replace the homegrown parser with cron-parser.

Details:

This was nearly a straight drop-in.

Impact:

Much less code/maintenance burden :D

What I learned:

Don't trust the README, sometimes you just gotta read the code or import
it and try it out. Thefields representation of the parsed expression
was missing from their docs. I might open an issue or PR to update them!

johnstcn and Kira-Pilot reacted with hooray emoji
Resolves:#1901Summary:We had a homegrown parser that only understood numbers, not strings likeMON or TUES. We replace the homegrown parser with cron-parser.Details:This was nearly a straight drop-in.Impact:Much less code/maintenance burden :DWhat I learned:Don't trust the README, sometimes you just gotta read the code or importit and try it out. The `fields` representation of the parsed expressionwas missing from their docs. I might open an issue or PR to update them!
@greyscaledgreyscaled requested a review fromjohnstcnJune 2, 2022 21:12
@greyscaledgreyscaled self-assigned thisJun 2, 2022
@greyscaledgreyscaled requested a review froma team as acode ownerJune 2, 2022 21:13
@@ -93,7 +94,7 @@ export const formValuesToTTLRequest = (values: WorkspaceScheduleFormValues): Typ

export const workspaceToInitialValues = (workspace: TypesGen.Workspace): WorkspaceScheduleFormValues => {
const schedule = workspace.autostart_schedule
constttl = workspace.ttl_ms ? workspace.ttl_ms / (1000 * 60 * 60) : 0
constttlHours = workspace.ttl_ms ?Math.round(workspace.ttl_ms / (1000 * 60 * 60)) : 0
Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

REVIEW: This is technically a separate change/uncaught previously.

Basically if you set your ttl via CLI to something like 1.5 hours, we'd show the 1.5 initially in the form, but you were forced to change it to an integer.

This feels safer until we have a form that allows minutes in addition to hours.

johnstcn reacted with thumbs up emoji
Copy link
Member

@johnstcnjohnstcn left a comment

Choose a reason for hiding this comment

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

BE = 👍

Copy link
Member

@Kira-PilotKira-Pilot left a comment

Choose a reason for hiding this comment

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

this feels good!

@greyscaledgreyscaled merged commit37aff0c intomainJun 3, 2022
@greyscaledgreyscaled deleted the vapurrmaid/gh-1901/cron-parser branchJune 3, 2022 15:08
kylecarbs pushed a commit that referenced this pull requestJun 10, 2022
Resolves:#1901Summary:We had a homegrown parser that only understood numbers, not strings likeMON or TUES. We replace the homegrown parser with cron-parser.Details:This was nearly a straight drop-in.Impact:Much less code/maintenance burden :DWhat I learned:Don't trust the README, sometimes you just gotta read the code or importit and try it out. The `fields` representation of the parsed expressionwas missing from their docs. I might open an issue or PR to update them!
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@johnstcnjohnstcnjohnstcn approved these changes

@Kira-PilotKira-PilotKira-Pilot approved these changes

Assignees

@greyscaledgreyscaled

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Bug: Workspace Schedule: Days of week are not defaulted to settings defined at creation time via cli (new workspace)
3 participants
@greyscaled@johnstcn@Kira-Pilot

[8]ページ先頭

©2009-2025 Movatter.jp