Skip to main content
Version: 10 - Vanillekipferl

Deprecations

Engine changes with time as new features are introduced and other features get improved or even removed. Since removing features can break existing processes, it doesn't happen overnight.

When a feature is set for removal, first a deprecation note is added that signals the feature will be removed in a future release. Additionally, the workspace adds a deprecation badge to resources containing deprecated features.

Finding Deprecation Notes in Logs

Let's say there is a flow API method that will be removed in the future, hence a deprecation note is added. Every time this method is called by an execution, the execution will log that this feature is deprecated. A simple way to look for deprecation notes within your whole workspace, is to head over to the workspace logs and search for 'deprecat' in the subject field.

Here's how you can get an overview of deprecation notes in the workspace logs

warning

Deprecation notes are only created if a deprecated flow API method is called. If parts of your scripts contain deprecated features but those parts are not usually executed (for example they cover edge cases that only happen infrequently, or are scheduled only yearly) they might not create deprecation notes.

Similarly, if you delete logs for security reasons, you won't find deprecation notes in the logs.

In these cases you can only find deprecated features by analyzing your scripts e.g. by exporting them and using the search function on an IDE to look for deprecated methods.

Automatic Migration for Schemas

Cloudomation Engine automatically adds a deprecation badge and the button "Migrate deprecations" to resources containing deprecated schemas.

important

This feature currently only recognizes deprecations in schemas (e.g. connector or wrapper inputs). You can find deprecated flow_api methods, as described in the logs section.

The badge and the button

Clicking on the "Migrate deprecations" button attempts to automatically migrate the deprecated schema

example

Migrating a schema in a connector resource.

Before:

# configuration for a REST connector containing the deprecated parameter `url`
url: https://httpbin.org/get

After clicking the "Migrate deprecations" button:

# automatically migrated configuration for the connector
host: httpbin.org
path: get
scheme: https
schema_version: '10.0'
example

Migrating a schema in a flow resource.

A user creates a flow with the following script:

import flow_api


def handler(system: flow_api.System, this: flow_api.Execution, inputs: dict):
this.connect(
connector_type='REST',
url='https://httpbin.org/get'
)

return this.success('all done')

Upon saving the script get automatically modified to use the correct schema:

import flow_api


def handler(system: flow_api.System, this: flow_api.Execution, inputs: dict):
this.connect(
connector_type='REST',
schema_version='10.0',
scheme='https',
host='httpbin.org',
path='get',
)

return this.success('all done')

Limitations

Some schemas that are evaluated at runtime can not be automatically migrated. E.g. the url parameter in a REST connector is deprecated and need to be split into host, path and scheme. If the value of url is dynamic it can not be determined what the values for the new parameters should be.

example

A schema within a flow script where the schema is evaluated at runtime:

import flow_api


def handler(system: flow_api.System, this: flow_api.Execution, inputs: dict):
my_url = inputs['url'] # e.g. my_url='https://httpbin.org/get'
this.connect(
connector_type='REST',
url=my_url # the URL is evaluated at runtime
)

return this.success('all done')

If a user clicks on the button "Migrate deprecations" in a resource that contains schemas that cannot be automatically migrated, a warning is shown:

The warning when a schema cannot be automatically migrated

To circumvent this limitation you can manually edit the schema by splitting the url parameter into host, path and scheme and specifying the schema version.

example

Manual migration of a schema within a flow script where the schema is evaluated at runtime:

import flow_api


def handler(system: flow_api.System, this: flow_api.Execution, inputs: dict):
my_url = inputs['url'] # e.g. my_url='https://httpbin.org/get'
scheme=my_url.split('://')[0]
host=my_url.split('://')[1].split('/')[0]
path=my_url.split('://')[1].split('/')[1]
this.connect(
connector_type='REST',
schema_version='10.0',
scheme=scheme,
host=host,
path=path,
)

return this.success('all done')

Connector Output Schema Changes from Version 9 to 10

Some connector types have a different output schemata. If your flow scripts access the output value of a connector with a changed schema, you must adjust your scripts to the new schema.

Connector Type: SQLMSSQL

  1. Modes 'execute' and 'executemany'

The output value now only contains statistics of the cursor, meaning that this mode cannot be used to return a value from a SELECT statement. Use fetch or fetchrow

For example here are the old and new output values for the following script:

this.connect(
'mssql',
mode={
'mode_name': 'execute', # or 'executemany'
'query': '''
DECLARE @my_var int = 42;
SELECT @my_var as return_value
''',
},
).get('output_value')

Old output_value

# the result
result:
return_value: 42

New output_value

# the result
result:
messages: []
rowcount: -1
  1. Modes 'fetch', 'fetchrow', and 'fetchval'

The output value contains the results as a dictionary, with the key depending on the mode.

For example here are the old and new output values for the following script:

this.connect(
'mssql',
mode={
'mode_name': 'fetch', # or 'fetchrow' or 'fetchval'
'query': '''
DECLARE @my_var int = 42;
SELECT @my_var as return_value
''',
},
).get('output_value')

Old output_value

# the result for 'fetch'
result:
- - return_value: 42
# the result for 'fetchrow'
result:
- return_value: 42
# the result for 'fetchval'
result:
42

New output_value

# the result for 'fetch'
result:
rows:
- return_value: 42
messages: []
rowcount: -1
# the result for 'fetchrow'
result:
row:
return_value: 42
messages: []
rowcount: -1
# the result for 'fetchval'
result:
value: 42
messages: []
rowcount: -1

Connector Type: REST

Headers in the output value are now represented as a dictionary instead of a list. If you access headers in a flow script, you must adjust accessing them.

For example:

Old output_value

-   - header_1_name
- header_1_value
- - header_2_name
- header_2_value
# header_1_name can be accessed by
this.connect('rest').get('output_value')['headers'][0][0]

New output_value

-   name: header_1_name
value: header_1_value
- name: header_2_name
value: header_2_value
# header_1_name can be accessed by
this.connect('rest').get('output_value')['headers'][0]['name']