hydra icon indicating copy to clipboard operation
hydra copied to clipboard

Invalid snapshot filename breaks importing the Hydra packages

Open sneko opened this issue 3 years ago • 7 comments

Preflight checklist

Describe the bug

Hi,

I'm interested in the latest release (v1.11.9) to use RefreshTokenHook structs but it seems I cannot download it due to this error:

        github.com/ory/hydra/oauth2: create zip: oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=jwt-case=2-description=should_pass_because_prompt=none_and_max_age_<_auth_time-should_call_refresh_token_hook_if_configured.json: malformed file path "oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=jwt-case=2-description=should_pass_because_prompt=none_and_max_age_<_auth_time-should_call_refresh_token_hook_if_configured.json": invalid char '<'
oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=opaque-case=2-description=should_pass_because_prompt=none_and_max_age_<_auth_time-should_call_refresh_token_hook_if_configured.json: malformed file path "oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=opaque-case=2-description=should_pass_because_prompt=none_and_max_age_<_auth_time-should_call_refresh_token_hook_if_configured.json": invalid char '<'
make: *** [deps] Error 1

Indeed, you have 1 snapshot file having in its name <... making the process broken: https://github.com/ory/hydra/blob/master/oauth2/.snapshots/TestAuthCodeWithMockStrategy-strategy=jwt-case=2-description=should_pass_because_prompt=none_and_max_age_%3C_auth_time-should_call_refresh_token_hook_if_configured.json

Thank you,

cc @grantzvolsky @aeneasr

Reproducing the bug

Use an Hydra package in a Go project and go mod tidy

Relevant log output

No response

Relevant configuration

No response

Version

v1.11.7

On which operating system are you observing this issue?

macOS

In which environment are you deploying?

Other

Additional Context

No response

sneko avatar Aug 02 '22 14:08 sneko

This should be resolved on v2.x already :)

aeneasr avatar Aug 02 '22 14:08 aeneasr

@aeneasr but what if I want to stick to v1.x? Do you plan to release a v1.11.10 with corrected name?

sneko avatar Aug 02 '22 14:08 sneko

There are no more releases planned for the v1 branch, the next release will be v2.0-beta.1 :)

aeneasr avatar Aug 02 '22 14:08 aeneasr

Oh ok, that's sad because yesterday you released the v1.11.9 with new modifications on structs for the RefreshTokenHook but if it can't be imported at the end :( (I need them to decode webhook and encode response)

I can still try to copy/paste the structs tree for the ones needed, or fork without snapshots...

sneko avatar Aug 02 '22 14:08 sneko

We can also cherry-pick https://github.com/ory/hydra/pull/2796/commits/e437e3ed60e49e245119ea43345403f8775122ad to master but we won't release it as the change is non-functional and importing this package is an edge case :)

aeneasr avatar Aug 02 '22 14:08 aeneasr

You can probably also work around it by not using a go module proxy so basically GOPROXY=direct

aeneasr avatar Aug 02 '22 14:08 aeneasr

I think cherry-picking would do the trick!

Thank you,

sneko avatar Aug 02 '22 15:08 sneko