SFDO-Tooling / CumulusCI

Python framework for building portable automation for Salesforce projects
http://cumulusci.readthedocs.io
BSD 3-Clause "New" or "Revised" License
363 stars 242 forks source link

Unable to publish a plan for a new release #3840

Closed posigithub closed 2 hours ago

posigithub commented 1 month ago

Describe the bug

I was working on a proof of concept and created a test 2GP package. I then made a new release, v0.1.0.1, and ran the command "cci task run metadeploy_publish -o tag TAG". However, I encountered an error in the HTML code format. When I converted that to a page, it just displays "Loading...".

image - 2024-10-04T105136 354 image - 2024-10-04T105128 441 image - 2024-10-04T105122 417 image (100) image (99) image (98)

Here is the copy of that error message: Error: Cannot decode as JSON: <!doctype html><html lang="en" class="slds-theme_default"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="ie=edge"/><meta http-equiv="Content-Security-Policy" content="default-src 'self' 'unsafe-inline'; img-src *"/><meta name="robots" content="index, follow"/> <meta name="author" content="Posimente"/><meta name="keywords" content=""/><meta name="language" content="en-us"/><title>Posimente</title><meta name="description" content="Web-based tool for installing Salesforce products"/> <script id="js-globals" type="application/json">{"PREFLIGHT_LIFETIME_MINUTES": 10, "TOKEN_LIFETIME_MINUTES": 10, "SITE": {"name": "Posimente", "company_name": "Posimente", "welcome_text": "", "master_agreement": "", "copyright_notice": "", "show_metadeploy_wordmark": true, "company_logo": "/files/posimente_Logo.png", "favicon": null}, "YEAR": 2024, "SENTRY_DSN": "", "SCRATCH_ORGS_AVAILABLE": false}</script> <script id="js-context" type="application/json">""</script><script>this.api_urls=(function(){"use strict";var data={"urls":[["account_change_password",[["accounts/password/change/",[]]]],["account_confirm_email",[["accounts/confirm-email/%(key)s/",["key"]]]],["account_email",[["accounts/email/",[]]]],["account_em ail_verification_sent",[["accounts/confirm-email/",[]]]],["account_inactive",[["accounts/inactive/",[]]]],["account_login",[["accounts/login/",[]]]],["account_logout",[["accounts/logout/",[]]]],["account_ reauthenticate",[["accounts/reauthenticate/",[]]]],["account_reset_password",[["accounts/password/reset/",[]]]],["account_reset_password_done",[["accounts/password/reset/done/",[]]]],["account_reset_passw ord_from_key",[["accounts/password/reset/key/%(uidb36)s-%(key)s/",["uidb36","key"]]]],["account_reset_password_from_key_done",[["accounts/password/reset/key/done/",[]]]],["account_set_password",[["account s/password/set/",[]]]],["account_signup",[["accounts/signup/",[]]]],["api-root",[["api/.%(format)s",["format"]],["api/",[]]]],["database_file",[["files/%(name)s",["name"]]]],["frontend",[["products",[]]]] ,["home",[["",[]]]],["job-detail",[["api/jobs/%(pk)s.%(format)s",["pk","format"]],["api/jobs/%(pk)s/",["pk"]]]],["job-list",[["api/jobs.%(format)s",["format"]],["api/jobs/",[]]]],["org-list",[["api/orgs.% (format)s",["format"]],["api/orgs/",[]]]],["plan-detail",[["api/plans/%(pk)s.%(format)s",["pk","format"]],["api/plans/%(pk)s/",["pk"]]]],["plan-get-one",[["api/plans/get_one.%(format)s",["format"]],["api/ plans/get_one/",[]]]],["plan-list",[["api/plans.%(format)s",["format"]],["api/plans/",[]]]],["plan-preflight",[["api/plans/%(pk)s/preflight.%(format)s",["pk","format"]],["api/plans/%(pk)s/preflight/",["pk "]]]],["plan-scratch-org",[["api/plans/%(pk)s/scratch_org.%(format)s",["pk","format"]],["api/plans/%(pk)s/scratch_org/",["pk"]]]],["product-detail",[["api/products/%(pk)s.%(format)s",["pk","format"]],["ap i/products/%(pk)s/",["pk"]]]],["product-get-one",[["api/products/get_one.%(format)s",["format"]],["api/products/get_one/",[]]]],["product-list",[["api/products.%(format)s",["format"]],["api/products/",[]] ]],["productcategory-detail",[["api/categories/%(pk)s.%(format)s",["pk","format"]],["api/categories/%(pk)s/",["pk"]]]],["productcategory-list",[["api/categories.%(format)s",["format"]],["api/categories/", []]]],["rq_actions",[["admin/django-rq/queues/actions/%(queue_index)s/",["queue_index"]]]],["rq_clear",[["admin/django-rq/queues/%(queue_index)s/empty/",["queue_index"]]]],["rq_confirm_action",[["admin/dj ango-rq/queues/confirm-action/%(queue_index)s/",["queue_index"]]]],["rq_deferred_jobs",[["admin/django-rq/queues/%(queue_index)s/deferred/",["queue_index"]]]],["rq_delete_failed_jobs",[["admin/django-rq/q ueues/%(queue_index)s/failed/clear/",["queue_index"]]]],["rq_delete_job",[["admin/django-rq/queues/%(queue_index)s/%(job_id)s/delete/",["queue_index","job_id"]]]],["rq_enqueue_job",[["admin/django-rq/queu es/%(queue_index)s/%(job_id)s/enqueue/",["queue_index","job_id"]]]],["rq_failed_jobs",[["admin/django-rq/queues/%(queue_index)s/failed/",["queue_index"]]]],["rq_finished_jobs",[["admin/django-rq/queues/%( queue_index)s/finished/",["queue_index"]]]],["rq_home",[["admin/django-rq/",[]]]],["rq_home_json",[["admin/django-rq/stats.json/",[]],["admin/django-rq/stats.json/%(token)s",["token"]]]],["rq_job_detail", [["admin/django-rq/queues/%(queue_index)s/%(job_id)s/",["queue_index","job_id"]]]],["rq_jobs",[["admin/django-rq/queues/%(queue_index)s/",["queue_index"]]]],["rq_requeue_all",[["admin/django-rq/queues/%(q ueue_index)s/requeue-all/",["queue_index"]]]],["rq_requeue_job",[["admin/django-rq/queues/%(queue_index)s/%(job_id)s/requeue/",["queue_index","job_id"]]]],["rq_scheduled_jobs",[["admin/django-rq/queues/%( queue_index)s/scheduled/",["queue_index"]]]],["rq_scheduler_jobs",[["admin/django-rq/schedulers/%(scheduler_index)s/",["scheduler_index"]]]],["rq_started_jobs",[["admin/django-rq/queues/%(queue_index)s/st arted/",["queue_index"]]]],["rq_stop_job",[["admin/django-rq/queues/%(queue_index)s/%(job_id)s/stop/",["queue_index","job_id"]]]],["rq_worker_details",[["admin/django-rq/workers/%(queue_index)s/%(key)s/", ["queue_index","key"]]]],["rq_workers",[["admin/django-rq/workers/%(queue_index)s/",["queue_index"]]]],["salesforce_callback",[["accounts/salesforce/login/callback/",[]]]],["salesforce_login",[["accounts/ salesforce/login/",[]]]],["scratch-org-redirect",[["api/scratch-orgs/%(pk)s/redirect.%(format)s",["pk","format"]],["api/scratch-orgs/%(pk)s/redirect/",["pk"]]]],["socialaccount_connections",[["accounts/so cial/connections/",[]]]],["socialaccount_login_cancelled",[["accounts/social/login/cancelled/",[]]]],["socialaccount_login_error",[["accounts/social/login/error/",[]]]],["socialaccount_signup",[["accounts /social/signup/",[]]]],["ui-bootstrap",[["api/ui/bootstrap.%(format)s",["format"]],["api/ui/bootstrap/",[]]]],["ui-reverse",[["api/ui/reverse.%(format)s",["format"]],["api/ui/reverse/",[]]]],["user",[["ap i/user/",[]]]],["version-additional-plans",[["api/versions/%(pk)s/additional_plans.%(format)s",["pk","format"]],["api/versions/%(pk)s/additional_plans/",["pk"]]]],["version-detail",[["api/versions/%(pk)s. %(format)s",["pk","format"]],["api/versions/%(pk)s/",["pk"]]]],["version-get-one",[["api/versions/get_one.%(format)s",["format"]],["api/versions/get_one/",[]]]],["version-list",[["api/versions.%(format)s" ,["format"]],["api/versions/",[]]]],["ws_notifications",[["ws/notifications/",[]]]]],"prefix":"/"};function factory(d){var url_patterns=d.urls;var url_prefix=d.prefix;var Urls={};var self_url_patterns={};var _get_url=function(url_pattern){return function(){var _arguments,index,url,url_arg,url_args,_i,_len,_ref,_ref_list,match_ref,provided_keys,build_kwargs;_arguments=arguments;_ref_list=self_url_patterns[url_pattern];if(arguments.length==1&&typeof(arguments[0]) =="object"){var provided_keys_list=Object.keys(arguments[0]);provided_keys={};for(_i=0;_i<provided_keys_list.length;_i++) provided_keys[provided_keys_list[_i]]=1;match_ref=function(ref) {var _i;if(ref[1].length!=provided_keys_list.length) return false;for(_i=0;_i<ref[1].length&&ref[1][_i]in provided_keys;_i++);return _i==ref[1].length;} build_kwargs=function(keys){return _arguments[0];}}else{match_ref=function(ref) {return ref[1].length==_arguments.length;} build_kwargs=function(keys){var kwargs={};for(var i=0;i<keys.length;i++){kwargs[keys[i]]=_arguments[i];} return kwargs;}} for(_i=0;_i<_ref_list.length&&!match_ref(_ref_list[_i]);_i++);if(_i==_ref_list.length) return null;_ref=_ref_list[_i];url=_ref[0],url_args=build_kwargs(_ref[1]);for(url_arg in url_args){var url_arg_value=url_args[url_arg];if(url_arg_value===undefined||url_arg_value===null){url_arg_value='';}else{url_arg_value=url_arg_value.toString();} url=url.replace("%("+url_arg+")s",url_arg_value);} return url_prefix+url;};};var name,pattern,url,_i,_len,_ref;for(_i=0,_len=url_patterns.length;_i<_len;_i++){_ref=url_patterns[_i],name=_ref[0],pattern=_ref[1];self_url_patterns[name]=pattern;url=_get_url(name);Urls[name.replace(/[-_]+ (.)/g,function(_m,p1){return p1.toUpperCase();})]=url;Urls[name.replace(/-/g,'_')]=url;Urls[name]=url;} return Urls;} return data?factory(data):factory;})();</script><script defer="defer" src="/static/runtime.8526eb8e097690a55481.min.js"></script><script defer="defer" src="/static/sentry.4979312d335784982ae1.min.js"></script><script defer="defer" src="/static/vendors.5d57a04eb755ee1f0a21.min.js"></script><script defer="defer" src="/static/app.bf316b36cf3d6faed086.min.js"></script><link href="/static/vendors.5d57a04eb755ee1f0a21.min.css" rel="stylesheet"><link href="/static/styles.658e5c2a570de9f24acc.min.css" rel="stylesheet"></head><body><main id="app" class="slds-grid slds-grid_vertical" ><div role="status" class="slds-spinner slds-spinner_large"><span class="slds-assistive-text">Loading…</span><div class="slds-spinner__dot-a"></div><div class="slds-spinner__dot-b"></div></div></main></body></html>

