Skip to content

Conversation

@jonasfj
Copy link
Member

@jonasfj jonasfj commented Oct 4, 2024

This is a proposal for an interface for writing the exported API.

The idea is to put everything related to managing the actual objects of the bucket into a single abstraction.

This interface isn't responsible for figuring out:

  • what to write, or,
  • when to write it.

Only where to write things.

The hope is that this makes it less likely that we accidentally writes file to the wrong location, forget to update them, or forget to GC particular files.

@jonasfj jonasfj requested a review from isoos October 4, 2024 11:12
@jonasfj jonasfj marked this pull request as ready for review October 11, 2024 12:01
/// This means that it must include bucket name.
/// Such URIs can be created with [Bucket.absoluteObjectName].
Future<void> copyFrom(String absoluteObjectName) async {
await Future.wait(_owner._prefixes.map((prefix) async {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is it possible that we have a race condition here which may update the second object earlier? (Is that bad?) -- actually this applies for most of the similar Future.wait calls in this file...

Copy link
Contributor

@sigurdm sigurdm left a comment

Choose a reason for hiding this comment

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

Can we find a better name for this concept? Perhaps baked_api_responses

"exported api" sounds like a lot of other things.

Co-authored-by: István Soós <isoos@users.noreply.github.com>
@jonasfj jonasfj merged commit bd08432 into dart-lang:master Oct 15, 2024
7 checks passed
@jonasfj jonasfj deleted the exported_api branch October 15, 2024 13:50
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.

3 participants