Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Container Handlers: Force redeploy if the container is updated #121

Closed
ianrothmann opened this issue May 9, 2023 · 2 comments
Closed

Container Handlers: Force redeploy if the container is updated #121

ianrothmann opened this issue May 9, 2023 · 2 comments

Comments

@ianrothmann
Copy link

Hi there,

Thanks for the wonderful package. It really saves lives 😎

I have a use case where I use a container and so in my handler function, I return Package::CONTAINER_HANDLER;

The page contains the ImageUrl with tag :latest.

It happens that the container code gets updated, but sidecar refuses to redeploy because of the below code in LambdaHandler.php (line 143 - I commented this line). This is because the ImageUri is still exactly the same, but the container has been updated.

Screenshot 2023-05-09 at 17 28 13

Would it be possible that we can add a flag to the command to force a redeploy?

Kind regards,

Ian

@aarondfrancis
Copy link
Owner

aarondfrancis commented May 9, 2023

Thanks for opening an issue! Is this the same as this issue: #67?

If so, can you think of a generalized solution that would work? I don't deploy containers so I'll admit I'm not fully up to speed on their workings, but I would like to fix this.

@ianrothmann
Copy link
Author

Indeed it does work. I did:

public function package()
    {
        return [
            'ImageUri' => '...:latest',
            '__handler__' => rand(1,10000), //Ensuring that the package updates
        ];
    }

Thanks for your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants