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

Chore: Reduce Dependabot Noise πŸ€– πŸ™‰ 😒 #126

Closed
4 tasks done
nelsonic opened this issue Mar 28, 2023 · 7 comments
Closed
4 tasks done

Chore: Reduce Dependabot Noise πŸ€– πŸ™‰ 😒 #126

nelsonic opened this issue Mar 28, 2023 · 7 comments
Assignees
Labels
chore a tedious but necessary task often paying technical debt discuss Share your constructive thoughts on how to make progress with this issue priority-2 Second highest priority, should be worked on as soon as the Priority-1 issues are finished T1h Time Estimate 1 Hour technical A technical issue that requires understanding of the code, infrastructure or dependencies

Comments

@nelsonic
Copy link
Member

nelsonic commented Mar 28, 2023

while it's good to have our dependencies up-to-date the number of @dependabot PRs is getting a bit ridiculous ...

image

It's very noisy to have this many PRs spamming our notifications each morning. πŸ€¦β€β™‚οΈ

Often they are for minor updates like build(deps-dev): Bump excoveralls from 0.16.0 to 0.16.1 πŸ™„
We really don't care about these minor Dev dependency updates ... πŸ‘Ž

Todo

  • Investigate if we can get @dependabot to: πŸ”
    • Only create ONE PR for all the updates for a given week or month.
    • Ignore minor updates e.g: 0.16.0 to 0.16.1 completely and only update when a patch e.g: 0.16.0 to 0.17.0 or major is released.
  • Change the checking time from 07:00 to something like 16:00 so that it doesn't spam us first thing in the morning.

@LuchoTurtle if you have T1h, please read the Docs https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file and figure out how we can ignore the minor releases of dev dependencies. Do we need to list them all individually? in which case please start that list. πŸ™

@nelsonic nelsonic added discuss Share your constructive thoughts on how to make progress with this issue chore a tedious but necessary task often paying technical debt T1h Time Estimate 1 Hour technical A technical issue that requires understanding of the code, infrastructure or dependencies labels Mar 28, 2023
@nelsonic nelsonic added the priority-2 Second highest priority, should be worked on as soon as the Priority-1 issues are finished label Mar 28, 2023
@nelsonic nelsonic pinned this issue Mar 28, 2023
@SimonLab
Copy link
Member

I don't think we can only update the minor versions and ignoring the patches.

I suspect the way Dependabot works is by checking the version "rules" in mix.exs:
image
see https://hexdocs.pm/elixir/Version.html

I was more specifficaly looking if "~>" could be use for minor version only but I don't think it is the way it works.

On the Dependabot configuration I can't see either a way to only update the minor versions only.

However we can definitely run Dependabot weekly/monthly and at a specific time.
If we search for the dependabot.yml file in the dwyl org we have 48 files found:
https://github.com/search?q=org%3Adwyl+filename%3Adependabot.yml&type=code
image

I'm not sure if there is an automatic way to update automatically these files, I think it will be quicker to go over them manually to update the configuration.

@nelsonic
Copy link
Member Author

@SimonLab yeah, we will definitely have to do this manually. But we can do them ad hoc.
e.g: next time there is a @dependabot PR we use that as an opportunity to update the dependabot.yml in that repo.

I just want to have a clear understanding of what that file needs to contain so that we can copy-paste it and be done. πŸ“‹

@SimonLab
Copy link
Member

I think I've now updated most of the dependabot configuration to run weekly. It's possible that I might have missed some, but we should now have a lot less daily noise

@nelsonic
Copy link
Member Author

What I was suggesting was reading the docs for the ignore configuration:
https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#creating-ignore-conditions-from-dependabot-ignore

e.g:

    ignore:
      - dependency-name: "express"
        # For Express, ignore all updates for version 4 and 5
        versions: ["4.x", "5.x"]
        # For Lodash, ignore all updates
      - dependency-name: "lodash"
        # For AWS SDK, ignore all patch updates
      - dependency-name: "aws-sdk"
        update-types: ["version-update:semver-patch"]

