getmoto / moto

A library that allows you to easily mock out tests based on AWS infrastructure.

Home Page:http://docs.getmoto.org/en/latest/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Data Brew Recipe Publish does not update Create Date on Latest Working Copy

runstache opened this issue · comments

When a recipe is published in Data Brew, the Create Date of the Latest Working Version appears to be set to the most recent Publish Date based on results observed in Boto3 1.34.x executions in AWS Data Brew.

Line 480

Should be able to correct this by adding the following in FakeRecipe Class:

    def publish(self, description: Optional[str] = None) -> None:
        self.latest_published = self.latest_working
        self.latest_working = deepcopy(self.latest_working)
        self.latest_published.publish(description)
        del self.versions[self.latest_working.version]
        self.versions[self.latest_published.version] = self.latest_published
        self.latest_working.version = self.latest_published.version + 0.1
        # Update the Latest working Creation Date to the previous Publish Time
        self.latest_working.created_time = self.latest_published.published_date
        self.versions[self.latest_working.version] = self.latest_working