across multiple layers
Fixes timeout configuration conflicts where HTTP
requests would timeout prematurely despite
configured values in `@timeout` annotations or
`-timeout` flags.
RCA:
* `retryablehttp` pkg overriding with default
30s timeout.
* Custom timeouts not propagating to
`retryablehttp` layer.
* Multiple timeout layers not sync properly.
Changes:
* Propagate custom timeouts from `@timeout`
annotations to `retryablehttp` layer.
* Adjust 5-minute maximum cap to prevent DoS via
extremely large timeouts.
* Ensure `retryableHttpOptions.Timeout` respects
`ResponseHeaderTimeout`.
* Add comprehensive tests for timeout capping
behavior.
This allows templates to override global timeout
via `@timeout` annotations while preventing abuse
thru unreasonably large timeout values.
Fixes#6560.
Signed-off-by: Dwi Siswanto <git@dw1.io>
Fixes duplicate template storage & removes
unnecessary raw bytes caching.
Mem usage reduced by ~30%.
> 423MB => 299MB heap alloc.
* Use `StoreWithoutRaw()` to avoid storing raw
bytes.
* Remove duplicate storage in both caches.
* Remove ineffective raw bytes retrieval logic.
Benchmarks show 45% perf improvement with no
regressions.
Signed-off-by: Dwi Siswanto <git@dw1.io>
by:
* implement regex-based prompt matching for
password variants.
* add support for filling username prompts in
keyboard interactive challenges.
* improve debug logging with structured output.
this addresses issues with servers using
non-standard prompt formats and provides better
visibility into auth failures.
Signed-off-by: Dwi Siswanto <git@dw1.io>
* feat: Assume HTTP(S) server on high port is HTTP
* feat: enhance http probing tests
* improving issue description
---------
Co-authored-by: Matej Smycka <smycka@ics.muni.cz>
Co-authored-by: Mzack9999 <mzack9999@protonmail.com>
* perf(loader): reuse cached parsed templates
in `(*Store).areWorkflowOrTemplatesValid`, which
is being called during template `-validate`-ion.
Signed-off-by: Dwi Siswanto <git@dw1.io>
* refactor(testutils): optionally assign template info
in `NewMockExecuterOptions`, which is not
required for specific case, like when we want to
`(*Store).ValidateTemplates`.
Signed-off-by: Dwi Siswanto <git@dw1.io>
* test(loader): adds `(*Store).ValidateTemplates` bench
Signed-off-by: Dwi Siswanto <git@dw1.io>
* refactor(templates): adds fast read parser
Signed-off-by: Dwi Siswanto <git@dw1.io>
* test(templates): adds `Parser*` benchs
Signed-off-by: Dwi Siswanto <git@dw1.io>
* chore(templates): satisfy lints
Signed-off-by: Dwi Siswanto <git@dw1.io>
* revert(templates): rm fast read parser
Signed-off-by: Dwi Siswanto <git@dw1.io>
---------
Signed-off-by: Dwi Siswanto <git@dw1.io>
* normalize file `fpath` in `IsTemplate` using
filepath.FromSlash to ensure consistent matching
across platforms.
* update `GetKnownMiscDirectories` docs to clarify
that trailing slashes prevent false positives,
since `IsTemplate` compares against normalized
full paths.
Signed-off-by: Dwi Siswanto <git@dw1.io>
* jira: hotfix for Cloud to use /rest/api/3/search/jql in FindExistingIssue; add live test verifying v3 endpoint
* jira: fix Cloud v3 search response handling (no total); set Self from base
* fix lint error
* tests(jira): apply De Morgan to satisfy staticcheck QF1001