Skip to content

BUG: version 10.0.0 reintroduces agentOptions, but does not pass it down correctly #824

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
phal0r opened this issue Mar 10, 2025 · 1 comment
Labels
Bug A code defect that needs to be fixed.

Comments

@phal0r
Copy link

phal0r commented Mar 10, 2025

In createHost additional agentOptions can be passed to configure undici (

function createHost(arangojsHostUrl: string, agentOptions?: any): Host {
). Unfortunately in all calls, the agentOptions are not passed down to this function, so there is no way to actually configure undici.

References, where createHost is called:

As you can easily spot in the functions, that call createHost, they already lack the additional parameters. Took some time to get down to this as I want to allow self signed certs and couldn't figure out why it fails, although I passed the params in every possible way and combination.

@phal0r phal0r changed the title BUG: version 10.0.0 reintroduces agentOptions, but does not pass it through BUG: version 10.0.0 reintroduces agentOptions, but does not pass it down correctly Mar 10, 2025
@pluma
Copy link
Contributor

pluma commented Mar 25, 2025

Oops! Quite the oversight, sorry about that. I guess I accidentally dropped that during refactoring.

The Connection class should store the config.agentOptions in a protected property _agentOptions and use that when calling createHost:

constructor(config: Omit<configuration.ConfigOptions, "databaseName"> = {}) {

Seems significant enough that we'd want to ship a bugfix for this.

I'm no longer going to be with ArangoDB next month so @cmyk47 or @shd8 might want to take a look at this.

@ghost ghost added the Bug A code defect that needs to be fixed. label Mar 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A code defect that needs to be fixed.
Projects
None yet
Development

No branches or pull requests

2 participants