.[SOLVED] Squidex CLI sync rules

I have…

I’m submitting a…

  • [ ] Regression (a behavior that stopped working in a new release)
  • [x] Bug report
  • [ ] Performance issue
  • [ ] Documentation issue or request

Current behavior

We are using version 8.19.0 of the Squidex CLI.

We are running the command:

sq sync out packages/squidex/schema/gp2 -t rules

Which produces the following JSON:

{
  "$schema": "./../__json/rule.json",
  "isEnabled": true,
  "name": "Entity updated",
  "trigger": {
    "triggerType": "ContentChanged",
    "schemas": [
      {
        "schemaId": "users",
        "condition": "event.type === 'Created' || event.type === 'Published' || event.type === 'Unpublished' || event.type === 'Updated' || event.type === 'Deleted'"
      }
    ],
    "handleAll": false
  },
  "action": {
    "url": "https://api-dev.gp2.asap.science/webhook/squidex",
    "method": "POST",
    "sharedSecret": "a-very-secret-secret",
    "actionType": "Webhook"
  }
}

Expected behavior

As part of the CI we would like to re-sync this with another Squidex using:

sq sync in packages/squidex/schema/gp2 -t rules

We get:

Rule 'Entity updated' creating...       failed: Squidex.ClientLibrary.SquidexException: Squidex Request failed: {"message":"Validation error","traceId":"00-9e6ebf92da710eafe2943636bb27ec3c-b847ba1311343a0a-01","type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","details":["action: Action is required."],"statusCode":400}
   at Squidex.ClientLibrary.Utils.SquidexClientBase.EnsureResponseIsValidAsync(HttpResponseMessage response)
   at Squidex.ClientLibrary.Utils.SquidexClientBase.RequestJsonAsync[T](HttpMethod method, String path, HttpContent content, QueryContext context, CancellationToken ct)
   at Squidex.CLI.Commands.Implementation.Sync.Rules.RulesSynchronizer.<>c__DisplayClass8_2.<<ImportAsync>b__6>d.MoveNext()
--- End of stack trace from previous location ---
   at Squidex.CLI.Commands.Implementation.LogExtensions.DoSafeAsync(ILogger log, String process, Func`1 action).

Minimal reproduction of the problem

Environment

App Name: p2-hub-dev and gp2-2028

  • [ ] Self hosted with docker
  • [ ] Self hosted with IIS
  • [ ] Self hosted with other version
  • [x] Cloud version

Version: NA

Browser:

  • [ ] Chrome (desktop)
  • [ ] Chrome (Android)
  • [ ] Chrome (iOS)
  • [ ] Firefox
  • [ ] Safari (desktop)
  • [ ] Safari (iOS)
  • [ ] IE
  • [ ] Edge

Others:

1 Like

hey @Sebastian just to let you know this might be a possible regression - it is currently impacting our CI pipelines which means we are unable to release any feature/fix, any chance we could get an update on this soon?

But it is very likely an issue with the CLI, so a downgrade could help.

the previous cli unfortunately didn’t support the enum parameter correctly - every time we ran a sync it would override it and disable our enums which our infrastructure is now relying on.

Any way this current issue could be fixed some time soon?

UPDATE

To be clear - I am talking about the createEnum parameter inside the schema json file

I have pushed an update.

This topic was automatically closed after 2 days. New replies are no longer allowed.