Skip to content
This repository has been archived by the owner on Feb 2, 2019. It is now read-only.

Bug 692501: update verify against cdntest for beta #208

Merged
merged 2 commits into from
Nov 25, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,5 @@ tuxedo_server_url: "https://admin-bouncer.stage.mozaws.net/api"
push_to_releases_automatic: true
beetmover_candidates_bucket: "net-mozaws-stage-delivery-firefox"
snap_enabled: false
update_verify_channel: null
update_verify_requires_cdn_push: false
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,5 @@ tuxedo_server_url: "https://admin-bouncer.stage.mozaws.net/api"
push_to_releases_automatic: true
beetmover_candidates_bucket: "net-mozaws-stage-delivery-firefox"
snap_enabled: false
update_verify_channel: null
update_verify_requires_cdn_push: false
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,5 @@ tuxedo_server_url: "https://bounceradmin.mozilla.com/api"
push_to_releases_automatic: true
beetmover_candidates_bucket: "net-mozaws-prod-delivery-firefox"
snap_enabled: false
update_verify_channel: null
update_verify_requires_cdn_push: false
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,5 @@ tuxedo_server_url: "https://bounceradmin.mozilla.com/api"
push_to_releases_automatic: true
beetmover_candidates_bucket: "net-mozaws-prod-delivery-firefox"
snap_enabled: false
update_verify_channel: null
update_verify_requires_cdn_push: false
6 changes: 6 additions & 0 deletions releasetasks/templates/firefox/bb_update_verify.yml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
- {{ stableSlugId(upstream_builder) }}
{% endfor %}
- {{ stableSlugId("release-{}-{}_updates".format(branch, product)) }}
{% if update_verify_requires_cdn_push is defined and update_verify_requires_cdn_push %}
Copy link
Contributor

Choose a reason for hiding this comment

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

since uptake_monitoring itself assumes the other tasks in this requires block is done, should we have a if/else here? as in, if requires_cdn_push: add_uptake_monitor, else: add artifact_gen_and_updates tasks.

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 tried it and not sure if it looks easier to read... https://gist.github.com/rail/9c135ff75524df54e35901e23e48d5d9

Also the tests would become more complicated... Let's go with the current version!

- {{ stableSlugId("release-{}-{}_uptake_monitoring".format(branch, product)) }}
{% endif %}
reruns: 5
task:
provisionerId: buildbot-bridge
Expand Down Expand Up @@ -43,6 +46,9 @@
VERIFY_CONFIG: "{{ channel }}-{{ product }}-{{ platform }}.cfg"
TOTAL_CHUNKS: "{{ uv_totalchunks }}"
THIS_CHUNK: "{{ chunk }}"
{% if update_verify_channel is defined and update_verify_channel %}
CHANNEL: "{{ update_verify_channel }}"
{% endif %}

metadata:
owner: release@mozilla.com
Expand Down
6 changes: 6 additions & 0 deletions releasetasks/templates/firefox/tc_update_verify.yml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
- {{ stableSlugId(upstream_builder) }}
{% endfor %}
- {{ stableSlugId("release-{}-{}_updates".format(branch, product)) }}
{% if update_verify_requires_cdn_push is defined and update_verify_requires_cdn_push %}
- {{ stableSlugId("release-{}-{}_uptake_monitoring".format(branch, product)) }}
{% endif %}
reruns: 5
task:
provisionerId: aws-provisioner-v1
Expand Down Expand Up @@ -43,6 +46,9 @@
platform=platform,
channel=channel,
product=product) }}"
{% if update_verify_channel is defined and update_verify_channel %}
CHANNEL: "{{ update_verify_channel }}"
{% endif %}
metadata:
owner: release@mozilla.com
source: https://github.com/mozilla/releasetasks
Expand Down
61 changes: 61 additions & 0 deletions releasetasks/test/firefox/test_bb_update_verify.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,3 +178,64 @@ def test_multichannel(self):

multichan_task = get_task_by_name(self.graph, "release-beta_firefox_win32_update_verify_{chan}_3".format(chan=chan))
verify(multichan_task, multichan_schema, TestBB_UpdateVerifyMultiChannel.not_allowed)


class TestBB_UpdateVerifyChannel(unittest.TestCase):
maxDiff = 30000
graph = None
task = None
payload = None

def setUp(self):
self.task_schema = Schema({
'task': {
'provisionerId': 'buildbot-bridge',
'workerType': 'buildbot-bridge',
'payload': {
'properties': {
'CHANNEL': 'beta-cdntest'
}
}
}
}, extra=True, required=True)
test_args = create_firefox_test_args({
'updates_enabled': True,
'push_to_candidates_enabled': True,
'push_to_releases_enabled': True,
'update_verify_enabled': True,
'updates_builder_enabled': True,
'signing_pvt_key': PVT_KEY_FILE,
'branch': 'beta',
'release_channels': ['beta'],
'final_verify_channels': ['beta'],
'l10n_config': L10N_CONFIG,
'en_US_config': EN_US_CONFIG,
'uptake_monitoring_enabled': True,
'update_verify_channel': 'beta-cdntest',
'update_verify_requires_cdn_push': True,
})
self.graph = make_task_graph(**test_args)
self.task = get_task_by_name(self.graph, "release-beta_firefox_win32_update_verify_beta_3")

def test_common_assertions(self):
do_common_assertions(self.graph)

@staticmethod
@truth
Copy link
Contributor

Choose a reason for hiding this comment

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

fancy

def not_allowed(task):
return "scopes" not in task

def test_channel(self):
verify(self.task, self.task_schema, self.__class__.not_allowed)
Copy link
Contributor

Choose a reason for hiding this comment

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

more fancy. ++connor


def generate_task_dependency_validator(self):

@truth
def validate_dependencies(task):
uptake = get_task_by_name(self.graph, "release-beta-firefox_uptake_monitoring")["taskId"]
return uptake in task['requires']

return validate_dependencies

def test_cdns(self):
verify(self.task, self.task_schema, self.generate_task_dependency_validator())