Skip to content

Conversation

@CoderDake
Copy link
Contributor

This was discussed/requested here

This change makes the script less dependant on non-standard commands, so it can be used in more environments

@CoderDake CoderDake marked this pull request as ready for review November 30, 2022 14:21
fi

LATEST_FLUTTER_CANDIDATE="flutter-$LATEST_VERSION"
LATEST_FLUTTER_CANDIDATE=$(git ls-remote https://dart.googlesource.com/external/github.com/flutter/flutter.git \
Copy link
Member

Choose a reason for hiding this comment

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

this outputs refs/heads/ .... and we will need it to output flutter-version-candidate for our purposes. We may need two scripts: one that does this that the auto roller can use and another that uses this and strips refs/heads/ from the output for our purposes. Either that, or our other scripts that use this need to strip refs/heads/ from the output before they use it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've update this so that it mimicks the old behaviour.
Do you know if it would be ok for the autoroller to just append refs/head on the branch name if it is needed?

Copy link
Member

Choose a reason for hiding this comment

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

Copy link

Choose a reason for hiding this comment

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

Yes, that is fine.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@athomas @kenzieschmoll I've updated the remote that we are touching to git@github.com:flutter/flutter.git
it looks like the other remote we were pointing to didn't have all of the refs for the candidate branches, so it was grabbing old candidate versions

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ugh it looks like in order to use the flutter/flutter remote we'll have to:

  • generate a private key for the flutter/flutter repo,
  • save it to the devtools repo as a secret token
  • use that token to auth against the flutter/flutter repo so that our git ls-remote command will have permission to fetch the refs

Alternatively we could find out how to make sure the refs are up to date on https://dart.googlesource.com/external/github.com/flutter/flutter.git

@kenzieschmoll @athomas do either of you have opinions about these options?

Copy link
Member

Choose a reason for hiding this comment

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

Alternatively we could find out how to make sure the refs are up to date on https://dart.googlesource.com/external/github.com/flutter/flutter.git

@athomas is there expected latency between flutter/flutter on github and flutter/flutter on dart.googlesource.com ?

Copy link

Choose a reason for hiding this comment

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

Under normal circumstances, the latency should be very low. It's a mirror, so it's not instant.

The Dart mirror might be special in some way, I can check if we're still mirroring everything (we had some hacks around main branches before, not sure if those are still there). An alternative would be https://flutter.googlesource.com/mirrors/flutter/ which might be a more exact mirror.

@CoderDake CoderDake requested a review from a team as a code owner November 30, 2022 18:53
@kenzieschmoll
Copy link
Member

@athomas once this lands, can we push https://dart-review.git.corp.google.com/c/recipes/+/265320 forward?

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