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

fix(ui): advise users on correct chron syntax for scheduling #12854

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

kevinkarchacryl
Copy link
Contributor

@kevinkarchacryl kevinkarchacryl commented Mar 12, 2025

We recently added backend support for more advanced cron syntax. For example, to schedule ingestion on the 2nd Monday of every month you could do either "0 0 0 0 1#2" or "0 0 8-14 0 1". However, only the 2nd method is supported on the frontend. For example, when using the hashmark syntax, if you switch in and out of the advanced tab it will get erased:
image
image
image
But when using the other syntax, everything works:
image
image
image

Long story short: this is because the frontend uses two different libraries for cron: one that supports # and one that doesn't. I think these code changes are an acceptable alternative but I'm open to other ideas. The test I added is just for the backend to make sure both ways work.
With my changes, the user will not able to uncheck the advanced box if they use the hashmark. This is what you see when you put a hashmark in the schedule:
image

Checklist

  • The PR conforms to DataHub's Contributing Guideline (particularly Commit Message Format)
  • Links to related issues (if applicable)
  • Tests for the changes have been added/updated (if applicable)
  • Docs related to the changes have been added/updated (if applicable). If a new feature has been added a Usage Guide has been added for the same.
  • For any breaking change/potential downtime/deprecation/big changes an entry has been made in Updating DataHub

Copy link

codecov bot commented Mar 12, 2025

Codecov Report

Attention: Patch coverage is 12.50000% with 28 lines in your changes missing coverage. Please review.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...c/app/ingest/source/builder/CreateScheduleStep.tsx 12.50% 28 Missing ⚠️

❌ Your patch check has failed because the patch coverage (12.50%) is below the target coverage (75.00%). You can increase the patch coverage or adjust the target coverage.

📢 Thoughts on this report? Let us know!

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions github-actions bot added ingestion PR or Issue related to the ingestion of metadata product PR or Issue related to the DataHub UI/UX labels Mar 12, 2025
@datahub-cyborg datahub-cyborg bot added the needs-review Label for PRs that need review from a maintainer. label Mar 12, 2025
@kevinkarchacryl kevinkarchacryl marked this pull request as draft March 12, 2025 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ingestion PR or Issue related to the ingestion of metadata needs-review Label for PRs that need review from a maintainer. product PR or Issue related to the DataHub UI/UX
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant