Code blocks moved - Breaking logic

Two different cloud code services have the same blocks moved -

There is no change log available -

I didn’t make this change to leave these code blocks disconnected. So it got broken with some update I guess. Any ideas? This is disappointing as the logic hasn’t been running correctly.

Tim

The Changelog is not maintained on the server. If you were to clear browser cache, the changelog would go away. I see quite a few deployments of the Crons deployment model, so I assume some changes have been taken place there:

Additionally, I see that all the methods in that service were touched today:

A codeless service is described in an XML file. A platform update does not make any changes to the files, it would be impossible for the service to get modified on its own.

I figured we’d end up in this position. I didn’t leave those blocks disconnected in 8 locations.

I could have made a mistake, no question about it. But what you’re suggesting is I left the exact same blocks disconnected, in multiple locations?

That doesn’t pass a sniff test for me, does it for you?

That log makes no sense unless I opened/changed/saved (not sure what qualifies as modified) every service at the exact same second. I might have looked at all of them, but it wasn’t simultaneously.

Another method where the same block has been disconnected.

I haven’t touched this in forever and this isn’t production (testing).

What are the chances that that block used to be able to be connected to a string function (length), but something got changed, and that is no longer possible?

Can you look in the change log for something related to that?

Hello @Tim_Jones!

Could you please provide your App Id so that we can proceed with investigating this issue?

Regards,
Alexander

This doesn’t seem to be true. Here is an example of the code being modified when a block was detected as incompatible -

I didn’t make the changes to that code to put in the console.log message. So, somehow, the platform modified the code, right?

Tim

Thanks, @Alexander_Pavelko -

EEE25B20-17FA-97DD-FF29-EC45A5072A00

Tim

That check happens only when you open a method in the editor. At that time, the platform checks if any dependencies, such as calls to API services, global functions, etc, are present. If you a service is deleted, the codeless logic for the method remains unchanged until you open the method in the editor.

1 Like

Hi @Tim_Jones

We were able to reproduce the issue and let me explain what’s going on here:

  • the system does not modify and delete logic, all changes always come from the client side

  • when you open any logic the system validates all blocks and their connections according to the current version of Codeless to highlight all invalid or deprecated blocks

  • when the system can not find a particular block (testGet function in your case) it renders a red block instead to allow you to move/delete all connected blocks

  • The issue with the disconnected “Get Seconds” block is related to the recent refactor. The “Get Seconds” block can return a Number and the “Length of” can accept only String or Array. Before the recent release, you were able to connect the “Get Seconds” to the “Length of” however, it always returns undefined and as a result, your condition was always false which I assume is not what you are expecting. We are already working on the fix and it will be released tomorrow, as a temp workaround you can put the “Get Seconds” block into a variable and then connect the variable to the “Length of” block

Regards,
Vlad

Thanks, Vlad. That explains what happened with the disconnected code blocks.

Is it possible to see what is on the server for cloud code? If what I’m seeing in the browser isn’t what is currently active on the server, it would be nice to be able to compare them.

Thanks,
Tim

yes, you can see it in the “servercode/CODELESS/{DEPLOYMEN_MODEL_NAME}/PRODUCTION/services/…/index.js” file

Thanks @vladimir-upirov and @mark-piller. I appreciate you walking me though this.

Tim