Forestadmin-schema.json changes all the time

Feature(s) impacted

forestadmin-schema.json

Observed behavior

Even when there is no change on the schema, the file forestadmin-schema.json changes.

For example:

  • I work on a feature that doesn’t require schema changes
  • When my PR is ready, I rebase main on my branch
  • the file forestadmin-schema.json changes, which blocks the rebase

Expected behavior

The file forestadmin-schema.json shouldn’t change when there is no database related changes, or at least I should be able to deactivate auto generation.

Failure Logs

Context

  • Project name: Hubflo
  • Environment name: Ruby on Rails
  • Agent (forest package) name & version: forest_liana (8.0.17)

Hello,
May I see an example of the changes you’re experiencing, please?
You can disable the auto-generation by following this documentation, but be careful, the schema will not be sent in case if the schema must be synchronized.
.

Here is the example :

Thank you

The only one difference is the brackets ?

Today, yes.
Most of the time, these are attributes related changes.

It’s really weird… Are you sure you’re pushing the schema at every change?
What is your workflow? :pray:
Are you using the same linter and agent version between each developer?

When I (or one of my team member) work on a feature which implies database changes, when commit & push the file to the GitHub repository.

Should we also push it to ForestAdmin ?

When agent is in production, the agent will get the schema in its source and sends automatically to forestadmin. You don’t need to do anything. In dev, the agent will generate your schema and must be committed and merged on main at each change else your changes will not be sent in production.
Your workflow looks good. Can I see your importmap please ? Can you send a diff when some attributes changes ? :pray:

Here is the importmap :

#
# Pin npm packages by running ./bin/importmap
#

pin "application", preload: true
pin "@hotwired/turbo-rails", to: "turbo.min.js", preload: true
pin "@hotwired/stimulus", to: "https://ga.jspm.io/npm:@hotwired/stimulus@3.2.1/dist/stimulus.js"
pin "@hotwired/stimulus-loading", to: "stimulus-loading.js", preload: true
pin "@rails/activestorage", to: "activestorage.esm.js"
pin "trix"
pin "@rails/actiontext", to: "actiontext.js"
pin "tom-select", to: "https://cdnjs.cloudflare.com/ajax/libs/tom-select/2.1.0/esm/tom-select.complete.min.js"
pin "mapbox-gl", to: "https://ga.jspm.io/npm:mapbox-gl@2.12.1/dist/mapbox-gl.js"

pin "stimulus-autocomplete", to: "https://cdn.jsdelivr.net/npm/stimulus-autocomplete@3.0.2/src/autocomplete.min.js"
pin "stimulus-places-autocomplete", to: "https://ga.jspm.io/npm:stimulus-places-autocomplete@0.5.0/dist/stimulus-places-autocomplete.es.js"
pin "stimulus-flatpickr", to: "https://cdn.skypack.dev/stimulus-flatpickr"
pin "shortcut-buttons-flatpickr", to: "https://ga.jspm.io/npm:shortcut-buttons-flatpickr@0.4.0/dist/shortcut-buttons-flatpickr.js"

pin_all_from "app/javascript/controllers", under: "controllers"
pin_all_from "app/javascript/locales", under: "locales"

pin "sortablejs", to: "https://ga.jspm.io/npm:sortablejs@1.15.0/modular/sortable.esm.js"
pin "@rails/request.js", to: "https://ga.jspm.io/npm:@rails/request.js@0.0.6/src/index.js"

pin "chartkick", to: "chartkick.js"
pin "Chart.bundle", to: "Chart.bundle.js"

pin "fullcalendar", to: "https://cdn.skypack.dev/fullcalendar"
pin "@fullcalendar/core", to: "https://cdn.skypack.dev/@fullcalendar/core@6.1.0"
pin "@fullcalendar/daygrid", to: "https://cdn.skypack.dev/@fullcalendar/daygrid@6.1.0"
pin "@fullcalendar/list", to: "https://cdn.skypack.dev/@fullcalendar/list@6.1.0"
pin "@fullcalendar/timegrid", to: "https://cdn.skypack.dev/@fullcalendar/timegrid@6.1.0"

# Uploadcare
pin "@uploadcare/blocks", to: "https://cdn.jsdelivr.net/npm/@uploadcare/blocks@0.32.4/web/lr-file-uploader-regular.min.js"

# Emoji-picker
pin "picmo", to: "https://ga.jspm.io/npm:picmo@5.8.5/dist/index.js"
pin "picmo-popup-picker", to: "https://ga.jspm.io/npm:@picmo/popup-picker@5.8.5/dist/index.js"
pin "stimulus-rails-autosave", to: "https://ga.jspm.io/npm:stimulus-rails-autosave@4.1.1/dist/stimulus-rails-autosave.es.js"
pin "lodash.debounce", to: "https://ga.jspm.io/npm:lodash.debounce@4.0.8/index.js"

# Paragon
pin "@useparagon/connect", to: "https://ga.jspm.io/npm:@useparagon/connect@1.0.2/dist/src/index.js"

# Sentry
pin "@sentry/browser", to: "https://ga.jspm.io/npm:@sentry/browser@7.73.0/esm/index.js"
pin "@sentry-internal/tracing", to: "https://ga.jspm.io/npm:@sentry-internal/tracing@7.73.0/esm/index.js"
pin "@sentry/core", to: "https://ga.jspm.io/npm:@sentry/core@7.73.0/esm/index.js"
pin "@sentry/replay", to: "https://ga.jspm.io/npm:@sentry/replay@7.73.0/esm/index.js"
pin "@sentry/utils", to: "https://ga.jspm.io/npm:@sentry/utils@7.73.0/esm/index.js"
pin "@sentry/utils/esm/buildPolyfills", to: "https://ga.jspm.io/npm:@sentry/utils@7.73.0/esm/buildPolyfills/index.js"

