Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion app/lib/task/backend.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1327,8 +1327,13 @@ final class _TaskDataAccess {
return await withRetryTransaction(_db, (tx) async {
// Reload [state] within a transaction to avoid overwriting changes
// made by others trying to update state for another package.
final s = await tx.lookupValue<PackageState>(
final s = await tx.lookupOrNull<PackageState>(
PackageState.createKey(_db.emptyKey, runtimeVersion, package));
if (s == null) {
// No entry has been created yet, probably because of a new deployment rolling out.
// We can ignore it for now.
return false;
}
if (s.lastDependencyChanged!.isBefore(publishedAt)) {
tx.insert(
s
Expand Down