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

refactor(repo/init): return additional raw config from detectRepoFileConfig #17021

Merged
merged 16 commits into from Aug 18, 2022

Conversation

Gabriel-Ladzaretti
Copy link
Collaborator

@Gabriel-Ladzaretti Gabriel-Ladzaretti commented Aug 6, 2022

Changes

  • detectRepoFileConfig will now also return the raw config file
  • Add rawConfigFile to the RepoFileConfig type (return value of detectRepoFileConfig)
  • cache (memCache) return values for detectRepoFileConfig

As each repo has only one valid renovate config, it might be beneficial to cache it.
detectRepoFileConfig is also used in the config migration flow and doing so will save some api/fs calls.

once this is accepted, it can be utilized in order to resolve the following issue

The main problem with #16664 is the fact that we are trying to load a local copy of the config when the repo wasnt cloned. detectRepoFileConfig does it already, so it can be cached and can be used instead.

Context

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

lib/workers/repository/init/merge.ts Outdated Show resolved Hide resolved
@Gabriel-Ladzaretti Gabriel-Ladzaretti changed the title refactor(repo/init): use memCache and return additional raw config from detectRepoFileConfig refactor(repo/init): return additional raw config from detectRepoFileConfig Aug 7, 2022
@Gabriel-Ladzaretti Gabriel-Ladzaretti marked this pull request as ready for review August 7, 2022 07:48
@Gabriel-Ladzaretti
Copy link
Collaborator Author

reverted memCache related changes as per #17021 (comment)

lib/workers/repository/init/merge.ts Outdated Show resolved Hide resolved
lib/workers/repository/init/merge.ts Outdated Show resolved Hide resolved
lib/workers/repository/init/merge.ts Outdated Show resolved Hide resolved
Gabriel-Ladzaretti and others added 2 commits August 11, 2022 00:23
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
@Gabriel-Ladzaretti
Copy link
Collaborator Author

learned something new, i pushed my changes but forgot to commit suggestions and suggestions got outdated which means they can't be commited.
so i did reset soft -> stash -> force push -> apply suggestions (now not out dated) -> stash pop -> push again, kinda nice :)

# Conflicts:
#	lib/workers/repository/init/merge.ts
rarkins
rarkins previously approved these changes Aug 16, 2022
lib/workers/repository/init/merge.ts Outdated Show resolved Hide resolved
lib/workers/repository/init/merge.ts Outdated Show resolved Hide resolved
lib/workers/repository/init/merge.ts Outdated Show resolved Hide resolved
lib/workers/repository/init/types.ts Outdated Show resolved Hide resolved
lib/workers/repository/init/merge.ts Outdated Show resolved Hide resolved
lib/workers/repository/init/merge.ts Outdated Show resolved Hide resolved
lib/workers/repository/init/types.ts Outdated Show resolved Hide resolved
Gabriel-Ladzaretti and others added 2 commits August 16, 2022 14:50
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
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.

needs deconflicting

# Conflicts:
#	lib/workers/repository/init/merge.spec.ts
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.

otherwise LGTM

lib/workers/repository/init/merge.spec.ts Outdated Show resolved Hide resolved
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
@viceice viceice enabled auto-merge (squash) August 18, 2022 20:48
@viceice viceice disabled auto-merge August 18, 2022 20:48
@viceice
Copy link
Member

viceice commented Aug 18, 2022

you can find the blocking open discussion yourself 😛

@viceice viceice enabled auto-merge (squash) August 18, 2022 20:49
@viceice viceice merged commit 1b8fd39 into renovatebot:main Aug 18, 2022
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 32.165.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 19, 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

4 participants