Revert "Start uploading docs to GCS."
This reverts commit d1e9666558bf20dd0417cfdd0fa4dd88cf3328a3.
Reason for revert: Docs tests are failing because both the docs test and docs releasing to firebase are trying to write to the same file.
Original change's description:
> Start uploading docs to GCS.
>
> Bug: https://github.com/flutter/flutter/issues/111921
> Change-Id: If05f23b6cdae451faf4eab933e4b8bdbd2876369
> Reviewed-on: https://flutter-review.googlesource.com/c/recipes/+/34082
> Reviewed-by: Keyong Han <keyonghan@google.com>
> Commit-Queue: Godofredo Contreras <godofredoc@google.com>
TBR=godofredoc@google.com,keyonghan@google.com,chillers@google.com,flutter-scoped@luci-project-accounts.iam.gserviceaccount.com
Change-Id: I3266ff2ff6d2f96dcbc6ede519d870994afcf6dd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/flutter/flutter/issues/111921
Reviewed-on: https://flutter-review.googlesource.com/c/recipes/+/34100
Commit-Queue: Godofredo Contreras <godofredoc@google.com>
Reviewed-by: Godofredo Contreras <godofredoc@google.com>
diff --git a/recipe_modules/adhoc_validation/__init__.py b/recipe_modules/adhoc_validation/__init__.py
index 5ab5be1..80ac1c5 100644
--- a/recipe_modules/adhoc_validation/__init__.py
+++ b/recipe_modules/adhoc_validation/__init__.py
@@ -1,5 +1,4 @@
DEPS = [
- 'flutter/bucket_util',
'flutter/firebase',
'flutter/flutter_deps',
'flutter/kms',
diff --git a/recipe_modules/adhoc_validation/api.py b/recipe_modules/adhoc_validation/api.py
index 71d59c2..1881191 100644
--- a/recipe_modules/adhoc_validation/api.py
+++ b/recipe_modules/adhoc_validation/api.py
@@ -60,14 +60,12 @@
else:
with self.m.context(env=env, env_prefixes=env_prefixes):
self.m.test_utils.run_test(validation, [resource_name])
- docs_path = checkout_path.join('dev', 'docs')
- if validation == 'docs':
- self.m.bucket_util.upload_folder('Upload API Docs', docs_path, 'doc', "api_docs.zip")
- if self.m.properties.get('firebase_project'):
- project = self.m.properties.get('firebase_project')
- self.m.firebase.deploy_docs(
- env=env,
- env_prefixes=env_prefixes,
- docs_path=docs_path,
- project=project
- )
+ if validation == 'docs' and self.m.properties.get('firebase_project'):
+ docs_path = checkout_path.join('dev', 'docs')
+ project = self.m.properties.get('firebase_project')
+ self.m.firebase.deploy_docs(
+ env=env,
+ env_prefixes=env_prefixes,
+ docs_path=docs_path,
+ project=project
+ )
diff --git a/recipe_modules/adhoc_validation/examples/full.expected/linux.json b/recipe_modules/adhoc_validation/examples/full.expected/linux.json
index f91dc9d..da960ab 100644
--- a/recipe_modules/adhoc_validation/examples/full.expected/linux.json
+++ b/recipe_modules/adhoc_validation/examples/full.expected/linux.json
@@ -75,67 +75,6 @@
},
{
"cmd": [
- "python",
- "RECIPE_MODULE[flutter::zip]/resources/zip.py"
- ],
- "env": {
- "DEPOT_TOOLS": "RECIPE_REPO[depot_tools]",
- "GIT_BRANCH": "",
- "LUCI_BRANCH": "",
- "LUCI_CI": "True",
- "LUCI_PR": "",
- "OS": "linux",
- "PUB_CACHE": "[START_DIR]/.pub-cache",
- "REVISION": "",
- "SDK_CHECKOUT_PATH": "[START_DIR]/flutter sdk"
- },
- "env_prefixes": {
- "PATH": [
- "[START_DIR]/flutter sdk/bin",
- "[START_DIR]/flutter sdk/bin/cache/dart-sdk/bin"
- ]
- },
- "name": "Docs.Zip doc",
- "stdin": "{\"entries\": [{\"path\": \"[START_DIR]/flutter sdk/dev/docs/doc\", \"type\": \"dir\"}], \"output\": \"[CLEANUP]/tmp_tmp_1/api_docs.zip\", \"root\": \"[START_DIR]/flutter sdk/dev/docs\"}",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@"
- ]
- },
- {
- "cmd": [
- "vpython3",
- "-u",
- "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
- "--json-output",
- "/path/to/tmp/json",
- "rmtree",
- "[CLEANUP]/tmp_tmp_1"
- ],
- "env": {
- "DEPOT_TOOLS": "RECIPE_REPO[depot_tools]",
- "GIT_BRANCH": "",
- "LUCI_BRANCH": "",
- "LUCI_CI": "True",
- "LUCI_PR": "",
- "OS": "linux",
- "PUB_CACHE": "[START_DIR]/.pub-cache",
- "REVISION": "",
- "SDK_CHECKOUT_PATH": "[START_DIR]/flutter sdk"
- },
- "env_prefixes": {
- "PATH": [
- "[START_DIR]/flutter sdk/bin",
- "[START_DIR]/flutter sdk/bin/cache/dart-sdk/bin"
- ]
- },
- "infra_step": true,
- "name": "Docs.temp dir for Upload API Docs",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@"
- ]
- },
- {
- "cmd": [
"luci-auth",
"token",
"-scopes",
@@ -175,7 +114,7 @@
"/path/to/tmp/json",
"copy",
"extra.secret.token.should.not.be.logged",
- "[CLEANUP]/tmp_tmp_2"
+ "[CLEANUP]/tmp_tmp_1"
],
"env": {
"DEPOT_TOOLS": "RECIPE_REPO[depot_tools]",
@@ -225,7 +164,7 @@
"PUB_CACHE": "[START_DIR]/.pub-cache",
"REVISION": "",
"SDK_CHECKOUT_PATH": "[START_DIR]/flutter sdk",
- "TOKEN_PATH": "[CLEANUP]/tmp_tmp_2"
+ "TOKEN_PATH": "[CLEANUP]/tmp_tmp_1"
},
"env_prefixes": {
"PATH": [
@@ -254,7 +193,7 @@
"PUB_CACHE": "[START_DIR]/.pub-cache",
"REVISION": "",
"SDK_CHECKOUT_PATH": "[START_DIR]/flutter sdk",
- "TOKEN_PATH": "[CLEANUP]/tmp_tmp_2"
+ "TOKEN_PATH": "[CLEANUP]/tmp_tmp_1"
},
"env_prefixes": {
"PATH": [
diff --git a/recipe_modules/adhoc_validation/examples/full.expected/mac_nodeps.json b/recipe_modules/adhoc_validation/examples/full.expected/mac_nodeps.json
index d62df3d..b70638a 100644
--- a/recipe_modules/adhoc_validation/examples/full.expected/mac_nodeps.json
+++ b/recipe_modules/adhoc_validation/examples/full.expected/mac_nodeps.json
@@ -74,67 +74,6 @@
]
},
{
- "cmd": [
- "python",
- "RECIPE_MODULE[flutter::zip]/resources/zip.py"
- ],
- "env": {
- "DEPOT_TOOLS": "RECIPE_REPO[depot_tools]",
- "GIT_BRANCH": "",
- "LUCI_BRANCH": "",
- "LUCI_CI": "True",
- "LUCI_PR": "",
- "OS": "darwin",
- "PUB_CACHE": "[START_DIR]/.pub-cache",
- "REVISION": "",
- "SDK_CHECKOUT_PATH": "[START_DIR]/flutter sdk"
- },
- "env_prefixes": {
- "PATH": [
- "[START_DIR]/flutter sdk/bin",
- "[START_DIR]/flutter sdk/bin/cache/dart-sdk/bin"
- ]
- },
- "name": "Docs.Zip doc",
- "stdin": "{\"entries\": [{\"path\": \"[START_DIR]/flutter sdk/dev/docs/doc\", \"type\": \"dir\"}], \"output\": \"[CLEANUP]/tmp_tmp_1/api_docs.zip\", \"root\": \"[START_DIR]/flutter sdk/dev/docs\"}",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@"
- ]
- },
- {
- "cmd": [
- "vpython3",
- "-u",
- "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
- "--json-output",
- "/path/to/tmp/json",
- "rmtree",
- "[CLEANUP]/tmp_tmp_1"
- ],
- "env": {
- "DEPOT_TOOLS": "RECIPE_REPO[depot_tools]",
- "GIT_BRANCH": "",
- "LUCI_BRANCH": "",
- "LUCI_CI": "True",
- "LUCI_PR": "",
- "OS": "darwin",
- "PUB_CACHE": "[START_DIR]/.pub-cache",
- "REVISION": "",
- "SDK_CHECKOUT_PATH": "[START_DIR]/flutter sdk"
- },
- "env_prefixes": {
- "PATH": [
- "[START_DIR]/flutter sdk/bin",
- "[START_DIR]/flutter sdk/bin/cache/dart-sdk/bin"
- ]
- },
- "infra_step": true,
- "name": "Docs.temp dir for Upload API Docs",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@"
- ]
- },
- {
"name": "$result"
}
]
\ No newline at end of file
diff --git a/recipe_modules/adhoc_validation/examples/full.expected/win.json b/recipe_modules/adhoc_validation/examples/full.expected/win.json
index 1e8da28..ce40448 100644
--- a/recipe_modules/adhoc_validation/examples/full.expected/win.json
+++ b/recipe_modules/adhoc_validation/examples/full.expected/win.json
@@ -45,67 +45,6 @@
]
},
{
- "cmd": [
- "python",
- "RECIPE_MODULE[flutter::zip]\\resources\\zip.py"
- ],
- "env": {
- "DEPOT_TOOLS": "RECIPE_REPO[depot_tools]",
- "GIT_BRANCH": "",
- "LUCI_BRANCH": "",
- "LUCI_CI": "True",
- "LUCI_PR": "",
- "OS": "win",
- "PUB_CACHE": "[START_DIR]\\.pub-cache",
- "REVISION": "",
- "SDK_CHECKOUT_PATH": "[START_DIR]\\flutter sdk"
- },
- "env_prefixes": {
- "PATH": [
- "[START_DIR]\\flutter sdk\\bin",
- "[START_DIR]\\flutter sdk\\bin\\cache\\dart-sdk\\bin"
- ]
- },
- "name": "Docs.Zip doc",
- "stdin": "{\"entries\": [{\"path\": \"[START_DIR]\\\\flutter sdk\\\\dev\\\\docs\\\\doc\", \"type\": \"dir\"}], \"output\": \"[CLEANUP]\\\\tmp_tmp_1\\\\api_docs.zip\", \"root\": \"[START_DIR]\\\\flutter sdk\\\\dev\\\\docs\"}",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@"
- ]
- },
- {
- "cmd": [
- "vpython3",
- "-u",
- "RECIPE_MODULE[recipe_engine::file]\\resources\\fileutil.py",
- "--json-output",
- "/path/to/tmp/json",
- "rmtree",
- "[CLEANUP]\\tmp_tmp_1"
- ],
- "env": {
- "DEPOT_TOOLS": "RECIPE_REPO[depot_tools]",
- "GIT_BRANCH": "",
- "LUCI_BRANCH": "",
- "LUCI_CI": "True",
- "LUCI_PR": "",
- "OS": "win",
- "PUB_CACHE": "[START_DIR]\\.pub-cache",
- "REVISION": "",
- "SDK_CHECKOUT_PATH": "[START_DIR]\\flutter sdk"
- },
- "env_prefixes": {
- "PATH": [
- "[START_DIR]\\flutter sdk\\bin",
- "[START_DIR]\\flutter sdk\\bin\\cache\\dart-sdk\\bin"
- ]
- },
- "infra_step": true,
- "name": "Docs.temp dir for Upload API Docs",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@"
- ]
- },
- {
"name": "$result"
}
]
\ No newline at end of file
diff --git a/recipe_modules/bucket_util/api.py b/recipe_modules/bucket_util/api.py
index 31abba7..e7b1d40 100644
--- a/recipe_modules/bucket_util/api.py
+++ b/recipe_modules/bucket_util/api.py
@@ -2,7 +2,6 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-import os
from recipe_engine import recipe_api
INFRA_BUCKET_NAME = 'flutter_infra_release'
@@ -73,8 +72,7 @@
remote_name = '%s/%s' % (platform, zip_name) if platform else zip_name
local_zip = temp_dir.join(zip_name)
remote_zip = self.get_cloud_path(remote_name)
- if isinstance(parent_directory, str):
- parent_directory = self.m.path['cache'].join('builder', parent_directory)
+ parent_directory = self.m.path['cache'].join('builder', parent_directory)
pkg = self.m.zip.make_package(parent_directory, local_zip)
pkg.add_directory(parent_directory.join(folder_name))