-
Notifications
You must be signed in to change notification settings - Fork 245
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
Exception in cci task upload_production - Malformed Request Error: The version number must be greater than the last Managed - Released version number #3734
Comments
@kayla-blackthorn We can't reproduce this issue using your reproduction steps, do you have any logs from the workflow run or the packaging org you could share? What about cci versions? Are they the same locally and in the action? |
@jstvz Here is the most recent log: https://github.com/blackthornio/payments/actions/runs/7640963906/job/20817192501#step:10:64 My workflow runs pip install cumulusci, which I think installs the latest cci version? I do see that in the logs there is a notice about a pip upgrade available: |
Hi just following up here |
That log is in a private repository that no one can see :) Could you copy/paste the relevant lines here? |
@jlantz haha, sorry about that. Error: Malformed request Workflow: name: Salesforce Package Build on: env: jobs:
This is happening on Create Major Release, the first step of the custom flow release_production which is the upload_production task. |
@jlantz I opened a case with Salesforce too and am waiting to hear. I want to make sure I understand how the upload_production task should be working. When I execute |
I just finished reviewing with Salesforce support, and of course the Action I ran on the call succeeded to increment the version number. Even before running through a demo for them, Salesforce was adamant that the issue was not on their end. They said that error would only be thrown if the version attempting to be said was not ahead of the latest package version. I double checked to make sure that the latest release was marked correctly in GitHub since I now know that the cumulus flows look at the github releases to determine the latest. Those are however marked correctly in two of my repos where I just ran my automation. One worked (on the demo to Salesforce) while the other failed due to [{'message': 'The version metadata currently in packaging number must be greater than the last Managed - Released version number: 6.13', 'errorCode': 'FIELD_INTEGRITY_EXCEPTION', 'fields': []}] |
I started trying to better understand exactly what cci is doing with the upload_production task. If I am understanding package_upload.py correctly, it looks like I might see why the version error is happening. When I run task upload_production I am not explicitly setting major_version or minor_version in options. So it looks like it fetches the latest version from the database using this query: My package that is NOT experiencing this issue is one that has not yet passed security review and thus is not eligible for patch orgs. If I am correct in interpreting how this is working, I assume I cannot actually use the upload_production task as is and will need to write some custom logic to set the version correctly so that it increments to (in this case) 6.14 |
I guess even explicitly setting the version numbers in options won't work if the latest version in the org is a Beta. If I try to set 6.14, I will hit the error: Latest Minor Version is Beta so minor version cannot be greater than that. |
On our end, we will hold on creating patch versions until after the next monthly release version has been created to avoid that query returning the beta patch version. Is it possible though to have it updated to filter out deprecated versions? I was going to test to confirm that as long as the version returned by the query was the latest non-beta version that it would work as expected, but deprecating my patch version won't change anything since the query still finds it as the latest version. |
Describe the bug
I am encountering this exception when running the upload_production task as part of a GitHub Actions CumulusCI Workflow:
Malformed Request Error: Response content: ['message': 'The version number must be greater than the last Managed - Released version number: 1.16', 'errorCode':FIELD_INTEGRITY_EXCEPTION', 'fields': []]
I have a CCI workflow that runs using GitHub actions and for some reason a couple of the packages that use this workflow occasionally receive this error. If I run the CCI command manually after attempting to run the workflow, it correctly increments the version number and does not throw an error. I have the same automation in place for multiple packages and only experience this for some. There are no notable differences in the workflow files or cumulusci.yml files.
This action is run manually to create new releases. It deploys the latest code from the packaging org then proceeds to run a CCI flow that has upload_production as its first task. The packages have new major versions released on a monthly cadence. Of course, if there are tests that fail or bugs identified as part of our QA release testing/regression process, then we end up creating a new release candidate and running the action again. Most of these workflow runs are happening a month apart still though. For example, one package where I experienced the issue had its last version created 12/20/23 and I tried to run the action today 1/23/24. When I ran the flow manually (cci flow run release_production --org package-org) it worked fine without errors.
Reproduction steps
Your CumulusCI and Python versions
CumulusCI version: 3.77.0
Python version: 3.10.4
Operating System
macOS Ventura 13.4.1 (c)
Windows environment
No response
CumulusCI installation method
pip
Error Gist
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: