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

docs(configuration options): Add a CodePen for validating whether a later.js schedule is valid or not. #16431

Merged
merged 10 commits into from Jul 9, 2022

Conversation

paulzakin
Copy link
Contributor

@paulzakin paulzakin commented Jul 6, 2022

Changes

  • Add a CodePen for validating whether a later.js schedule is valid or not.

Context

I think for individuals who aren't familiar with later.js (like me!), it can be difficult to tell whether a schedule is valid. Plus, I found their documentation was missing some sort of "demo" feature. Hence, I made a quick CodePen to validate whether the proposed schedule is valid. It also lists the next two occurences in that schedule. I found this very helpful in reaching an intuitive understanding of how the schedules worked, and it may be helpful to other users as well.

Happy to transfer/surrender ownership of the CodePen to renovate as needed.

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please tick one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests but ran on a real repository, or
  • Both unit tests + ran on a real repository

@paulzakin paulzakin changed the title Update the configuration-options documentation with a CodePen for validating whether a later.js schedule is valid or not. docs: Add CodePen for validating whether a later.js schedule is valid or not. Jul 6, 2022
@paulzakin paulzakin changed the title docs: Add CodePen for validating whether a later.js schedule is valid or not. docs(configuration options): Add CodePen for validating whether a later.js schedule is valid or not. Jul 6, 2022
@paulzakin paulzakin changed the title docs(configuration options): Add CodePen for validating whether a later.js schedule is valid or not. docs(configuration options): Add a CodePen for validating whether a later.js schedule is valid or not. Jul 6, 2022
@rarkins
Copy link
Collaborator

rarkins commented Jul 6, 2022

One challenge here - Renovate accepts only a subset of Later.js schedules. For example the default "every 5 minutes" is not a valid Renovate schedule. Can this codepen be made to mimic what Renovate considers valid?

@paulzakin
Copy link
Contributor Author

@rarkins No promises but happy to take a look at modifying it!

Any pointers on where in the codebase should I look for that Renovate-flavored Later.js? Happy to look myself, but appreciate any points in the right direction!

@rarkins
Copy link
Collaborator

rarkins commented Jul 6, 2022

@rarkins rarkins marked this pull request as draft July 6, 2022 05:50
docs/usage/configuration-options.md Show resolved Hide resolved
docs/usage/configuration-options.md Outdated Show resolved Hide resolved
paulzakin and others added 3 commits July 6, 2022 02:20
Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>
Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>
@paulzakin
Copy link
Contributor Author

The logic is all in https://github.com/renovatebot/renovate/blob/main/lib/workers/repository/update/branch/schedule.ts

Awesome will take a look

paulzakin and others added 2 commits July 6, 2022 08:56
Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>
@paulzakin
Copy link
Contributor Author

paulzakin commented Jul 7, 2022

Alright, updated with the rules - take a look:

https://codepen.io/rationaltiger24/pen/ZExQEgK

I do have a question through. For example, running "on Monday before 3am" with the date as 2022-07-07 with a local time in Chicago (UTC-5), will return the next two occurrences as:

7/11/2022, 12:00:00 AM
7/11/2022, 12:00:01 AM

By I assume Rennovate would not run every minute under this configuration? Or am I missing something?

@JamieMagee JamieMagee marked this pull request as ready for review July 8, 2022 05:44
@rarkins
Copy link
Collaborator

rarkins commented Jul 8, 2022

By I assume Rennovate would not run every minute under this configuration? Or am I missing something?

That's right. Schedules do not trigger Renovate to run. Instead, if Renovate is running AND the schedule matches at that time, then it will create branches/PRs.

@paulzakin
Copy link
Contributor Author

By I assume Rennovate would not run every minute under this configuration? Or am I missing something?

That's right. Schedules do not trigger Renovate to run. Instead, if Renovate is running AND the schedule matches at that time, then it will create branches/PRs.

That makes sense, but what triggers Renovate to run, assuming it is a GitHub app that is installed

@viceice
Copy link
Member

viceice commented Jul 8, 2022

By I assume Rennovate would not run every minute under this configuration? Or am I missing something?

That's right. Schedules do not trigger Renovate to run. Instead, if Renovate is running AND the schedule matches at that time, then it will create branches/PRs.

That makes sense, but what triggers Renovate to run, assuming it is a GitHub app that is installed

It tries to run hourly by default and reduces cycles if no activity on repo. You can always trigger a run from dependency dashboard.

@paulzakin
Copy link
Contributor Author

By I assume Rennovate would not run every minute under this configuration? Or am I missing something?

That's right. Schedules do not trigger Renovate to run. Instead, if Renovate is running AND the schedule matches at that time, then it will create branches/PRs.

That makes sense, but what triggers Renovate to run, assuming it is a GitHub app that is installed

It tries to run hourly by default and reduces cycles if no activity on repo. You can always trigger a run from dependency dashboard.

Perfect that makes sense to me!

@rarkins rarkins enabled auto-merge (squash) July 9, 2022 06:53
@rarkins rarkins merged commit 1374831 into renovatebot:main Jul 9, 2022
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 32.108.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 9, 2022
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.

None yet

6 participants