cumulusci.tasks.push package

Submodules

class cumulusci.tasks.push.push_api.BasePushApiObject[source]

Bases: object

format_where(id_field, where=None)[source]
class cumulusci.tasks.push.push_api.MetadataPackage(push_api, name, sf_id=None, namespace=None)[source]

Bases: cumulusci.tasks.push.push_api.BasePushApiObject

get_package_version_objs(where=None, limit=None)[source]
get_package_versions(where=None, limit=None)[source]
get_package_versions_by_id(where=None, limit=None)[source]
class cumulusci.tasks.push.push_api.MetadataPackageVersion(push_api, package, name, state, major, minor, patch, build, sf_id=None)[source]

Bases: cumulusci.tasks.push.push_api.BasePushApiObject

get_newer_released_version_objs(less_than_version=None)[source]
get_older_released_version_objs(greater_than_version=None)[source]
get_push_request_objs(where=None, limit=None)[source]
get_push_requests(where=None, limit=None)[source]
get_push_requests_by_id(where=None, limit=None)[source]
get_subscriber_objs(where=None, limit=None)[source]
get_subscribers(where=None, limit=None)[source]
get_subscribers_by_org_key(where=None, limit=None)[source]
version_number
class cumulusci.tasks.push.push_api.PackagePushError(push_api, job, severity, error_type, title, message, details, sf_id=None)[source]

Bases: cumulusci.tasks.push.push_api.BasePushApiObject

class cumulusci.tasks.push.push_api.PackagePushJob(push_api, request, org, status, sf_id=None)[source]

Bases: cumulusci.tasks.push.push_api.BasePushApiObject

get_push_error_objs(where=None, limit=None)[source]
get_push_errors(where=None, limit=None)[source]
get_push_errors_by_id(where=None, limit=None)[source]
class cumulusci.tasks.push.push_api.PackagePushRequest(push_api, version, start_time, status, sf_id=None)[source]

Bases: cumulusci.tasks.push.push_api.BasePushApiObject

get_push_job_objs(where=None, limit=None)[source]
get_push_jobs(where=None, limit=None)[source]
get_push_jobs_by_id(where=None, limit=None)[source]
class cumulusci.tasks.push.push_api.PackageSubscriber(push_api, version, status, org_name, org_key, org_status, org_type, sf_id=None)[source]

Bases: object

format_where(id_field, where=None)[source]
get_push_job_objs(where=None, limit=None)[source]
get_push_jobs(where=None, limit=None)[source]
get_push_jobs_by_id(where=None, limit=None)[source]
class cumulusci.tasks.push.push_api.SalesforcePushApi(sf, logger, lazy=None, default_where=None, batch_size=None)[source]

Bases: object

API Wrapper for the Salesforce Push API

add_query_limit(query, limit)[source]
cancel_push_request(request_id)[source]
create_push_request(version, orgs, start)[source]
format_where_clause(where, obj=None)[source]
get_package_objs(where=None, limit=None)[source]
get_package_version_objs(where=None, limit=None)[source]
get_package_versions(where=None, limit=None)[source]
get_package_versions_by_id(where=None, limit=None)[source]
get_packages(where=None, limit=None)[source]
get_packages_by_id(where=None, limit=None)[source]
get_push_error_objs(where=None, limit=None)[source]
get_push_errors(where=None, limit=None)[source]
get_push_errors_by_id(where=None, limit=None)[source]
get_push_job_objs(where=None, limit=None)[source]
get_push_jobs(where=None, limit=None)[source]
get_push_jobs_by_id(where=None, limit=None)[source]
get_push_request_objs(where=None, limit=None)[source]
get_push_requests(where=None, limit=None)[source]
get_push_requests_by_id(where=None, limit=None)[source]
get_subscriber_objs(where=None, limit=None)[source]
get_subscribers(where=None, limit=None)[source]
get_subscribers_by_org_key(where=None, limit=None)[source]
get_where_last_version(major=None, minor=None, beta=None)[source]
return_query_records(query)[source]
run_push_request(request_id)[source]
cumulusci.tasks.push.push_api.batch_list(data, batch_size)[source]
cumulusci.tasks.push.push_api.memoize(obj)[source]

simple task(s) for reporting on push upgrade jobs.

this doesn’t use the nearby push_api module, and was just a quick ccistyle get the job done kinda moment.

class cumulusci.tasks.push.pushfails.ReportPushFailures(project_config, task_config, org_config=None, flow=None, name=None, stepnum=None, **kwargs)[source]

Bases: cumulusci.tasks.salesforce.BaseSalesforceApiTask.BaseSalesforceApiTask

Produce a report of the failed and otherwise anomalous push jobs.

Takes a push request id and writes results to a CSV file. The task result contains the filename.

api_version = '43.0'
gack = re.compile('(?P<gack_id>[\\d-]+) \\((?P<stacktrace_id>[\\d-]+)\\)')
headers = ['OrganizationId', 'OrgName', 'OrgType', 'OrgStatus', 'InstanceName', 'ErrorSeverity', 'ErrorTitle', 'ErrorType', 'ErrorMessage', 'Gack Id', 'Stacktrace Id']
job_query = "SELECT ID, SubscriberOrganizationKey, (SELECT ErrorDetails, ErrorMessage, ErrorSeverity, ErrorTitle, ErrorType FROM PackagePushErrors) FROM PackagePushJob WHERE PackagePushRequestId = '{request_id}' AND Status !='Succeeded'"
subscriber_query = 'SELECT OrgKey, OrgName, OrgType, OrgStatus, InstanceName FROM PackageSubscriber WHERE OrgKey IN ({org_ids})'
task_doc = ' Produce a report of the failed and otherwise anomalous push jobs.\n\n Takes a push request id and writes results to a CSV file. The task result contains the filename. '
task_options = {'ignore_errors': {'description': 'List of ErrorTitle and ErrorType values to omit from the report'}, 'request_id': {'description': 'PackagePushRequest ID for the request you need to report on.', 'required': True}, 'result_file': {'description': "Path to write a CSV file with the results. Defaults to 'push_fails.csv'."}}
class cumulusci.tasks.push.tasks.BaseSalesforcePushTask(project_config, task_config, org_config=None, flow=None, name=None, stepnum=None, **kwargs)[source]

Bases: cumulusci.tasks.salesforce.BaseSalesforceApiTask.BaseSalesforceApiTask

api_version = '38.0'
completed_statuses = ['Succeeded', 'Failed', 'Canceled']
class cumulusci.tasks.push.tasks.FilterSubscriberList(project_config, task_config, org_config=None, flow=None, name=None, stepnum=None, **kwargs)[source]

Bases: cumulusci.core.tasks.BaseTask

Filter subscriber org list by org type, version. Write file with org IDs only

task_options = {'file_in': {'description': 'CSV file with full org info', 'required': True}, 'file_out': {'description': 'File where org IDs will be written', 'required': True}, 'org_type': {'description': 'Filter by org type'}, 'version': {'description': 'Filter by installed package version'}}
class cumulusci.tasks.push.tasks.GetSubscriberList(project_config, task_config, org_config=None, flow=None, name=None, stepnum=None, **kwargs)[source]

Bases: cumulusci.tasks.salesforce.BaseSalesforceApiTask.BaseSalesforceApiTask

Get subscribed org info and write to local CSV file

task_options = {'filename': {'description': 'File where org IDs will be written', 'required': True}}
class cumulusci.tasks.push.tasks.SchedulePushOrgList(project_config, task_config, org_config=None, flow=None, name=None, stepnum=None, **kwargs)[source]

Bases: cumulusci.tasks.push.tasks.BaseSalesforcePushTask

task_options = {'batch_size': {'description': 'Break pull requests into batches of this many orgs. Defaults to 200.'}, 'namespace': {'description': 'The managed package namespace to push. Defaults to project__package__namespace.'}, 'orgs': {'description': 'The path to a file containing one OrgID per line.', 'required': True}, 'start_time': {'description': 'Set the start time (UTC) to queue a future push. Ex: 2016-10-19T10:00'}, 'version': {'description': 'The managed package version to push', 'required': True}}
class cumulusci.tasks.push.tasks.SchedulePushOrgQuery(project_config, task_config, org_config=None, flow=None, name=None, stepnum=None, **kwargs)[source]

Bases: cumulusci.tasks.push.tasks.SchedulePushOrgList

task_options = {'min_version': {'description': 'If set, no subscriber with a version lower than min_version will be selected for push'}, 'namespace': {'description': 'The managed package namespace to push. Defaults to project__package__namespace.'}, 'start_time': {'description': 'Set the start time (UTC) to queue a future push. Ex: 2016-10-19T10:00'}, 'subscriber_where': {'description': "A SOQL style WHERE clause for filtering PackageSubscriber objects. Ex: OrgType = 'Sandbox'"}, 'version': {'description': 'The managed package version to push', 'required': True}}

Module contents