-
Notifications
You must be signed in to change notification settings - Fork 592
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
Pro 4734 check outdated deps #4301
Conversation
ETLaurent
commented
Sep 26, 2023
•
edited
Loading
edited
PRO-4734 Update project actions to look for stale dependencies to make it easier to stay ahead of the monthly maintenance work.
For projects and packages we routinely maintain, we should add a scheduled Github action bi-weekly to run Make sure it calls attention to major versions being out of date. Here is an example of a scheduled task from Holon which was used to keep the
This ticket is to create the action not to add to every project. Acceptance Criteria: Installed and working in the apostrophe repo This sends a report via Slack webhook in our #product-development Slack channel |
128bdf1
to
17a5b8c
Compare
- name: Check outdated dependencies | ||
run: | | ||
echo "$(npm outdated)" > output | ||
npm outdated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
way of getting the correct exit status
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
npm outdated > output
should do this by itself 🤔 Unless your goal was just to always add a newline. Not wrong though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't able to keep the exit status when writing the output into the output
file, so I'm running the same command again... not pretty but it works and makes the step fail as expected.
i.e: echo "$(npm outdated)" > output
always exit 0
# - cron: "0 0 * * 1-5" | ||
schedule: | ||
# Runs Mon-Fri at 0:00 UTC ( 00:00 EST ) | ||
- cron: "0 0 * * 1-5" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once every two weeks would be more appropriate. We will never be 100% up to date with the same major version of everything, often up to date modules require older but maintained versions of other modules, etc. If we generate this report daily we will become blind to it (:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would every week do?
I found a syntax to run it every 2 week: 0 8 * * MON test $((10#$(date +\%W)\%2)) -eq 1
, but it's not compatible with GA
- name: Check outdated dependencies | ||
run: | | ||
echo "$(npm outdated)" > output | ||
npm outdated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
npm outdated > output
should do this by itself 🤔 Unless your goal was just to always add a newline. Not wrong though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once a week will have to do. 👍