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: do not write packageFile content in updateArtifacts #22304

Closed

Conversation

secustor
Copy link
Collaborator

@secustor secustor commented May 18, 2023

Changes

Removes calls of writeLocalFile from updateArtifacts, if the former only writes the content provided by the function parameter.

Context

#22244 (comment)

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 select 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

Needs still some e2e testing

@Churro
Copy link
Collaborator

Churro commented May 18, 2023

This breaks at least the gradle artifact update - lockfiles are no longer updated.

There are two calls to gradlew. The first one still needs the "old" package file in newPackageFileContent, the second one generates updated lockfiles after the invocation of writeLocalFile. Also see PR #20303 on why this matters.

Reproducible with https://github.com/renovate-demo/20289-renovate-gradle-lock-file-example

@@ -270,8 +269,6 @@ export async function updateArtifacts({
config.constraints?.go ?? (await getGoConstraints(goModFileName));

try {
await writeLocalFile(goModFileName, massagedGoMod);
Copy link
Member

Choose a reason for hiding this comment

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

this needs revert, as we massage some go stuff to that file

@secustor secustor marked this pull request as draft May 19, 2023 08:41
@rarkins rarkins closed this Sep 23, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 24, 2023
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