aws / aws-cli

Universal Command Line Interface for Amazon Web Services
Other
15.56k stars 4.13k forks source link

Unable to start a new job on a branch name with forward slash #7883

Closed borisyordanov closed 3 months ago

borisyordanov commented 1 year ago

Describe the bug

I followed this guide on how to trigger Amplify deployments. Even though the branch exists and it even already has an Amplify deployment the CLI tells me the branch doesn't exist. image

Expected Behavior

The cli should work with all formats of branch names that git supports

Current Behavior

The cli fails if a / exists in the branch name

Reproduction Steps

  1. Run aws amplify start-job --app-id <appid> --branch-name <branchname> --job-type RELEASE and pass a branch name with a / in it, that's already been deployed, e.g. aws/test

Possible Solution

No response

Additional Information/Context

No response

CLI version used

2

Environment details (OS name and version, etc.)

Windows 11

aBurmeseDev commented 1 year ago

Hi @borisyordanov - thanks for reaching out.

I just attempted to reproduce this following the same guide that you shared but was unable to.

A new branch with forward slash was successfully created using AWS CLI method create-branch and new job was able to start with that branch. aws-cli/2.11.1 is the version I'm on.

Here's what I did and the output that I received:

amplify-app % aws amplify create-branch --app-id <appID> --branch-name aws/dev  
{
    "branch": {
        "branchArn": "arn:aws:amplify:us-east-1:<accountID>:apps/<appID>/branches/aws/dev",
        "branchName": "aws/dev",
        "stage": "NONE",
        "displayName": "aws-dev",
        "enableNotification": false,
        "createTime": "2023-05-10T16:28:25.451000-07:00",
        "updateTime": "2023-05-10T16:28:25.451000-07:00",
        "enableAutoBuild": true,
        "totalNumberOfJobs": "0",
        "enableBasicAuth": false,
        "enablePerformanceMode": false,
        "ttl": "5",
        "enablePullRequestPreview": false
    }
}
amplify-app % aws amplify start-job --app-id d1fyt0mc91jzz3 --branch-name aws/dev --job-type RELEASE
{
    "jobSummary": {
        "jobArn": "arn:aws:amplify:us-east-1:<accountID>:apps/<appID>/branches/aws/dev/jobs/0000000001",
        "jobId": "1",
        "commitId": "HEAD",
        "commitTime": "2023-05-10T16:28:42.280000-07:00",
        "status": "PENDING"
    }
}

I'd suggest checking on your AWS CLI version and update accordingly unless you're on recent version. Was the branch with / created using AWS CLI or via AWS Console? Also, debug logs would be insightful for us to look through to find the culprit here. You can retrieve the logs by adding --debug to your command.

Hope that helps, John

borisyordanov commented 1 year ago

@aBurmeseDev Thanks for looking into this, John.

Was the branch with / created using AWS CLI or via AWS Console?

Neither - it was created with git. Amplify has a feature (that works fine) where it finds new branches and automatically deploys them - https://docs.aws.amazon.com/amplify/latest/userguide/getting-started.html

All I was trying to do was to re-trigger a deployment.

