Creating artifacts always seems to fail

#3 · closed · 1 comments

View on GitHub ↗

ryansb

Now that I implemented polling for results of artifact creation, it seems like the artifacts are failing in a way that's not visible in the console, or anywhere else except the DescribeProvisioningArtifact API. These are some logs from a failed run: ``` {"event": "cli.invoke", "executable": "/home/ryansb/code/crop/bin/crop", "options": {"--config": "./crop.yml", "--debug": true, "--description": "Deployed by CROP", "--version": "3", "product": false, "update-product": true}, "time {"config": {"catalog": {"bucket": "crop-catalog-assets", "id": "port-krtlscjnpol2a"}, "product": {"id": "prod-7qedu6ehkucdi"}, "project_path": "./sample-project/"}, "config_path": "./crop.yml", "event": "config.parsed", "timestamp" {"assets": {"crop-sample.zip": "prod-7qedu6ehkucdi/assets/crop-sample.zip"}, "event": "munge.asset_map", "timestamp": "2017-02-06T20:09:30.790142"} {"bucket": "crop-catalog-assets", "event": "file.upload.start", "key": "prod-7qedu6ehkucdi/assets/crop-sample.zip", "path": "./sample-project/.serverless/crop-sample.zip", "timestamp": "2017-02-06T20:09:30.831613"} {"bucket": "crop-catalog-assets", "event": "file.upload.success", "key": "prod-7qedu6ehkucdi/assets/crop-sample.zip", "name": "crop-sample.zip", "timestamp": "2017-02-06T20:09:31.097424", "version": "lt_MqtjRDgRxTdYqpOIbssb4o8P6q5M {"bucket": "crop-catalog-assets", "event": "assets.upload.success", "map": {"crop-sample.zip": ["prod-7qedu6ehkucdi/assets/crop-sample.zip", "lt_MqtjRDgRxTdYqpOIbssb4o8P6q5M2"]}, "timestamp": "2017-02-06T20:09:31.097592"} {"event": "template.parse", "timestamp": "2017-02-06T20:09:31.098908"} {"event": "resource.munge", "logical_resource": "HelloLambdaFunction", "resource": {"DependsOn": ["IamPolicyLambdaExecution", "IamRoleLambdaExecution"], "Properties": {"Code": {"S3Bucket": "crop-catalog-assets", "S3Key": "prod-7qed {"event": "template.rewritten", "template": {"AWSTemplateFormatVersion": "2010-09-09", "Description": "The AWS CloudFormation template for this Serverless application", "Outputs": {"ServiceEndpoint": {"Description": "URL of the ser {"bucket": "crop-catalog-assets", "event": "template.upload.start", "key": "prod-7qedu6ehkucdi/assets/template.json", "timestamp": "2017-02-06T20:09:31.136590"} {"bucket": "crop-catalog-assets", "event": "template.upload.success", "key": "prod-7qedu6ehkucdi/assets/template.json", "timestamp": "2017-02-06T20:09:31.296084", "version": "1xHAqL6AD4EnpRigyWIUc64Og6OwfrDh"} {"event": "provisioning_artifact.create.start", "object_url": "https://s3.amazonaws.com/crop-catalog-assets/prod-7qedu6ehkucdi/assets/template.json?versionId=1xHAqL6AD4EnpRigyWIUc64Og6OwfrDh", "product": "prod-7qedu6ehkucdi", "time {"artifact": {"Info": {"TemplateUrl": "https://s3.amazonaws.com/crop-catalog-assets/prod-7qedu6ehkucdi/assets/template.json?versionId=1xHAqL6AD4EnpRigyWIUc64Og6OwfrDh"}, "ProvisioningArtifactDetail": {"CreatedTime": "datetime.datet {"artifact_id": "pa-y5mcf5qh4defm", "event": "provisioning_artifact.poll", "timestamp": "2017-02-06T20:09:35.625967"} {"artifact_id": "pa-y5mcf5qh4defm", "event": "provisioning_artifact.failed", "message": "Failed to create artifact", "product_id": "prod-7qedu6ehkucdi", "result": {"Info": {"TemplateUrl": "https://s3.amazonaws.com/crop-catalog-asse Traceback (most recent call last): File "/home/ryansb/.pyenv/versions/crop3/bin/crop", line 6, in <module> exec(compile(open(__file__).read(), __file__, 'exec')) File "/home/ryansb/code/crop/bin/crop", line 47, in <module> print(json.dumps(crop.commands.update_product(config, arguments))) File "/home/ryansb/code/crop/crop/commands.py", line 51, in update_product description=arguments['--description'] File "/home/ryansb/code/crop/crop/utils.py", line 72, in update_product_artifact raise Exception('Failed to create artifact {}, see logs for additional info'.format(artifact_id)) Exception: Failed to create artifact pa-y5mcf5qh4defm, see logs for additional info ```

Comments

ryansb

Fixed in https://github.com/ryansb/crop/commit/0f1e24f87e585e6e1b84de0b131e485af530f5d5 by not using versioned CloudFormation template URL.