Skip to content
This repository was archived by the owner on Mar 10, 2023. It is now read-only.

Don't error if ECR Repository exists already #612

Merged
merged 1 commit into from
Apr 22, 2020

Conversation

Waterdrips
Copy link
Contributor

Description

We were returning an error if the ECR repo already exists. This shouldnt
give an error because it's not a failure. If the repo doesn't exist then
we create it, if it exists then that's fine.

Fixes #539

Signed-off-by: Alistair Hey [email protected]

How Has This Been Tested?

Tested by deploying an ECR backed OFC installation, first time round it
creates the new repo, then after that it's not throwing an error, only
saying it already exists.

After - when trying to create repo that exists

2020/03/07 19:32:17 Attempting to create repo: waterdrips-openfaas-cloud-functions-roll
Repo Exists: waterdrips-openfaas-cloud-functions-roll

How are existing users impacted? What migration steps/scripts do we need?

New deployment of register-image required. This fixes some output not to return an error.

Checklist:

I have:

  • updated the documentation and/or roadmap (if required)
  • read the CONTRIBUTION guide
  • signed-off my commits with git commit -s
  • added unit tests

We were returning an error if the ECR repo already exists. This shouldnt
give an error because it's not a failure. If the repo doesn't exist then
we create it, if it exists then that's fine.

Tested by deploying an ECR backed OFC installation, first time round it
creates the new repo, then after that it's not throwing an error, only
saying it already exists.

Signed-off-by: Alistair Hey <[email protected]>
@Waterdrips Waterdrips mentioned this pull request Apr 18, 2020
5 tasks
@alexellis alexellis merged commit 27eb84d into openfaas:master Apr 22, 2020
@alexellis
Copy link
Member

Thanks for the fix.

@Waterdrips Waterdrips deleted the ecr-reate-repo-no-error branch July 16, 2020 06:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

False error from register-image when image is present on ECR already
2 participants