The create-branch command from the guide is not necessary AFAIK (when there isn't a /) since the branches aren't created with the cli.

Also, debug logs would be insightful for us to look through to find the culprit here. You can retrieve the logs by adding --debug to your command.

Here are the debug logs

aws amplify start-job --app-id d26rfy7bgd5d4z --branch-name APS-58/delete_representatives_fix --job-type RELEASE --debug
2023-05-11 08:49:39,240 - MainThread - awscli.clidriver - DEBUG - CLI version: aws-cli/2.11.15 Python/3.11.3 Windows/10 exe/AMD64
2023-05-11 08:49:39,240 - MainThread - awscli.clidriver - DEBUG - Arguments entered to CLI: ['amplify', 'start-job', '--app-id', 'd26rfy7bgd5d4z', '--branch-name', 'APS-58/delete_representatives_fix', '--job-type', 'RELEASE', '--debug']
2023-05-11 08:49:39,381 - MainThread - botocore.hooks - DEBUG - Event building-command-table.main: calling handler <function add_s3 at 0x0000024AAF0EF6A0>
2023-05-11 08:49:39,381 - MainThread - botocore.hooks - DEBUG - Event building-command-table.main: calling handler <function add_ddb at 0x0000024AAEF30900>
2023-05-11 08:49:39,381 - MainThread - botocore.hooks - DEBUG - Event building-command-table.main: calling handler <bound method BasicCommand.add_command of <class 'awscli.customizations.configure.configure.ConfigureCommand'>>
2023-05-11 08:49:39,381 - MainThread - botocore.hooks - DEBUG - Event building-command-table.main: calling handler <function change_name at 0x0000024AAEE8EA20>
2023-05-11 08:49:39,381 - MainThread - botocore.hooks - DEBUG - Event building-command-table.main: calling handler <function change_name at 0x0000024AAEEB40E0>
2023-05-11 08:49:39,381 - MainThread - botocore.hooks - DEBUG - Event building-command-table.main: calling handler <function alias_opsworks_cm at 0x0000024AAF0F9BC0>
2023-05-11 08:49:39,381 - MainThread - botocore.hooks - DEBUG - Event building-command-table.main: calling handler <function add_history_commands at 0x0000024AAEF6F2E0>
2023-05-11 08:49:39,381 - MainThread - botocore.hooks - DEBUG - Event building-command-table.main: calling handler <bound method BasicCommand.add_command of <class 'awscli.customizations.devcommands.CLIDevCommand'>>
2023-05-11 08:49:39,381 - MainThread - botocore.hooks - DEBUG - Event building-command-table.main: calling handler <function add_waiters at 0x0000024AAF0F9A80>
2023-05-11 08:49:39,382 - MainThread - botocore.hooks - DEBUG - Event building-command-table.main: calling handler <bound method AliasSubCommandInjector.on_building_command_table of <awscli.alias.AliasSubCommandInjector object at 0x0000024AAF1AEE10>>
2023-05-11 08:49:39,386 - MainThread - botocore.loaders - DEBUG - Loading JSON file: C:\Program Files\Amazon\AWSCLIV2\awscli\data\cli.json
2023-05-11 08:49:39,388 - MainThread - botocore.hooks - DEBUG - Event top-level-args-parsed: calling handler <function resolve_types at 0x0000024AAF040D60>
2023-05-11 08:49:39,388 - MainThread - botocore.hooks - DEBUG - Event top-level-args-parsed: calling handler <function no_sign_request at 0x0000024AAF041080>
2023-05-11 08:49:39,388 - MainThread - botocore.hooks - DEBUG - Event top-level-args-parsed: calling handler <function resolve_verify_ssl at 0x0000024AAF040FE0>
2023-05-11 08:49:39,388 - MainThread - botocore.hooks - DEBUG - Event top-level-args-parsed: calling handler <function resolve_cli_read_timeout at 0x0000024AAF0411C0>
2023-05-11 08:49:39,389 - MainThread - botocore.hooks - DEBUG - Event top-level-args-parsed: calling handler <function resolve_cli_connect_timeout at 0x0000024AAF041120>
2023-05-11 08:49:39,389 - MainThread - botocore.hooks - DEBUG - Event top-level-args-parsed: calling handler <built-in method update of dict object at 0x0000024AAF1AC900>
2023-05-11 08:49:39,390 - MainThread - awscli.clidriver - DEBUG - CLI version: aws-cli/2.11.15 Python/3.11.3 Windows/10 exe/AMD64 prompt/off
2023-05-11 08:49:39,390 - MainThread - awscli.clidriver - DEBUG - Arguments entered to CLI: ['amplify', 'start-job', '--app-id', 'd26rfy7bgd5d4z', '--branch-name', 'APS-58/delete_representatives_fix', '--job-type', 'RELEASE', '--debug']
2023-05-11 08:49:39,390 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function add_timestamp_parser at 0x0000024AAF0F8040>
2023-05-11 08:49:39,391 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function register_uri_param_handler at 0x0000024AAEBEE660>
2023-05-11 08:49:39,391 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function add_binary_formatter at 0x0000024AAF16F100>
2023-05-11 08:49:39,391 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function no_pager_handler at 0x0000024AAEBD2E80>
2023-05-11 08:49:39,392 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function inject_assume_role_provider_cache at 0x0000024AAEC3BF60>
2023-05-11 08:49:39,406 - MainThread - botocore.utils - DEBUG - IMDS ENDPOINT: http://169.254.169.254/
2023-05-11 08:49:39,407 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function attach_history_handler at 0x0000024AAEF5FA60>
2023-05-11 08:49:39,407 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function inject_json_file_cache at 0x0000024AAEF2CB80>
2023-05-11 08:49:39,463 - MainThread - botocore.loaders - DEBUG - Loading JSON file: C:\Program Files\Amazon\AWSCLIV2\awscli\botocore\data\amplify\2017-07-25\service-2.json
2023-05-11 08:49:39,469 - MainThread - botocore.hooks - DEBUG - Event building-command-table.amplify: calling handler <function add_waiters at 0x0000024AAF0F9A80>
2023-05-11 08:49:39,513 - MainThread - botocore.hooks - DEBUG - Event building-command-table.amplify: calling handler <bound method AliasSubCommandInjector.on_building_command_table of <awscli.alias.AliasSubCommandInjector object at 0x0000024AAF1AEE10>>
2023-05-11 08:49:39,514 - MainThread - awscli.clidriver - DEBUG - OrderedDict([('app-id', <awscli.arguments.CLIArgument object at 0x0000024AAF297B90>), ('branch-name', <awscli.arguments.CLIArgument object at 0x0000024AAF297ED0>), ('job-id', <awscli.arguments.CLIArgument object at 0x0000024AAF2947D0>), ('job-type', <awscli.arguments.CLIArgument object at 0x0000024AAF294890>), ('job-reason', <awscli.arguments.CLIArgument object at 0x0000024AAF294B10>), ('commit-id', <awscli.arguments.CLIArgument object at 0x0000024AAF294C90>), ('commit-message', <awscli.arguments.CLIArgument object at 0x0000024AAF294DD0>), ('commit-time', <awscli.arguments.CLIArgument object at 0x0000024AAF294F10>)])
2023-05-11 08:49:39,515 - MainThread - botocore.hooks - DEBUG - Event building-argument-table.amplify.start-job: calling handler <function add_streaming_output_arg at 0x0000024AAF0F8540>        
2023-05-11 08:49:39,515 - MainThread - botocore.hooks - DEBUG - Event building-argument-table.amplify.start-job: calling handler <function add_cli_input_json at 0x0000024AAEC48540>
2023-05-11 08:49:39,516 - MainThread - botocore.hooks - DEBUG - Event building-argument-table.amplify.start-job: calling handler <function add_cli_input_yaml at 0x0000024AAEC48900>
2023-05-11 08:49:39,516 - MainThread - botocore.hooks - DEBUG - Event building-argument-table.amplify.start-job: calling handler <function unify_paging_params at 0x0000024AAEF30F40>
2023-05-11 08:49:39,572 - MainThread - botocore.loaders - DEBUG - Loading JSON file: C:\Program Files\Amazon\AWSCLIV2\awscli\botocore\data\amplify\2017-07-25\paginators-1.json
2023-05-11 08:49:39,572 - MainThread - botocore.hooks - DEBUG - Event building-argument-table.amplify.start-job: calling handler <function add_generate_skeleton at 0x0000024AAF01B560>
2023-05-11 08:49:39,573 - MainThread - botocore.hooks - DEBUG - Event before-building-argument-table-parser.amplify.start-job: calling handler <bound method OverrideRequiredArgsArgument.override_required_args of <awscli.customizations.cliinput.CliInputJSONArgument object at 0x0000024AAF295250>>
2023-05-11 08:49:39,573 - MainThread - botocore.hooks - DEBUG - Event before-building-argument-table-parser.amplify.start-job: calling handler <bound method OverrideRequiredArgsArgument.override_required_args of <awscli.customizations.cliinput.CliInputYAMLArgument object at 0x0000024AAF295690>>
2023-05-11 08:49:39,574 - MainThread - botocore.hooks - DEBUG - Event before-building-argument-table-parser.amplify.start-job: calling handler <bound method GenerateCliSkeletonArgument.override_required_args of <awscli.customizations.generatecliskeleton.GenerateCliSkeletonArgument object at 0x0000024AAF294B50>>
2023-05-11 08:49:39,574 - MainThread - botocore.hooks - DEBUG - Event building-command-table.amplify_start-job: calling handler <function add_waiters at 0x0000024AAF0F9A80>
2023-05-11 08:49:39,574 - MainThread - botocore.hooks - DEBUG - Event building-command-table.amplify_start-job: calling handler <bound method AliasSubCommandInjector.on_building_command_table of <awscli.alias.AliasSubCommandInjector object at 0x0000024AAF1AEE10>>
2023-05-11 08:49:39,576 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.amplify.start-job.app-id: calling handler <awscli.paramfile.URIArgumentHandler object at 0x0000024AAF1E73D0>   
2023-05-11 08:49:39,576 - MainThread - botocore.hooks - DEBUG - Event process-cli-arg.amplify.start-job: calling handler <awscli.argprocess.ParamShorthandParser object at 0x0000024AAEDBC310>    
2023-05-11 08:49:39,577 - MainThread - awscli.arguments - DEBUG - Unpacked value of 'd26rfy7bgd5d4z' for parameter "app_id": 'd26rfy7bgd5d4z'
2023-05-11 08:49:39,577 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.amplify.start-job.branch-name: calling handler <awscli.paramfile.URIArgumentHandler object at 0x0000024AAF1E73D0>
2023-05-11 08:49:39,577 - MainThread - botocore.hooks - DEBUG - Event process-cli-arg.amplify.start-job: calling handler <awscli.argprocess.ParamShorthandParser object at 0x0000024AAEDBC310>    
2023-05-11 08:49:39,577 - MainThread - awscli.arguments - DEBUG - Unpacked value of 'APS-58/delete_representatives_fix' for parameter "branch_name": 'APS-58/delete_representatives_fix'
2023-05-11 08:49:39,578 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.amplify.start-job.job-id: calling handler <awscli.paramfile.URIArgumentHandler object at 0x0000024AAF1E73D0>   
2023-05-11 08:49:39,578 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.amplify.start-job.job-type: calling handler <awscli.paramfile.URIArgumentHandler object at 0x0000024AAF1E73D0> 
2023-05-11 08:49:39,578 - MainThread - botocore.hooks - DEBUG - Event process-cli-arg.amplify.start-job: calling handler <awscli.argprocess.ParamShorthandParser object at 0x0000024AAEDBC310>    
2023-05-11 08:49:39,579 - MainThread - awscli.arguments - DEBUG - Unpacked value of 'RELEASE' for parameter "job_type": 'RELEASE'
2023-05-11 08:49:39,579 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.amplify.start-job.job-reason: calling handler <awscli.paramfile.URIArgumentHandler object at 0x0000024AAF1E73D0>
2023-05-11 08:49:39,580 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.amplify.start-job.commit-id: calling handler <awscli.paramfile.URIArgumentHandler object at 0x0000024AAF1E73D0>
2023-05-11 08:49:39,580 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.amplify.start-job.commit-message: calling handler <awscli.paramfile.URIArgumentHandler object at 0x0000024AAF1E73D0>
2023-05-11 08:49:39,580 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.amplify.start-job.commit-time: calling handler <awscli.paramfile.URIArgumentHandler object at 0x0000024AAF1E73D0>
2023-05-11 08:49:39,581 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.amplify.start-job.cli-input-json: calling handler <awscli.paramfile.URIArgumentHandler object at 0x0000024AAF1E73D0>
2023-05-11 08:49:39,581 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.amplify.start-job.cli-input-yaml: calling handler <awscli.paramfile.URIArgumentHandler object at 0x0000024AAF1E73D0>
2023-05-11 08:49:39,582 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.amplify.start-job.generate-cli-skeleton: calling handler <awscli.paramfile.URIArgumentHandler object at 0x0000024AAF1E73D0>
2023-05-11 08:49:39,582 - MainThread - botocore.hooks - DEBUG - Event calling-command.amplify.start-job: calling handler <bound method CliInputArgument.add_to_call_parameters of <awscli.customizations.cliinput.CliInputJSONArgument object at 0x0000024AAF295250>>
2023-05-11 08:49:39,583 - MainThread - botocore.hooks - DEBUG - Event calling-command.amplify.start-job: calling handler <bound method CliInputArgument.add_to_call_parameters of <awscli.customizations.cliinput.CliInputYAMLArgument object at 0x0000024AAF295690>>
2023-05-11 08:49:39,583 - MainThread - botocore.hooks - DEBUG - Event calling-command.amplify.start-job: calling handler <bound method GenerateCliSkeletonArgument.generate_skeleton of <awscli.customizations.generatecliskeleton.GenerateCliSkeletonArgument object at 0x0000024AAF294B50>>      
2023-05-11 08:49:39,584 - MainThread - botocore.credentials - DEBUG - Looking for credentials via: env
2023-05-11 08:49:39,584 - MainThread - botocore.credentials - DEBUG - Looking for credentials via: assume-role
2023-05-11 08:49:39,585 - MainThread - botocore.credentials - DEBUG - Looking for credentials via: assume-role-with-web-identity
2023-05-11 08:49:39,585 - MainThread - botocore.credentials - DEBUG - Looking for credentials via: sso
2023-05-11 08:49:39,585 - MainThread - botocore.credentials - DEBUG - Looking for credentials via: shared-credentials-file
2023-05-11 08:49:39,586 - MainThread - botocore.credentials - INFO - Found credentials in shared credentials file: ~/.aws/credentials
2023-05-11 08:49:39,594 - MainThread - botocore.loaders - DEBUG - Loading JSON file: C:\Program Files\Amazon\AWSCLIV2\awscli\botocore\data\endpoints.json
2023-05-11 08:49:39,603 - MainThread - botocore.hooks - DEBUG - Event choose-service-name: calling handler <function handle_service_name_alias at 0x0000024AAE2B7EC0>
2023-05-11 08:49:39,663 - MainThread - botocore.loaders - DEBUG - Loading JSON file: C:\Program Files\Amazon\AWSCLIV2\awscli\botocore\data\amplify\2017-07-25\endpoint-rule-set-1.json
2023-05-11 08:49:39,668 - MainThread - botocore.loaders - DEBUG - Loading JSON file: C:\Program Files\Amazon\AWSCLIV2\awscli\botocore\data\partitions.json
2023-05-11 08:49:39,669 - MainThread - botocore.hooks - DEBUG - Event creating-client-class.amplify: calling handler <function add_generate_presigned_url at 0x0000024AADA2C5E0>
2023-05-11 08:49:39,671 - MainThread - botocore.endpoint - DEBUG - Setting amplify timeout as (60, 60)
2023-05-11 08:49:39,672 - MainThread - botocore.regions - DEBUG - Calling endpoint provider with parameters: {'Region': 'ca-central-1', 'UseDualStack': False, 'UseFIPS': False}
2023-05-11 08:49:39,673 - MainThread - botocore.regions - DEBUG - Endpoint provider result: https://amplify.ca-central-1.amazonaws.com
2023-05-11 08:49:39,673 - MainThread - botocore.hooks - DEBUG - Event provide-client-params.amplify.StartJob: calling handler <function base64_decode_input_blobs at 0x0000024AAF16F1A0>
2023-05-11 08:49:39,673 - MainThread - botocore.hooks - DEBUG - Event before-parameter-build.amplify.StartJob: calling handler <function generate_idempotent_uuid at 0x0000024AAE2E2200>
2023-05-11 08:49:39,674 - MainThread - botocore.hooks - DEBUG - Event before-call.amplify.StartJob: calling handler <function inject_api_version_header_if_needed at 0x0000024AAE2E3CE0>
2023-05-11 08:49:39,674 - MainThread - botocore.endpoint - DEBUG - Making request for OperationModel(name=StartJob) with params: {'url_path': '/apps/d26rfy7bgd5d4z/branches/APS-58%2Fdelete_representatives_fix/jobs', 'query_string': {}, 'method': 'POST', 'headers': {'Content-Type': 'application/json', 'User-Agent': 'aws-cli/2.11.15 Python/3.11.3 Windows/10 exe/AMD64 prompt/off command/amplify.start-job'}, 'body': b'{"jobType": "RELEASE"}', 'url': 'https://amplify.ca-central-1.amazonaws.com/apps/d26rfy7bgd5d4z/branches/APS-58%2Fdelete_representatives_fix/jobs', 'context': {'client_region': 'ca-central-1', 'client_config': <botocore.config.Config object at 0x0000024AAF2924D0>, 'has_streaming_input': False, 'auth_type': None}}
2023-05-11 08:49:39,675 - MainThread - botocore.hooks - DEBUG - Event request-created.amplify.StartJob: calling handler <bound method RequestSigner.handler of <botocore.signers.RequestSigner object at 0x0000024AAF297F10>>
2023-05-11 08:49:39,675 - MainThread - botocore.hooks - DEBUG - Event choose-signer.amplify.StartJob: calling handler <function set_operation_specific_signer at 0x0000024AAE2E20C0>
2023-05-11 08:49:39,676 - MainThread - botocore.auth - DEBUG - Calculating signature using v4 auth.
2023-05-11 08:49:39,676 - MainThread - botocore.auth - DEBUG - CanonicalRequest:
POST
/apps/d26rfy7bgd5d4z/branches/APS-58%252Fdelete_representatives_fix/jobs

content-type:application/json
host:amplify.ca-central-1.amazonaws.com
x-amz-date:20230511T054939Z

content-type;host;x-amz-date
4e498dc9c5f0485f5cd0227bb7e0726acf8830853f79669dfe813aa22d266cb9
2023-05-11 08:49:39,677 - MainThread - botocore.auth - DEBUG - StringToSign:
AWS4-HMAC-SHA256
20230511T054939Z
20230511/ca-central-1/amplify/aws4_request
4221639b3003cc0d2f450341096c893d142d5ecfaad2c92a1f77a1aa0a79af9c
2023-05-11 08:49:39,678 - MainThread - botocore.auth - DEBUG - Signature:
9b6da87bed55728365e82577920c12855f2a07115b39e18ab2e7ce366ddc5aca
2023-05-11 08:49:39,678 - MainThread - botocore.endpoint - DEBUG - Sending http request: <AWSPreparedRequest stream_output=False, method=POST, url=https://amplify.ca-central-1.amazonaws.com/apps/d26rfy7bgd5d4z/branches/APS-58%2Fdelete_representatives_fix/jobs, headers={'Content-Type': b'application/json', 'User-Agent': b'aws-cli/2.11.15 Python/3.11.3 Windows/10 exe/AMD64 prompt/off command/amplify.start-job', 'X-Amz-Date': b'20230511T054939Z', 'Authorization': b'AWS4-HMAC-SHA256 Credential=AKIAYIYPWAPY36DXZTMB/20230511/ca-central-1/amplify/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature=9b6da87bed55728365e82577920c12855f2a07115b39e18ab2e7ce366ddc5aca', 'Content-Length': '22'}>
2023-05-11 08:49:39,679 - MainThread - botocore.httpsession - DEBUG - Certificate path: C:\Program Files\Amazon\AWSCLIV2\awscli\botocore\cacert.pem
2023-05-11 08:49:39,679 - MainThread - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): amplify.ca-central-1.amazonaws.com:443
2023-05-11 08:49:40,229 - MainThread - urllib3.connectionpool - DEBUG - https://amplify.ca-central-1.amazonaws.com:443 "POST /apps/d26rfy7bgd5d4z/branches/APS-58%2Fdelete_representatives_fix/jobs HTTP/1.1" 404 65
2023-05-11 08:49:40,230 - MainThread - botocore.parsers - DEBUG - Response headers: {'Content-Type': 'application/json', 'Content-Length': '65', 'Connection': 'keep-alive', 'Date': 'Thu, 11 May 2023 05:49:41 GMT', 'x-amzn-RequestId': '82335e5f-6b67-479a-94fa-dcf243312c78', 'Access-Control-Allow-Origin': '*', 'Access-Control-Allow-Headers': 'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token', 'x-amzn-ErrorType': 'NotFoundException', 'x-amz-apigw-id': 'Evk-XGJNYosF54g=', 'Access-Control-Allow-Methods': 'GET,OPTIONS,POST', 'Access-Control-Expose-Headers': 'x-amzn-RequestId,x-amzn-ErrorType', 'X-Amzn-Trace-Id': 'Root=1-645c81f5-3f7e6b5b144865eb0150f5df', 'X-Cache': 'Error from cloudfront', 'Via': '1.1 0dac912bc270f75a44f8cb4f2606fe8a.cloudfront.net (CloudFront)', 'X-Amz-Cf-Pop': 'SOF50-C1', 'X-Amz-Cf-Id': '2VI2oPp-xH6AVLI80z2lPYWQI64V6VwO4dzl5h1kL8d91xBOFY6WPw=='}
2023-05-11 08:49:40,230 - MainThread - botocore.parsers - DEBUG - Response body:
b'{"message":"Branch APS-58/delete_representatives_fix not found."}'
2023-05-11 08:49:40,232 - MainThread - botocore.parsers - DEBUG - Response headers: {'Content-Type': 'application/json', 'Content-Length': '65', 'Connection': 'keep-alive', 'Date': 'Thu, 11 May 2023 05:49:41 GMT', 'x-amzn-RequestId': '82335e5f-6b67-479a-94fa-dcf243312c78', 'Access-Control-Allow-Origin': '*', 'Access-Control-Allow-Headers': 'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token', 'x-amzn-ErrorType': 'NotFoundException', 'x-amz-apigw-id': 'Evk-XGJNYosF54g=', 'Access-Control-Allow-Methods': 'GET,OPTIONS,POST', 'Access-Control-Expose-Headers': 'x-amzn-RequestId,x-amzn-ErrorType', 'X-Amzn-Trace-Id': 'Root=1-645c81f5-3f7e6b5b144865eb0150f5df', 'X-Cache': 'Error from cloudfront', 'Via': '1.1 0dac912bc270f75a44f8cb4f2606fe8a.cloudfront.net (CloudFront)', 'X-Amz-Cf-Pop': 'SOF50-C1', 'X-Amz-Cf-Id': '2VI2oPp-xH6AVLI80z2lPYWQI64V6VwO4dzl5h1kL8d91xBOFY6WPw=='}
2023-05-11 08:49:40,232 - MainThread - botocore.parsers - DEBUG - Response body:
b'{"message":"Branch APS-58/delete_representatives_fix not found."}'
2023-05-11 08:49:40,233 - MainThread - botocore.hooks - DEBUG - Event needs-retry.amplify.StartJob: calling handler <bound method RetryHandler.needs_retry of <botocore.retries.standard.RetryHandler object at 0x0000024AB069F5D0>>
2023-05-11 08:49:40,233 - MainThread - botocore.retries.standard - DEBUG - Not retrying request. 
2023-05-11 08:49:40,233 - MainThread - botocore.hooks - DEBUG - Event after-call.amplify.StartJob: calling handler <bound method RetryQuotaChecker.release_retry_quota of <botocore.retries.standard.RetryQuotaChecker object at 0x0000024AB069EF50>>
2023-05-11 08:49:40,234 - MainThread - awscli.clidriver - DEBUG - Exception caught in main()     
Traceback (most recent call last):
  File "awscli\clidriver.py", line 460, in main
  File "awscli\clidriver.py", line 595, in __call__
  File "awscli\clidriver.py", line 798, in __call__
  File "awscli\clidriver.py", line 929, in invoke
  File "awscli\clidriver.py", line 941, in _make_client_call
  File "awscli\botocore\client.py", line 341, in _api_call
  File "awscli\botocore\client.py", line 697, in _make_api_call
