Skip to content

76026 Centralized dependabot configuration proposal#8

Open
chihaiaalex wants to merge 2 commits intomainfrom
76026-centralized-dependabot-configuration
Open

76026 Centralized dependabot configuration proposal#8
chihaiaalex wants to merge 2 commits intomainfrom
76026-centralized-dependabot-configuration

Conversation

@chihaiaalex
Copy link
Contributor

No description provided.

| Aspect | A: Push (central script) | B: Pull (scheduled action per repo) |
|--------|--------------------------|--------------------------------------|
| **Propagation** | Automatic on merge to main | Scheduled (automatic) + manual dispatch |
| **Latency** | Immediate on merge | Up to schedule interval (e.g. 1 week) |
Copy link
Contributor

@haphut haphut Mar 12, 2026

Choose a reason for hiding this comment

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

latency: +1 for push

|--------|--------------------------|--------------------------------------|
| **Propagation** | Automatic on merge to main | Scheduled (automatic) + manual dispatch |
| **Latency** | Immediate on merge | Up to schedule interval (e.g. 1 week) |
| **Per-repo setup** | None (just add to `repos.conf`) | One-time: add ~10-line workflow file |
Copy link
Contributor

Choose a reason for hiding this comment

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

Hard to say which one wins. repos.conf is "out of brain context" when creating new repo but just one line. The workflow in each repo would probably use another shared workflow. Maybe a slight win for push.

| **Latency** | Immediate on merge | Up to schedule interval (e.g. 1 week) |
| **Per-repo setup** | None (just add to `repos.conf`) | One-time: add ~10-line workflow file |
| **Failure isolation** | One script, all-or-nothing per run | Each repo independent |
| **Visibility** | Central — only in the script repo | Distributed — each repo shows its sync workflow and config |
Copy link
Contributor

Choose a reason for hiding this comment

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

It'll be open source, anyway.

| **Visibility** | Central — only in the script repo | Distributed — each repo shows its sync workflow and config |
| **Remembering to run** | Automatic on merge | Automatic on schedule |
| **New repo onboarding** | Add line to `repos.conf` | Add workflow file to repo |
| **Existing patterns** | New script | Extends existing shared-workflows pattern |
Copy link
Contributor

Choose a reason for hiding this comment

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

Whatever works, man. I guess a very small win for pull.

| **Remembering to run** | Automatic on merge | Automatic on schedule |
| **New repo onboarding** | Add line to `repos.conf` | Add workflow file to repo |
| **Existing patterns** | New script | Extends existing shared-workflows pattern |
| **Cross-repo permissions** | Script needs PAT/token for all repos | Each repo's GITHUB_TOKEN may suffice (if pushing to own repo) |
Copy link
Contributor

Choose a reason for hiding this comment

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

Developer account PAT should be avoided if we can. I think the AAA story for the push model needs more detail before the push model can be accepted.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok, replaced that with a github app, see authentication section for the push model.

1. Templates (one per ecosystem: maven, gradle, pip, github-actions-only) and a repo manifest (`repos.conf`) live in a central repo (e.g. `transitdata-shared-workflows`)
2. Two triggers via GitHub Actions:
- **On merge to main**: Automatically runs the distribution to all repos
- **On PR (dry-run)**: Validates the change before merging — reports for each repo whether it can be applied cleanly, whether PRs would be needed, and flags any merge conflicts
Copy link
Contributor

@haphut haphut Mar 12, 2026

Choose a reason for hiding this comment

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

We can probably find a tool to validate the Dependabot yaml content in the CI. What other validation can we do?


### How it works

1. Templates (one per ecosystem: maven, gradle, pip, github-actions-only) and a repo manifest (`repos.conf`) live in a central repo (e.g. `transitdata-shared-workflows`)
Copy link
Contributor

Choose a reason for hiding this comment

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

As I suggested in https://github.com/HSLdevcom/team-infodevops/pull/6/changes#r2924078338 , I would use just one yaml file everywhere.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

agree.

│ ├── gradle.yml
│ ├── pip.yml
│ └── github-actions-only.yml
└── repos.conf # repo-name:template mapping
Copy link
Contributor

Choose a reason for hiding this comment

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

Just a list of repos, if using a single YAML for every microservice.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

correct.

│ ├── gradle.yml
│ ├── pip.yml
│ └── github-actions-only.yml
└── repos.conf # repo-name:template mapping
Copy link
Contributor

Choose a reason for hiding this comment

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

Alternative design: Push Dependabot to all non-archived repos owned by our team. If something breaks, create a denylist for those repos.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't personally see an issue with adding a single line to a file, each time we need to setup a new repository.
Is not something that we would do too often.

| **New repo onboarding** | Add line to `repos.conf` | Add workflow file to repo |
| **Existing patterns** | New script | Extends existing shared-workflows pattern |
| **Cross-repo permissions** | Script needs PAT/token for all repos | Each repo's GITHUB_TOKEN may suffice (if pushing to own repo) |
| **Pre-merge validation** | Dry-run on PR with summary report | No built-in validation |
Copy link
Contributor

Choose a reason for hiding this comment

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

The same validation can be run in the shared workflow in the pull model, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is just you wouldn't know where to check - you can't know all repos using the shared workflow

Copy link
Contributor

@haphut haphut left a comment

Choose a reason for hiding this comment

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

Great starting point for discussion! Please answer the comments or modify accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants