Linter refactoring broke logic #39228
-
How are you running Renovate?Self-hosted Renovate Which platform you running Renovate on?Other (please specify) Which version of Renovate are you using?42.4.0 Please tell us more about your question or problemSince version 42.4.0 on BitBucket, the PR Cache is broken. The condition for the initialization of the cache was refactored in such a way that there's a subtle difference in the logic: const pullRequestCacheValues = [{ author: "jdoe" }, { author: "other" }, null, undefined];
const authorValues = [ "jdoe", null, undefined,];
for (const prCache of pullRequestCacheValues) {
for (const author of authorValues) {
// Version 42.3.0 condition
const previousLogic = !prCache || prCache.author !== author;
// Version 42.4.0 condition
const newLogic = prCache?.author !== author;
const same = newLogic === previousLogic ? "✅ same" : "❌ different";
console.log(
`pullRequestCache=${JSON.stringify(prCache)} | author=${JSON.stringify(author)} → ` +
`42.3.0=${previousLogic} | 42.4.0=${newLogic} → ${same}`
);
}
}yields: The same refactoring was done in multiple locations, so I'd say it's good to check all changes in b34bbb5 / #38897. Logs (if relevant)Logs |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
|
@RahulGautamSingh are you able to take a look? 👀 |
Beta Was this translation helpful? Give feedback.
-
|
@astellingwerf Did you have token configured for bbs or username & password. Even though this error should have been nicely handled, I believe it's also necessary to make sure |
Beta Was this translation helpful? Give feedback.
yes, here: #39245