Skip to content
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

Receiving "Invalid reference token: __bundled__" in CI #2566

Closed
yjp20 opened this issue Jul 19, 2024 · 7 comments
Closed

Receiving "Invalid reference token: __bundled__" in CI #2566

yjp20 opened this issue Jul 19, 2024 · 7 comments
Labels

Comments

@yjp20
Copy link

yjp20 commented Jul 19, 2024

Context

We've been seemingly spurious errors in CI with Invalid reference token: __bundled__. This is happening here:

https://github.com/openai/openai-python/actions/runs/10010129012/job/27670617482

Current Behavior

[4:35:54 PM] › [HTTP SERVER] post /threads/string/messages ✖  error     Request terminated with error: Error: Invalid reference token: __bundled__

Expected Behavior

I wouldn't expect the prism server to have a fatal error here

Steps to Reproduce

npm exec  --package=@stoplight/prism-cli@~5.8 -- \
      prism mock https://storage.googleapis.com/stainless-sdk-openapi-specs/openai-518ca6c60061d3e8bc0971facf40d752f2aea62e3522cc168ad29a1f29cab3dd.yml
curl -L localhost:4010/threads/string/messages -X POST \
            -H 'Authorization: Bearer xxx' \
            -H 'Content-Type: application/json' \
            --data '{"content":"hello","role":"user"}'

Strangely this does not happen after cloning the repo, then running the cli through (cd packages/cli && yarn cli mock https://storage.googleapis.com/stainless-sdk-openapi-specs/openai-518ca6c60061d3e8bc0971facf40d752f2aea62e3522cc168ad29a1f29cab3dd.yml)

Environment

  • Versions: 5.8.3, 5.8.2, 5.7.0
  • OS: MacOS 13.4 (but also in CI)
@yjp20
Copy link
Author

yjp20 commented Jul 19, 2024

Removing yarn.lock and running (cd packages/cli && yarn cli mock https://storage.googleapis.com/stainless-sdk-openapi-specs/openai-518ca6c60061d3e8bc0971facf40d752f2aea62e3522cc168ad29a1f29cab3dd.yml) seems to reproduce the issue actually, so it may just be a different behavior in a dependency.

@yjp20
Copy link
Author

yjp20 commented Jul 19, 2024

After some bisecting it seems like upgrading from

@stoplight/[email protected]
to
@stoplight/[email protected]

causes a breakage, which breaks on the consumer end of the library.

@RobertCraigie
Copy link

Note that short of forking to pin the @stoplight/json dependency we aren't aware of any workarounds

@mnaumanali94
Copy link
Contributor

Should be fixed by: stoplightio/json#141

@dgellow
Copy link

dgellow commented Aug 9, 2024

@mnaumanali94 We are seeing this issue again.

https://github.com/openai/openai-go/actions/runs/10322573838/job/28578086104?pr=7

@RobertCraigie
Copy link

@mnaumanali94 this time I think it's because prism-http

@RobertCraigie
Copy link

yup it looks like pinning these deps fixes it stainless-api@335f8a8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants