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

Chore: Log a warning in the console when the Editor/docs component is given latest #958

Closed
stuartc opened this issue Jul 25, 2023 · 3 comments · Fixed by #1032
Closed

Chore: Log a warning in the console when the Editor/docs component is given latest #958

stuartc opened this issue Jul 25, 2023 · 3 comments · Fixed by #1032
Assignees
Labels
needs detail More detail is needed before development can start

Comments

@stuartc
Copy link
Member

stuartc commented Jul 25, 2023

Log a warning to the console when Editor/docs are given @latest

We currently resolve the version before it's sent to the component, however for future debugging it is useful to know that we're sending a version that jsDelivr can't provide.

What are we logging?:

  • assets/js/job-editor/mount.tsx

The message should be:

"job-editor hook received an adaptor with @latest as it's version - to load docs a specific version must be provided"

Technical Notes

By removing the call to resolve the adaptor version, and setting the jobs' adaptor to use @latest the editor will call out to jsDelivr and you will be able to see a bunch of 404s in the network inspect.

  def update(%{form: form} = assigns, socket) do
    socket =
      socket
      |> assign(
        adaptor:
          form
          |> input_value(:adaptor)
          |> Lightning.AdaptorRegistry.resolve_adaptor(),   # <=== here
        source: form |> input_value(:body),
        credential: form |> input_value(:credential),
@stuartc
Copy link
Member Author

stuartc commented Jul 26, 2023

@taylordowns2000 I don't think so, that looks like something else a little more problematic.

@NickOpenFn NickOpenFn added the needs detail More detail is needed before development can start label Aug 3, 2023
@NickOpenFn NickOpenFn changed the title Log a warning in the console when the Editor/docs component is given latest Chore: Log a warning in the console when the Editor/docs component is given latest Aug 10, 2023
@NickOpenFn
Copy link

Hey team! Please add your planning poker estimate with Zenhub @elias-ba @stuartc @zacck

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs detail More detail is needed before development can start
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants