in one of our projects in one of the steps we have a deployment script that does the following:
$apiConfig = [xml] (gc “$InstallDirectory\config.xml”)
$key = $apiConfig.configuration.appSettings.add | Where key -eq “Microsoft.ServiceBus.ConnectionString”
$key.value = $ServiceBusHost
Once deploying this project (a release that used to succeed in this environment uising octopus 2.6.4) now (octopus 3.2.19) generates the following error:
The property ‘value’ cannot be found on this object. Verify that the property
exists and can be set.
to fix/workaround what we did was replacing the 2 last lines in the code above with:
$busConnectionString = $apiConfig.configuration.appSettings.add | Where key -eq “Microsoft.ServiceBus.ConnectionString”
$busConnectionString.value = $ServiceBusHost
looks like from octopus 3.2 we can no longer use $key?
and required to change our deployment scripts that used to work before
is this a known issue?
Can this be fixed?
Thanks for reaching out. I couldn’t find a usage of the variable
$key in our code. I’m interested in what do you see on the screen if you add the following to your script:
write-output "Start: KEY variable troubleshoot"
$key #To print its value on screen
$key | get-member #to see the object type
write-output "End: KEY variable troubleshoot"
Good thing you found a workaround for this so quickly btw.
Let me know how that goes,
Thanks for getting back to me.
I tried this yesterday while troubleshooting- it is an xml element.
I’ll get to the office later and be able to provide a way to reproduce using an xml sample and a small script to run using tasks-> script console.
On our production instance (which was not yet upgraded working), and on dev ( upgraded it doesn’t)
It took us almost a day to ‘fix’ this, so quickly is subjective…
As mentioned I’ll send the additional info later today hopefully it will help in finding the issue, and resolving it as the current ‘fix’ may not apply to our production env, and we can’t upgrade that instance before it’s properly resolved.
Sent from my iPhone
Please find attached folder with the way to reproduce the problem
just need to place the Web.config sample under: C:\Program Files (x86)\test
and use the script console to run
There are also screenshots there with the output and the troubleshooting info requested
od.zip (714 KB)
The cause of this issue is that our bootstrap script we use in Calamari has a variable named
$key, we will have this fixed up in an upcoming release.
This was not something we could know would be a breaking change when it was implemented unfortunately.
We’re sorry for the inconvenience and we’ll hopefully have a fix out for it soon.
Thank you and warm regards,
Thanks for looking into it quickly and adding it to your next release.
Looking forward to upgrade.
Once we have it working I’ll close the ticket
Unfortunately I’ve upgraded my Production instance to version 3.2.24 - and the problem is reproduced!
Since your answer a few releases for OD were published so I assumed that by “we will have this fixed up in an upcoming release” - it should have been fixed already.
Even if you do fix it in the next version this is a bit late as I am not ready to upgrade to a version which is bigger than 3.2.24 - as they introduce some other breaking changes which I would like to avoid as part of upgrading from 2.6
I’m sorry for the troubles you are having, my apologies as I must’ve forgotten to send you the link to the Github issue that I created #2329 to have this issue investigated and fixed.
Again, my sincere apologies for not sending through the above issue for you to track the progress on the issue.
Thank you and best regards,