Uploaded image for project: 'TinkerPop'
  1. TinkerPop
  2. TINKERPOP-2918

Utils.GenerateUserAgent assumes Gremlin.Net.dll to be present when, in some environments, it is not.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 3.6.2, 3.5.5
    • 3.7.0, 3.6.3, 3.5.6
    • dotnet
    • None

    Description

      The dotnet driver in v3.6.2 adds the ability to add a user agent to the request.

      To get the user agent name,  Gremlin.Net.Process.Utils.GenerateUserAgent uses AssemblyName.GetAssemblyName("Gremlin.Net.dll") (see here)

      Because the dll is referenced in a relative manner, in some environments (Visual studio debugging and Docker deployment for me), this results in a FileNotFoundException. In my specific local case, the path prefixed is the path where the csproj is.

      However, it works in a different project (also VS locally). I have no idea yet why. Also, I would file a pull request that would just use GetExecutingAssembly() instead of AssemblyName.GetAssemblyName (because the executing code is in that specific dll), but there's probably a reason for it not being used. Then again, using GetExecutingAssembly for the application name seems odd, was that supposed to be GetEntryAssembly?

      Will happily provide more insight and code.

      cc: Florian Hockmann

      Edit: Proposed change in https://github.com/apache/tinkerpop/pull/2005

      Attachments

        Activity

          People

            Unassigned Unassigned
            daniel.weber Daniel C. Weber
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: