Skip to content

Conversation

@jonasfj
Copy link
Member

@jonasfj jonasfj commented Oct 23, 2024

  • Minor refactoring so we easily write more tests
  • Additional tests for GC'ing
    • Files in old runtimeVersions, and,
    • stray files in old runtimeVersions.

I don't think we want to GC stray files in current or latest runtimeVersions.
Because:

  • There shouldn't be any.
  • If there are any, then it's because we're migrating incorrectly.
    • In latest/ it's probably best to ignore stray files
    • In $runtimeVersion/ stray files are probably a bug, but maybe it's best to ignore them. Eventually the runtimeVersion will be GC'ed.

I guess that stray files in latest/ could become a problem over time.

@jonasfj jonasfj requested a review from isoos October 23, 2024 13:31
@isoos
Copy link
Collaborator

isoos commented Oct 23, 2024

I guess that stray files in latest/ could become a problem over time.

I think we should change the logic to update the files (or their metadata) even if they are the same as existing ones, every month or so. If that update process is reliable, we may GC the files that were not updated after 6 months or so...

@jonasfj
Copy link
Member Author

jonasfj commented Oct 23, 2024

I think we should change the logic to update the files (or their metadata) even if they are the same as existing ones

Yeah, we could use meta-data to do this.

We could do a x-goog-meta-updated property that:

  • We update if it's more than 72 hours old.
  • We never set it to more than max(Package.update, clock.ago(hours: 6))
    And GC will:
  • Delete files where x-goog-meta-updated is more than 14 days old.

Then we'll eventually cleanup stray files.


But we could not detect stray files, just files that aren't being updated 🙈

@jonasfj jonasfj merged commit 5860af7 into dart-lang:master Oct 23, 2024
32 checks passed
@jonasfj jonasfj deleted the more-api-export-tests branch October 23, 2024 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants