Skip to content

fix: re-enable publish-indexes job with contentBoost field workaround#362

Merged
twisti-dev merged 3 commits into
masterfrom
copilot/fix-publish-indexes-job-failure
Apr 15, 2026
Merged

fix: re-enable publish-indexes job with contentBoost field workaround#362
twisti-dev merged 3 commits into
masterfrom
copilot/fix-publish-indexes-job-failure

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 15, 2026

Writerside builder 2026.04.8711 adds a "contentBoost" field to Algolia index JSON records that algolia-publisher (last updated March 2024) doesn't recognize, causing a Jackson UnrecognizedPropertyException and breaking the publish-indexes job. The job was previously disabled as a stopgap.

Changes

  • Re-enables the publish-indexes job (was fully commented out)
  • Adds a preprocessing step between "Unzip Algolia artifact" and "Update Algolia Index" that strips contentBoost from all JSON files before the publisher reads them
- name: Remove contentBoost field from index files
  run: |
    cd algolia-indexes
    shopt -s nullglob
    for f in *.json; do
      sed -i -E 's/"contentBoost":[0-9]+,//g; s/,"contentBoost":[0-9]+//g' "$f"
    done

Two sed passes cover both positions the field can appear in (mid-object with trailing comma, or last field with leading comma). shopt -s nullglob prevents a no-op iteration if the directory contains no JSON files.

Temporary workaround pending JetBrains updating algolia-publisher — tracked at WRS-7233.

Original prompt

Problem

The publish-indexes job in .github/workflows/deploy.yml fails because the Writerside builder version 2026.04.8711 generates Algolia index JSON files containing a new "contentBoost" field. The algolia-publisher:2.0.32-3 Docker image does not recognize this field, causing a com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.

Full error:

Exception in thread "main" com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: 
Unrecognized field "contentBoost" (class com.jetbrains.webhelp.publication.agent.commands.algolia.AlgoliaIndexRecord), 
not marked as ignorable (15 known properties: "root", "depth", "pageTitle", "parent", "url", "breadcrumbs", 
"headings", "metaDescription", "version", "content", "objectID", "pageViews", "product", "type", "mainTitle"])

Required Change

In .github/workflows/deploy.yml, in the publish-indexes job, add a new step between the "Unzip Algolia artifact" step and the "Update Algolia Index" step that removes the contentBoost field from all JSON files in the algolia-indexes/ directory.

The new step should be:

      - name: Remove contentBoost field from index files
        run: |
          cd algolia-indexes
          for f in *.json; do
            sed -i 's/"contentBoost":[0-9]*,//g' "$f"
          done

This is a temporary workaround until JetBrains updates the algolia-publisher Docker image to support the contentBoost field. Do NOT change the DOCKER_VERSION or any other existing configuration. Only add this one new step in the correct position.

The following is the prior conversation context from the user's chat exploration (may be truncated):

User: Beim workflow bei publish indexes kommt es zu diesem problem: wie behebe ich es?

Run if [ -z "***" ]; then

Apr 09, 2026 10:47:59 PM com.jetbrains.webhelp.publication.agent.WebPublicationAgent main
INFO: WEPA version 2.0.0
Apr 09, 2026 10:47:59 PM com.jetbrains.webhelp.publication.agent.WebPublicationAgent main
INFO: Running with args: update-index --application-name C86V8LU863 --index-name docs_cast_crafter_community_server --product CCS --version 1.21.11 --index-directory algolia-indexes/
Will update index docs_cast_crafter_community_server product CCS version 1.21.11
Exception in thread "main" com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "contentBoost" (class com.jetbrains.webhelp.publication.agent.commands.algolia.AlgoliaIndexRecord), not marked as ignorable (15 known properties: "root", "depth", "pageTitle", "parent", "url", "breadcrumbs", "headings", "metaDescription", "version", "content", "objectID", "pageViews", "product", "type", "mainTitle"])
at [Source: (File); line: 1, column: 961] (through reference chain: com.jetbrains.webhelp.publication.agent.commands.algolia.AlgoliaIndexRecord["contentBoost"])
at com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:61)
at com.fasterxml.jackson.databind.DeserializationContext.handleUnknownProperty(DeserializationContext.java:1132)
at com.fasterxml.jackson.databind.deser.std.StdDeserializer.handleUnknownProperty(StdDeserializer.java:2202)
at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownProperty(BeanDeserializerBase.java:1705)
at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownProperties(BeanDeserializerBase.java:1655)
at com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeUsingPropertyBased(BeanDeserializer.java:540)
at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.deserializeFromObjectUsingNonDefault(BeanDeserializerBase.java:1405)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:352)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:185)
at com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.readRootValue(DefaultDeserializationContext.java:323)
at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4730)
at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3542)
at com.jetbrains.webhelp.publication.agent.commands.algolia.UpdateIndex.execute(UpdateIndex.kt:42)
at kotlinx.cli.ArgParser.parse(ArgParser.kt:657)
at kotlinx.cli.ArgParser.parse(ArgParser.kt:530)
at com.jetbrains.webhelp.publication.agent.WebPublicationAgent.main(WebPublicationAgent.kt:38)

Assistant: Hier ist die Analyse und die Lösung für dein Problem:

Was ist passiert?

Die publish-indexes-Job in deinem deploy.yml Workflow schlägt fehl, weil eine Versionsinkompatiblität zwischen dem Writerside-Builder (der die Algolia-Indexdateien erzeugt) und dem Algolia-Publisher (der sie hochlädt) besteht.

Konkret:

  • Dein Writerside-Builder nutzt Version 2026.04.8711 (Zeile 14 in deploy.yml), die beim Build JSON-Indexdateien mit dem neuen Feld "contentBoost" erzeugt.
  • Dein...

This pull request was created from Copilot chat.

Copilot AI changed the title [WIP] Fix publish indexes job failure due to new contentBoost field fix: re-enable publish-indexes job with contentBoost field workaround Apr 15, 2026
Copilot AI requested a review from twisti-dev April 15, 2026 20:31
@twisti-dev twisti-dev marked this pull request as ready for review April 15, 2026 20:31
Copilot AI review requested due to automatic review settings April 15, 2026 20:31
@twisti-dev twisti-dev merged commit 3c0a4ed into master Apr 15, 2026
5 checks passed
@twisti-dev twisti-dev deleted the copilot/fix-publish-indexes-job-failure branch April 15, 2026 20:31
@github-project-automation github-project-automation Bot moved this from Backlog to Done in community-server-docs Apr 15, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Re-enables the previously disabled publish-indexes GitHub Actions job and adds a preprocessing workaround to keep Algolia publishing working with newer Writerside-generated index JSON that includes the unsupported contentBoost field.

Changes:

  • Re-enabled the publish-indexes job in the deployment workflow.
  • Added a step to strip contentBoost from generated Algolia index JSON files before running the Algolia publisher.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

needs: [ build, test, deploy ]
runs-on: ubuntu-latest
container:
image: registry.jetbrains.team/p/writerside/builder/algolia-publisher:latest
Comment on lines +123 to +127
- name: Remove contentBoost field from index files
run: |
cd algolia-indexes
shopt -s nullglob
for f in *.json; do
Comment on lines +125 to +130
cd algolia-indexes
shopt -s nullglob
for f in *.json; do
sed -i -E 's/"contentBoost":[0-9]+,//g; s/,"contentBoost":[0-9]+//g' "$f"
done

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

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants