External Connections could not be updated in the UpdateHandler because it was calling updateRepository with an empty list passed into upstreams, which attempted to remove upstreams with an external connection. This would through an exception. Fix: Only call updateHandler with the empty list upstream parameter if there is actually an upstream to remove, otherwise don't even try
External Connections could not be replaced with upstreams or vice versa. Fix: change ordering of operation depending on what we are trying to do
Testing *
Ran cfn submit --region us-west-2 --set-default
create repo, added external connection (this was failing before due to a empty call to updateRepository)
Created repo, added upstream, then updated with template with external connection
Created repo, added external connection, then updated with template with upstream
Created repo, added upstream, then removed upstream
Created repo, added external connection, then removed external connection
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Description of changes: 2 bugs to fix:
External Connections could not be updated in the UpdateHandler because it was calling updateRepository with an empty list passed into
upstreams
, which attempted to remove upstreams with an external connection. This would through an exception. Fix: Only call updateHandler with the empty list upstream parameter if there is actually an upstream to remove, otherwise don't even tryExternal Connections could not be replaced with upstreams or vice versa. Fix: change ordering of operation depending on what we are trying to do
Testing *
Ran
cfn submit --region us-west-2 --set-default
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.