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

feat(config/migration): migrate config with a PR #15122

Merged
merged 67 commits into from
Jun 18, 2022

Conversation

Gabriel-Ladzaretti
Copy link
Collaborator

@Gabriel-Ladzaretti Gabriel-Ladzaretti commented Apr 14, 2022

Changes

Create a PR when config migration is needed, similarly to the way onboarding PR are made.

Context

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • 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
  • Added unit tests + ran on a real repository

@Gabriel-Ladzaretti
Copy link
Collaborator Author

Example PR ladzaretti/feat-config-migration#1.

Copy link
Collaborator

@rarkins rarkins left a comment

Choose a reason for hiding this comment

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

  1. Currently this code is too "scattered" across many files. We should try to isolate it into as few locations as possible
  2. Please look into whether it can be delayed and done as part of repository finalization
  3. I don't think we need to make this a globalOnly solution like onboarding as this would mean nobody in the hosted app can turn it on or off individually

@Gabriel-Ladzaretti
Copy link
Collaborator Author

  1. Currently this code is too "scattered" across many files. We should try to isolate it into as few locations as possible
  2. Please look into whether it can be delayed and done as part of repository finalization
  3. I don't think we need to make this a globalOnly solution like onboarding as this would mean nobody in the hosted app can turn it on or off individually

1 + 2. now we have a single execution entry point at lib/workers/repository/finalise/index.ts
3. no longer globalOnly

lib/config/options/index.ts Outdated Show resolved Hide resolved
lib/config/types.ts Outdated Show resolved Hide resolved
lib/workers/repository/config-migration/branch/index.ts Outdated Show resolved Hide resolved
lib/workers/repository/config-migration/branch/rebase.ts Outdated Show resolved Hide resolved
lib/workers/repository/config-migration/branch/rebase.ts Outdated Show resolved Hide resolved
lib/workers/repository/config-migration/pr/index.ts Outdated Show resolved Hide resolved
lib/workers/repository/finalise/prune.ts Outdated Show resolved Hide resolved
tsconfig.strict.json Outdated Show resolved Hide resolved
- removed some unnecessary config flags

- migrated from using model/commit-message for now being

- moved gitAuthor near commitAndPush

- migrated-config-data is now a static factory class

now using handlebars for prbody
lib/config/options/index.ts Outdated Show resolved Hide resolved
lib/config/options/index.ts Outdated Show resolved Hide resolved
lib/workers/repository/config-migration/branch/create.ts Outdated Show resolved Hide resolved
lib/workers/repository/config-migration/branch/index.ts Outdated Show resolved Hide resolved
lib/workers/repository/config-migration/branch/rebase.ts Outdated Show resolved Hide resolved
lib/workers/repository/finalise/index.ts Outdated Show resolved Hide resolved
 - added unit tests for branch/create + commit-message
 - removed configMigrationBranch from RenovateConfig
 - revert onboardingPrTitle (globalOnly = true)
 - revert pruneStaleBranches
 - added config-migration/common.ts to hold migration branch name
 - added unit tests for branch/rebase
 - added unit tests for branch/migrated-data
 - updated unit tests for branch/migrated-data
 - added unit tests for branch/index
 - added unit tests for pr/error-warnings

 - added unit tests for pr/index
 - added a configMigration entry in configuration-options.md
 - create.spec.ts: cover untaken branch
@Gabriel-Ladzaretti Gabriel-Ladzaretti marked this pull request as ready for review April 20, 2022 15:21
docs/usage/configuration-options.md Outdated Show resolved Hide resolved
lib/config/options/index.ts Outdated Show resolved Hide resolved
@Gabriel-Ladzaretti
Copy link
Collaborator Author

Updated the 422 try catch block as per #15724

@Gabriel-Ladzaretti
Copy link
Collaborator Author

Anything else to do here :?

Copy link
Member

@viceice viceice left a comment

Choose a reason for hiding this comment

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

Would be nice if we can do something like this for shared presets too in future 🙃

@rarkins rarkins enabled auto-merge (squash) June 18, 2022 12:01
@rarkins rarkins merged commit dd3598c into renovatebot:main Jun 18, 2022
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 32.90.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@Gabriel-Ladzaretti Gabriel-Ladzaretti deleted the feat-config-migrate branch June 26, 2022 07:31
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 27, 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.

Automate Configuration Migrations
5 participants