Skip to content

Integrating Nuclia Widget - #792

Draft
justdaksh wants to merge 102 commits into
nucliafrom
nuclia_widget
Draft

Integrating Nuclia Widget#792
justdaksh wants to merge 102 commits into
nucliafrom
nuclia_widget

Conversation

@justdaksh

@justdaksh justdaksh commented Sep 3, 2023

Copy link
Copy Markdown

CC: @stevepiercy
Here is a draft for Nuclia widget integration into training.

Some of the issues to be solved:

  • Null and Undefined results
  • Loading of widget w.r.t page and Breadcrumbs w.r.t results in Offset.

Pull request preview URL:

https://plone-training--792.org.readthedocs.build/

Comment thread docs/_static/searchtester.js Outdated
Comment thread upload.py
Comment thread docs/_static/searchtester.js
@stevepiercy

Copy link
Copy Markdown
Member

Here's that git command from Volto that builds only when docs change:

https://github.com/plone/volto/blob/master/netlify.toml#L5

@stevepiercy

Copy link
Copy Markdown
Member

@ebrehault

Copy link
Copy Markdown
Member

@stevepiercy my guess would be the DEPLOY_NUCLIA_URL is not set.

@ebrehault

Copy link
Copy Markdown
Member

@stevepiercy yes that was missing.
I have added the DEPLOY_NUCLIA_URL and DEPLOY_NUCLIA_TOKEN variables in this repo, it should work now.

@stevepiercy

Copy link
Copy Markdown
Member

Thanks @ebrehault. I was looking for them in https://github.com/plone/training/settings/variables/actions, and DEPLOY_NUCLIA_URL just showed up, but not DEPLOY_NUCLIA_TOKEN.

@stevepiercy

Copy link
Copy Markdown
Member

Oops, there it is! nm.

@stevepiercy

Copy link
Copy Markdown
Member

@ebrehault the CI still fails. It looks like the action is not picking up the value for DEPLOY_NUCLIA_URL.

https://github.com/plone/training/actions/runs/11968576684/job/33370147780#step:5:11

@stevepiercy

Copy link
Copy Markdown
Member

Ah, I see, it's a repo var, not a secret.

@ebrehault

Copy link
Copy Markdown
Member

Still failing, but now it is looking more like a Nuclia SDK version thing, let me check.

@stevepiercy

Copy link
Copy Markdown
Member

I have no clue what this failure message means.

Run CHANGED_FILES=$(git diff --name-only c0e95e9ffc38cf3450ec7a39caedaa68f7c8ecd7 b89c046e8bd1c5df4345297bc8ed35708bbc7c9b)
  CHANGED_FILES=$(git diff --name-only c0e95e9ffc38cf3450ec7a39caedaa68f7c8ecd7 b89c046e8bd1c5df4345297bc8ed35708bbc7c9b)
  echo "Changed files: $CHANGED_FILES"
  if echo "$CHANGED_FILES" | grep -q 'nuclia_sync.json'; then
    echo "::set-output name=changed::true"
  else
    echo "::set-output name=changed::false"
  fi
  shell: /usr/bin/bash -e {0}
  env:
    pythonLocation: /opt/hostedtoolcache/Python/3.10.15/x64
    PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.10.15/x64/lib/pkgconfig
    Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.10.15/x64
    Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.10.15/x64
    Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.10.15/x64
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.10.15/x64/lib
fatal: bad object c0e95e9ffc38cf3450ec7a39caedaa68f7c8ecd7
Error: Process completed with exit code 128.

Where do we get the git hash?

See: https://stackoverflow.com/a/11834472/2214933

@stevepiercy

Copy link
Copy Markdown
Member

Answering my own question.

          CHANGED_FILES=$(git diff --name-only ${{ github.event.before }} ${{ github.sha }})

Next question, are these the correct values to use? It rejected github.event.before.

@stevepiercy

Copy link
Copy Markdown
Member

@justdaksh where did you get github.event.before? I can't find it anywhere in the GitHub docs for events.

@justdaksh

Copy link
Copy Markdown
Author

I read about it from StackOverflow at that time, but I can't find the reference to it right now.

@stevepiercy

Copy link
Copy Markdown
Member

@stevepiercy

Copy link
Copy Markdown
Member

From a comment in that SO post, I found this:

https://github.com/actions/checkout?tab=readme-ov-file#checkout-v4:

Only a single commit is fetched by default, for the ref/SHA that triggered the workflow. Set fetch-depth: 0 to fetch all history for all branches and tags. Refer here to learn which commit $GITHUB_SHA points to for different events.

Commit incoming. We'll see.

- Set fetch-depth: 0 to fetch all history for all branches and tags
@stevepiercy

Copy link
Copy Markdown
Member

That seems to have done the trick.

@ksuess

ksuess commented Mar 16, 2025

Copy link
Copy Markdown
Member

This looks promising and is well advanced. When can we get it finished and installed?

I played with the search.
Here is the search for "register panel". It gives some overview and lists the chapter I expect in first place of the search results. That's fine.
https://plone-training--792.org.readthedocs.build/search.html?q=register+panel

Feedback

  • Breadcrumbs with category (backend, frontend,…) would be helpful
  • Remove myst formatting stuff from search results

@stevepiercy

Copy link
Copy Markdown
Member

When can we get it finished and installed?

It's one of my highest priorities for Plone docs, but I have three Plone projects ahead of this item. The release of Plone Sphinx Theme 2.0.0 is one of them and is a partial blocker to this issue, since it will remove Sphinx Book Theme from the dependency stack. That said, I don't think the removal of Sphinx Book Theme will have a significant impact, except possibly some CSS rules.

I'll be busy through the end of March. I'd welcome any help to see this through.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

8 participants