Inedo Community Forums Forums
    • Recent
    • Tags
    • Popular
    • Login
    1. Home
    2. vaclav.nadrasky_0945

    Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

    If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

    V Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 2
    • Posts 3
    • Groups 0

    vaclav.nadrasky_0945

    @vaclav.nadrasky_0945

    0
    Reputation
    1
    Profile views
    3
    Posts
    0
    Followers
    0
    Following
    Joined
    Last Online

    vaclav.nadrasky_0945 Unfollow Follow

    Latest posts made by vaclav.nadrasky_0945

    • Proper use of try catch in configuration plans

      Hello.
      I'm struggling to properly send a notification in case something bad happens in a configuration job. Example of a simple configuration plan that simulates this:

      ##AH:UseTextMode
      
      try
      {
          Ensure-File C:\Temp\ensure.txt
          (
              Text: This is just a simple ensure action.
          );
      
          Start-Service missing_service
          (
              FailIfServiceDoesNotExist: true
          );
      }
      catch
      {
          Post-Http $webookUrl
          (
              ContentType: application/json, TextData: '{"text": "Failure"}'
          );
      }
      

      Message is never send. I assume it is because a configuration drift occurred in a "try" block so no other blocks are executed. I am able to resolve this issue by placing the post action inside a block with an execution policy set to always:

      ##AH:UseTextMode
      
      try
      {
          Ensure-File C:\Temp\ensure.txt
          (
              Text: This is just a simple ensure action.
          );
      
          Start-Service missing_service
          (
              FailIfServiceDoesNotExist: true
          );
      }
      catch
      {
          # CachAlwaysBlock
          with executionPolicy=always
          {   
              Post-Http $webookUrl
              (
                  ContentType: application/json, TextData: '{"text": "Message B"}'
              );
          }
      }
      

      It works. But the problem now is that when I switch plan to a visual editor and than back to the text mode again the whole "with" statement disappear. So it's very dangerous to use it.

      Maybe I got it all wrong and there is a better way how to automatically inform my team that something bad had happened. But if such a mechanism exists in Otter, I'm no aware of it.

      Is "with executionPolicy=always" a bad idea to use and there is a better way of handling failures, or is it the only way?

      posted in Support otter visual-editor try-catch configuration executionpolicy
      V
      vaclav.nadrasky_0945
    • RE: Otter Free - unauthenticated users with Admin access

      Thank you for your reply. That's great news, I'm really looking forward to the new version.

      posted in Support
      V
      vaclav.nadrasky_0945
    • Otter Free - unauthenticated users with Admin access

      Hello!
      Based on Otter licence documentation there should be the same behavior for unauthenticated users in Otter Free as is in the BuildMaster Free - i.e. "View-only" access. In BuildMaster there was a button at Users & Tasks page (/administration/security/tasks) that switched unauthenticated users from "Full-access" to "View-only" access. But there is no such button in Otter. Is there some hidden configuration option for that?

      posted in Support otter expressuser free guest view-only
      V
      vaclav.nadrasky_0945