# TipTap editor
pin "tiptap", to: "https://ga.jspm.io/npm:tiptap@1.32.2/dist/tiptap.common.js"
pin "orderedmap", to: "https://ga.jspm.io/npm:orderedmap@2.1.1/dist/index.js"
pin "process", to: "https://ga.jspm.io/npm:@jspm/core@2.0.1/nodelibs/browser/process-production.js"
pin "prosemirror-commands", to: "https://ga.jspm.io/npm:prosemirror-commands@1.5.2/dist/index.js"
pin "prosemirror-dropcursor", to: "https://ga.jspm.io/npm:prosemirror-dropcursor@1.8.1/dist/index.cjs"
pin "prosemirror-gapcursor", to: "https://ga.jspm.io/npm:prosemirror-gapcursor@1.3.2/dist/index.cjs"
pin "prosemirror-inputrules", to: "https://ga.jspm.io/npm:prosemirror-inputrules@1.2.1/dist/index.cjs"
pin "prosemirror-keymap", to: "https://ga.jspm.io/npm:prosemirror-keymap@1.2.2/dist/index.js"
pin "prosemirror-model", to: "https://ga.jspm.io/npm:prosemirror-model@1.19.3/dist/index.js"
pin "prosemirror-schema-list", to: "https://ga.jspm.io/npm:prosemirror-schema-list@1.3.0/dist/index.js"
pin "prosemirror-state", to: "https://ga.jspm.io/npm:prosemirror-state@1.4.3/dist/index.js"
pin "prosemirror-transform", to: "https://ga.jspm.io/npm:prosemirror-transform@1.8.0/dist/index.js"
pin "prosemirror-view", to: "https://ga.jspm.io/npm:prosemirror-view@1.32.4/dist/index.js"
pin "tiptap-commands", to: "https://ga.jspm.io/npm:tiptap-commands@1.17.1/dist/commands.common.js"
pin "tiptap-utils", to: "https://ga.jspm.io/npm:tiptap-utils@1.13.1/dist/utils.common.js"
pin "vue", to: "https://ga.jspm.io/npm:vue@2.7.14/dist/vue.runtime.common.js"
pin "w3c-keyname", to: "https://ga.jspm.io/npm:w3c-keyname@2.2.8/index.js"
pin "@tiptap/extension-document", to: "https://ga.jspm.io/npm:@tiptap/extension-document@2.1.11/dist/index.js"
pin "@tiptap/core", to: "https://ga.jspm.io/npm:@tiptap/core@2.1.12/dist/index.js"
pin "@tiptap/pm/commands", to: "https://ga.jspm.io/npm:@tiptap/pm@2.1.12/commands/dist/index.js"
pin "@tiptap/pm/keymap", to: "https://ga.jspm.io/npm:@tiptap/pm@2.1.12/keymap/dist/index.js"
pin "@tiptap/pm/model", to: "https://ga.jspm.io/npm:@tiptap/pm@2.1.12/model/dist/index.js"
pin "@tiptap/pm/schema-list", to: "https://ga.jspm.io/npm:@tiptap/pm@2.1.12/schema-list/dist/index.js"
pin "@tiptap/pm/state", to: "https://ga.jspm.io/npm:@tiptap/pm@2.1.12/state/dist/index.js"
pin "@tiptap/pm/transform", to: "https://ga.jspm.io/npm:@tiptap/pm@2.1.12/transform/dist/index.js"
pin "@tiptap/pm/view", to: "https://ga.jspm.io/npm:@tiptap/pm@2.1.12/view/dist/index.js"
pin "@tiptap/extension-paragraph", to: "https://ga.jspm.io/npm:@tiptap/extension-paragraph@2.1.11/dist/index.js"
pin "@tiptap/extension-text", to: "https://ga.jspm.io/npm:@tiptap/extension-text@2.1.11/dist/index.js"
pin "@tiptap/extension-bold", to: "https://ga.jspm.io/npm:@tiptap/extension-bold@2.1.11/dist/index.js"
pin "@tiptap/extension-italic", to: "https://ga.jspm.io/npm:@tiptap/extension-italic@2.1.11/dist/index.js"
pin "@tiptap/extension-bullet-list", to: "https://ga.jspm.io/npm:@tiptap/extension-bullet-list@2.1.11/dist/index.js"
pin "@tiptap/extension-ordered-list", to: "https://ga.jspm.io/npm:@tiptap/extension-ordered-list@2.1.11/dist/index.js"
pin "@tiptap/extension-list-item", to: "https://ga.jspm.io/npm:@tiptap/extension-list-item@2.1.11/dist/index.js"
pin "@tiptap/extension-underline", to: "https://ga.jspm.io/npm:@tiptap/extension-underline@2.1.11/dist/index.js"
pin "@tiptap/extension-task-item", to: "https://ga.jspm.io/npm:@tiptap/extension-task-item@2.1.12/dist/index.js"
pin "@tiptap/extension-task-list", to: "https://ga.jspm.io/npm:@tiptap/extension-task-list@2.1.12/dist/index.js"
pin "@tiptap/extension-link", to: "https://ga.jspm.io/npm:@tiptap/extension-link@2.1.11/dist/index.js"
pin "linkifyjs", to: "https://ga.jspm.io/npm:linkifyjs@4.1.1/dist/linkify.es.js"
pin "@tiptap/extension-blockquote", to: "https://ga.jspm.io/npm:@tiptap/extension-blockquote@2.1.11/dist/index.js"
pin "@tiptap/extension-heading", to: "https://ga.jspm.io/npm:@tiptap/extension-heading@2.1.11/dist/index.js"
pin "@tiptap/extension-image", to: "https://ga.jspm.io/npm:@tiptap/extension-image@2.1.11/dist/index.js"
pin "@tiptap/extension-text-align", to: "https://ga.jspm.io/npm:@tiptap/extension-text-align@2.1.11/dist/index.js"
pin "@tiptap/extension-hard-break", to: "https://ga.jspm.io/npm:@tiptap/extension-hard-break@2.1.12/dist/index.js"
pin "@tiptap/extension-history", to: "https://ga.jspm.io/npm:@tiptap/extension-history@2.1.12/dist/index.js"
pin "@tiptap/pm/history", to: "https://ga.jspm.io/npm:@tiptap/pm@2.1.12/history/dist/index.js"
pin "prosemirror-history", to: "https://ga.jspm.io/npm:prosemirror-history@1.3.2/dist/index.js"
pin "rope-sequence", to: "https://ga.jspm.io/npm:rope-sequence@1.3.4/dist/index.js"

# Tiptap AI
pin "memoize-one", to: "https://ga.jspm.io/npm:memoize-one@6.0.0/dist/memoize-one.esm.js"
pin "prosemirror-async-query", to: "https://ga.jspm.io/npm:prosemirror-async-query@0.0.4/dist/prosemirror-async-query.es.js"
pin "tiny-invariant" # @1.3.1
pin "tiptap_ai"
pin "tiptap_file_handler"

# i18n for stimulus
pin "i18next", to: "https://ga.jspm.io/npm:i18next@23.6.0/dist/esm/i18next.js"

I’ll send you a diff next time we have an change on the DB schema.

Do you have a common linter between each developper?

Yes we do have a rubocop setup directly in the project, which each team member uses.

1 Like

Ok, If you have an other issue, please share me the diff to try to understand it and fix the potential bug.