-
Notifications
You must be signed in to change notification settings - Fork 566
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Python 3.11 Update] Primitive progressive rollout implementation #4039
Changes from all commits
15d47b4
27e7510
c4192a7
342b453
2010400
309d14d
e3734bb
344cb34
407bfa9
c3fa734
f450712
e1174b2
6ea723a
82666ab
9e538e2
3ebc508
3799489
8d38f5b
6bd17b0
9f34c68
f5863e8
cda380b
5d28a04
871fba4
4556d5c
dc071a6
9c690f3
3985c5a
006675e
4f1b5eb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,6 +27,7 @@ | |
from local.butler import common | ||
from local.butler import constants | ||
from local.butler import package | ||
from clusterfuzz._internal.base import utils | ||
from src.clusterfuzz._internal.config import local_config | ||
from src.clusterfuzz._internal.system import environment | ||
|
||
|
@@ -92,7 +93,8 @@ def _deploy_app_prod(project, | |
yaml_paths, | ||
package_zip_paths, | ||
deploy_appengine=True, | ||
test_deployment=False): | ||
test_deployment=False, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we delete the test_deployment feature? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is this feature? I have never used it There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh it is the test-targets thing. We could delete it if this proves successful, we leave the test cluster alive and perform our releases on it with this approach (might be a good idea to create a windows one for that purpose too) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Now that I think of it, I would rather keep this feature. At some point in the future I would like to pin releases (git commit) in our deployments, so we can have granular control over what code is executed in each cluster. For now, this is still useful. |
||
release='prod'): | ||
"""Deploy app in production.""" | ||
if deploy_appengine: | ||
services = _get_services(yaml_paths) | ||
|
@@ -116,7 +118,8 @@ def _deploy_app_prod(project, | |
_deploy_manifest( | ||
deployment_bucket, | ||
constants.PACKAGE_TARGET_MANIFEST_PATH, | ||
test_deployment=test_deployment) | ||
test_deployment=test_deployment, | ||
release=release) | ||
|
||
|
||
def _deploy_app_staging(project, yaml_paths): | ||
|
@@ -227,16 +230,21 @@ def _deploy_zip(bucket_name, zip_path, test_deployment=False): | |
os.path.basename(zip_path))) | ||
|
||
|
||
def _deploy_manifest(bucket_name, manifest_path, test_deployment=False): | ||
def _deploy_manifest(bucket_name, | ||
manifest_path, | ||
test_deployment=False, | ||
release='prod'): | ||
"""Deploy source manifest to GCS.""" | ||
remote_manifest_path = utils.get_remote_manifest_filename(release) | ||
|
||
if test_deployment: | ||
common.execute(f'gsutil cp {manifest_path} ' | ||
f'gs://{bucket_name}/test-deployment/' | ||
f'clusterfuzz-source.manifest.3') | ||
f'{remote_manifest_path}') | ||
else: | ||
common.execute(f'gsutil cp {manifest_path} ' | ||
f'gs://{bucket_name}/' | ||
f'clusterfuzz-source.manifest.3') | ||
f'{remote_manifest_path}') | ||
|
||
|
||
def _update_deployment_manager(project, name, config_path): | ||
|
@@ -390,7 +398,8 @@ def _prod_deployment_helper(config_dir, | |
package_zip_paths, | ||
deploy_appengine=True, | ||
deploy_k8s=True, | ||
test_deployment=False): | ||
test_deployment=False, | ||
release='prod'): | ||
"""Helper for production deployment.""" | ||
config = local_config.Config() | ||
deployment_bucket = config.get('project.deployment.bucket') | ||
|
@@ -418,7 +427,8 @@ def _prod_deployment_helper(config_dir, | |
yaml_paths, | ||
package_zip_paths, | ||
deploy_appengine=deploy_appengine, | ||
test_deployment=test_deployment) | ||
test_deployment=test_deployment, | ||
release=release) | ||
|
||
if deploy_appengine: | ||
common.execute( | ||
|
@@ -529,7 +539,8 @@ def execute(args): | |
if deploy_zips: | ||
for platform_name in platforms: | ||
package_zip_paths.append( | ||
package.package(revision, platform_name=platform_name)) | ||
package.package( | ||
revision, platform_name=platform_name, release=args.release)) | ||
else: | ||
# package.package calls these, so only set these up if we're not packaging, | ||
# since they can be fairly slow. | ||
|
@@ -553,7 +564,8 @@ def execute(args): | |
package_zip_paths, | ||
deploy_appengine, | ||
deploy_k8s, | ||
test_deployment=test_deployment) | ||
test_deployment=test_deployment, | ||
release=args.release) | ||
|
||
with open(constants.PACKAGE_TARGET_MANIFEST_PATH) as f: | ||
print('Source updated to %s' % f.read()) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we might need to rebuild the google images for this to be used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The plan is to use progressive rollout to validate on internal, we should not need to perform this operation for now.