botocore.errorfactory.NotFoundException: An error occurred (NotFoundException) when calling the StartJob operation: Branch APS-58/delete_representatives_fix not found.

An error occurred (NotFoundException) when calling the StartJob operation: Branch APS-58/delete_representatives_fix not found.
amberkushwaha commented 1 year ago

the shown data and the file are given on the extraction unit and file,

aBurmeseDev commented 3 months ago

Apologies for the long silence here.

Was the branch with / created using AWS CLI or via AWS Console? Neither - it was created with git. Amplify has a feature (that works fine) where it finds new branches and automatically

Looking at the logs, it appears you're using AWS CLI aws amplify start-job command and I was just able to create one successfully with the command below.

amplify-app % aws amplify start-job --app-id d1fyt0mc91jzz3 --branch-name aws/dev --job-type RELEASE
{
    "jobSummary": {
        "jobArn": "arn:aws:amplify:us-west-1:<accountID>:apps/<appID>/branches/aws/dev/jobs/0000000002",
        "jobId": "2",
        "commitId": "HEAD",
        "commitTime": "2024-07-23T19:16:42.320000",
        "status": "PENDING"
    }
}

Here's service API docs on how Amplify handles trailing slash for reference.

github-actions[bot] commented 3 months ago

Greetings! It looks like this issue hasn’t been active in longer than five days. We encourage you to check if this is still an issue in the latest release. In the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please feel free to provide a comment or upvote with a reaction on the initial post to prevent automatic closure. If the issue is already closed, please feel free to open a new one.