Reproduction steps

  1. Run "cci service list" to check connections.
  2. Run "cci flow run release_2gp_beta --org dev" to create the package and the beta version
  3. Run "cci flow run release_2gp_production --org dev" to promote the latest beta 2gp managed package version
  4. Updated cumulusci.yml to add a plan
  5. Commit and push changes to main branch
  6. Run "cci task run metadeploy_publish -o tag TAG" to publish the plan but encountered an error

Your CumulusCI and Python versions

CumulusCI version: 3.92.0 (C:\Users\janua.local\bin\cci) Python version: 3.11.1 (C:\Users\janua.local\pipx\venvs\cumulusci\Scripts\python.exe) Heroku App Stack: Heroku22

Operating System

Windows 11 Pro, Version 22H2

Windows environment

Bash on Windows

CumulusCI installation method

None

Error Gist

https://gist.github.com/posigithub/2e5a89abab65d027c04237c9106a3c9f

Additional information

No response

davidjray commented 1 day ago

@posigithub The issue is CumulusCI expects the MetaDeploy service to return JSON, but it looks like there was an error on the MetaDeploy side so it returned the MetaDeploy homepage. It just says "Loading" because it's a generic page and it's not rendering anything before the response is returned.

The command you ran cci task run metadeploy_publish -o tag TAG is incorrect. As the Documentation shows "substituting TAG with the name of the tag you want to publish." you have to replace TAG with the actual Git tag you want the MetaDeploy plan to reference.