OctopusDeploy / Library

| Public | A repository of step templates and other community-contributed extensions to Octopus Deploy
Other
171 stars 503 forks source link

Updating oracle create user template #1567

Closed twerthi closed 1 month ago

twerthi commented 1 month ago

Background

This template uses the SimplySql PowerShell module. This module had some changes where it implemented named connections to databases. Without specifying the name, it would use default. In the event of an error, the finally statement attempted to close the connection. If a failure occurred before a connection was made, the finally would also fail and mask the original error.

Results

Implemented named connections and updated the finally to include a test to see if the connection was open before attempting to close it. Failures are no longer masked if they were caused by the connection attempt itself.

Before

If a failure occurred during the connection attempt, the finally would attempt to close a connection that didn't exist and mask the original error.

After

A test-connection was added to finally to see if the connection is open before attempting to close it. Connection attempt errors are no longer masked.

Pre-requisites

Fixes # . If there is an open issue that this PR fixes add it here, otherwise just remove this line

github-actions[bot] commented 1 month ago

Start Hyponome locally

docker pull ghcr.io/hnrkndrssn/hyponome:main
docker run --rm -p 8000:8080 -it ghcr.io/hnrkndrssn/hyponome:main

Review in Hyponome