So ours would simply ignore all the dev dependencies:

    ignore:
        # ignore all patch updates in dev dependencies ref: github.com/dwyl/technology-stack/issues/126
      - dependency-name: "credo"
        update-types: ["version-update:semver-patch"]
      - dependency-name: "excoveralls"
        update-types: ["version-update:semver-patch"]
      - dependency-name: "ex_doc"
        update-types: ["version-update:semver-patch"]
      - dependency-name: "esbuild"
        update-types: ["version-update:semver-patch"]
      - dependency-name: "floki"
        update-types: ["version-update:semver-patch"]
      - dependency-name: "phoenix_live_reload"
        update-types: ["version-update:semver-patch"]

We could steadily add to this list as needed.

@nelsonic
Copy link
Member Author

nelsonic commented Mar 29, 2023

Thinking we will just have a comprehensive list of non-core/essential dependencies that we just ignore patch updates for:

version: 2
updates:
- package-ecosystem: mix
  directory: "/"
  schedule:
    interval: weekly
    time: "17:00"
    timezone: Europe/London
  ignore:
      # ignore all patch updates in dev dependencies ref: github.com/dwyl/technology-stack/issues/126 [alphabetical list]
    - dependency-name: "credo"
      update-types: ["version-update:semver-patch"]
    - dependency-name: "dialyxir"
      update-types: ["version-update:semver-patch"]
    - dependency-name: "excoveralls"
      update-types: ["version-update:semver-patch"]
    - dependency-name: "ex_doc"
      update-types: ["version-update:semver-patch"]
    - dependency-name: "esbuild"
      update-types: ["version-update:semver-patch"]
    - dependency-name: "floki"
      update-types: ["version-update:semver-patch"]
    - dependency-name: "gettext"
      update-types: ["version-update:semver-patch"]
    - dependency-name: "mock"
      update-types: ["version-update:semver-patch"]
    - dependency-name: "phoenix_live_dashboard"
      update-types: ["version-update:semver-patch"]
    - dependency-name: "phoenix_live_reload"
      update-types: ["version-update:semver-patch"]

@nelsonic nelsonic moved this to πŸ”– Ready for Development in dwyl app kanban Mar 30, 2023
nelsonic added a commit to dwyl/auth_plug that referenced this issue Mar 31, 2023
nelsonic added a commit to dwyl/phoenix-chat-example that referenced this issue Mar 31, 2023
nelsonic added a commit to dwyl/gogs that referenced this issue Mar 31, 2023
nelsonic added a commit to dwyl/statuses that referenced this issue Mar 31, 2023
nelsonic added a commit to dwyl/logs that referenced this issue Mar 31, 2023
nelsonic added a commit to dwyl/phoenix-liveview-todo-list-tutorial that referenced this issue Mar 31, 2023
nelsonic added a commit to dwyl/protect-main-branch that referenced this issue Mar 31, 2023
nelsonic added a commit to dwyl/learn-alpine.js that referenced this issue Mar 31, 2023
nelsonic added a commit to dwyl/phoenix-ecto-encryption-example that referenced this issue Apr 1, 2023
nelsonic added a commit to dwyl/learn-tailwind that referenced this issue Apr 1, 2023
@LuchoTurtle
Copy link
Member

Should this be closed? dwyl/mvp#344 was already merged and @SimonLab already pushed a few PR to a handful of repos with this change.

@nelsonic
Copy link
Member Author

nelsonic commented Apr 6, 2023

Indeed. The issue was assigned to @LuchoTurtle but no comment was made. so @SimonLab picked up the task. βœ…

@nelsonic nelsonic closed this as completed Apr 6, 2023
@github-project-automation github-project-automation bot moved this from πŸ”– Ready for Development to βœ… Done in dwyl app kanban Apr 6, 2023
@nelsonic nelsonic unpinned this issue Apr 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore a tedious but necessary task often paying technical debt discuss Share your constructive thoughts on how to make progress with this issue priority-2 Second highest priority, should be worked on as soon as the Priority-1 issues are finished T1h Time Estimate 1 Hour technical A technical issue that requires understanding of the code, infrastructure or dependencies
Projects
Status: βœ… Done
Development

No branches or pull requests

3 participants