Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Writing the commit no to a text file #21546

Merged
merged 9 commits into from
Oct 2, 2020

Conversation

nturgut
Copy link
Contributor

@nturgut nturgut commented Oct 1, 2020

Writing the commit no to a text file. This will be used for ref number to send the drones in the web tests: https://devops-console-oss.corp.google.com/flutter/recipes/+/master:recipes/engine/web_engine_framework.py;l=137

I initially thought I can use one of the library calls to get the commit no we synced using the API. However I couldn't find a method for it.

other tried methods:

  • Using the stepData (or using the stdout directly) both methods failed since we are also printing other important information to the logs during the script. StepData converts the out value to a json. Our other logs (such as flutter version) corrupts the json format.
  • Using an env variable. We weren't able to read this variable back in the recipe using env['name']

Usage inside the recipe:

ref = api.file.read_text('read commit no', commit_no_file, 'b6efc758213fdfffee1234465')

@christopherfujino
Copy link
Contributor

christopherfujino commented Oct 1, 2020

Is web_engine_framework.py what we run on the drones?

Nevermind, I can see that that recipe is scheduling the builds.

Copy link
Contributor

@christopherfujino christopherfujino left a comment

Choose a reason for hiding this comment

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

LGTM

@nturgut
Copy link
Contributor Author

nturgut commented Oct 1, 2020

Is web_engine_framework.py what we run on the drones?

Nevermind, I can see that that recipe is scheduling the builds.

Yes, you are right, that recipe invokes the flutter_drone.py for the shards :)

@nturgut
Copy link
Contributor Author

nturgut commented Oct 1, 2020

hmmm the idea didn't worked. accessing environment using env['FLUTTER_REF'] didn't work. I'll update the PR once I find a solution: https://luci-milo.appspot.com/raw/build/logs.chromium.org/flutter/led/nurhan_google.com/8f6fab731fab383b8156b68f859f3175a916e13821ec2c8cb56bedd12502f008/+/annotations

@christopherfujino
Copy link
Contributor

hmmm the idea didn't worked. accessing environment using env['FLUTTER_REF'] didn't work. I'll update the PR once I find a solution: https://luci-milo.appspot.com/raw/build/logs.chromium.org/flutter/led/nurhan_google.com/8f6fab731fab383b8156b68f859f3175a916e13821ec2c8cb56bedd12502f008/+/annotations

how about echoing to stdout and then grabbing that from the from the recipe?

@christopherfujino christopherfujino self-requested a review October 1, 2020 21:55
@nturgut
Copy link
Contributor Author

nturgut commented Oct 2, 2020

hmmm the idea didn't worked. accessing environment using env['FLUTTER_REF'] didn't work. I'll update the PR once I find a solution: https://luci-milo.appspot.com/raw/build/logs.chromium.org/flutter/led/nurhan_google.com/8f6fab731fab383b8156b68f859f3175a916e13821ec2c8cb56bedd12502f008/+/annotations

how about echoing to stdout and then grabbing that from the from the recipe?

I tried echoing and the StepData (which consumes the echo to a json object). Using these methods prevent me from printing multiple things to the stdout such as the steps we run or the flutter version. So I implemented the other method we discussed (writing to a file).

@nturgut nturgut changed the title setting an env variable using commit no Writing the commit no to a text file Oct 2, 2020
Copy link
Contributor

@christopherfujino christopherfujino left a comment

Choose a reason for hiding this comment

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

lgtm

@nturgut nturgut merged commit 2d42c16 into flutter:master Oct 2, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 2, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 2, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 2, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 3, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 3, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 3, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 3, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 3, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 3, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 3, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 3, 2020
gspencergoog pushed a commit to gspencergoog/engine that referenced this pull request Oct 20, 2020
* setting an env variable using commit no

* change variable name

* try to use ref no as string

* use echo for output

* remove all the other stdout

* echo json instead of only the commit no

* use the file method

* list the directory contents

* remove pwd. print flutter version verbose
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants