Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
- When editing the AWS Launch Template, it uses the `created` date of the original entity. This causes the revision page to show one `created` date for all version of the launch template.
Issue fork cloud-3312708
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
baldwinlouie CreditAttribution: baldwinlouie commented@yas and @kumiko-ono
Here is the patch that fixes the revision timestamp for AWS cloud launch templates. During editing, it was not using an updated timestamp to set the `created` date.
Do keep in mind that there could be a slight difference between the `created` date on Drupal vs AWS. That is because the launch template is saved to AWS first, and then saved locally. However, all that doesn't really matter because once Cron runs and the launch templates are updated, the `created` date for the template and the revisions will reflect what is stored in AWS.
Comment #4
yas@baldwinlouie
Thank you for fixing the issue. The patch looks good.; and your explanation makes sense to me.
@kumikoono
What do you think?
Thanks
Comment #5
kumikoono CreditAttribution: kumikoono at DOCOMO Innovations, Inc. commentedWhy don't you update the timestamp immediately after creating the launch template at C.O.?
How about the other resources?
Comment #6
baldwinlouie CreditAttribution: baldwinlouie commented@kumikoono Thanks for the suggestion. I updated the patch so it takes the `created` timestamp and updates the local Drupal Launch Template entity.
For the other resources, the timestamp is not shown or used (For example, Snapshots do not have a created timestamp). The local entity is saved with the Drupal timestamp, and then the AWS resource is saved.
In the case of AWS Launch Templates, we use revisions, so the create date is surfaced and shown.
Comment #7
baldwinlouie CreditAttribution: baldwinlouie commented@yas fixing unit tests.
Comment #8
kumikoono CreditAttribution: kumikoono at DOCOMO Innovations, Inc. commented@baldwin Thanks for your update and explanation.
Regarding AWS resources, key pairs and volumes have the created timestamps. They looks correctly set.
Comment #9
baldwinlouie CreditAttribution: baldwinlouie commented@yas and @kumikoono, please review the patch again. I've updated it to use the timestamp coming from the API results.
Comment #10
kumikoono CreditAttribution: kumikoono at DOCOMO Innovations, Inc. commented@baldwin Thanks for providing this patch. This looks good to me.
Comment #11
yas@kumikoono
Thank you for your review.
@baldwinlouie
Thank you for the update. I'll merge the patch to
4.x
and5.x
, and close this issue as Fixed.Comment #14
yas