Closed SHxKM closed 2 years ago
Even expanding the dependencies for MyTypePublicTypeVersion
and changing the zip
handler once again, results in the same outcome: The update operation is successful, no new version is actually published.
MyTypePublicTypeVersion:
Type: AWS::CloudFormation::PublicTypeVersion
DependsOn:
- CustomTypePublisher
- MyTypePrivateTypeVersion
- MyTypeResourceDefaultVersion
Properties:
LogDeliveryBucket: my-s3-logs-bucket
PublicVersionNumber: !Ref VersionToPublish
Type: RESOURCE
TypeName: MyCompany::MyCategory::MyType
If I try to bump to 1.0.2
as a sort of a brute-force method, I get an error that patch versions must be incremented by 1
, which means it has to be 1.0.1
.
The only "solution" seems to be deleting the stack instance(s), and recreating it after the public type has already been registered (it won't get deleted when the stack instance is deleted). But this is:
There should be a way to detect version differences, or AWS::CloudFormation::PublicTypeVersion
should fail if upon a first time publish, the version specified is >1.0.0
.
@SHxKM we are investigating the issue, and will get back with the findings
@SHxKM so PublicVersionNumber was passed in the template even for first time publishing of the resource, this caused the issue, we will update the docs to reflect when we should pass the PublicVersionNumber also we will made a change to throw validation error to handle this scenario so that stack won't be created. Keeping the issue open until fix is pushed.
so PublicVersionNumber was passed in the template even for first time publishing of the resource
Yes, more precisely a version number > 1.0.0
.
also we will made a change to throw validation error to handle this scenario so that stack won't be created. Keeping the issue open until fix is pushed.
Thank you
Hi @SHxKM Fix is now deployed. You should see a validation error now if you are publishing for first time and try to create a stack with PublicVersionNumber . Closing this issue now.
Following up on the thread where I reported an issue (#129) which actually turned out to be an issue on the CFN side, I used a workaround suggested there by @ugudip for publishing a public type:
So I've used this template to register the custom resource in almost all regions:
The registration of version 1.0.0 was successful.
However, when I tried to update the version to
1.0.1
, even though the operation was "successful", the version isn't really bumped.UPDATE_COMPLETE
CURRENT
Parameters
part of the stack instance, the version is1.0.1
Despite all this, almost 40 minutes after the "successful" publishing, the version showing in the public registry is still
1.0.0
. It seems that there is no real sync whatsoever.There is one detail that may be affecting this process. When I registered the types initially, I used:
The StackSet parameters were:
Notice the
1.0.1
as the parameter value. What this did: it published the public types successfully, but as version1.0.0
- this is documented inPublicTypeVersion
:Any attempts to then update the template failed, or reported "No updates are to be performed" (because the template showed
1.0.1
, even though the actual underlying resource version was still1.0.0
, so we were stuck. As a workaround, I've uploaded an identical.zip
tomy-handler.zip
, and updated the stack-set changing only the handler URL to the new (yet identical zip):This operation was successful, but as I detailed above, it does not seem to actually publish the new version. What is the proper way to "force" all stack instances to update, given the same parameters?