Zum Hauptinhalt wechseln

Alpha flags

Gefahr

Alpha flags are experimental features that is in an early testing phase and is likely to change or be removed without prior notice. Do not use the product or functionality in production systems.

The Cognite Toolkit uses alpha flags to enable experimental functionality that we often plan to support in the next minor release.

By default, alpha flags aren't enabled. To enable them, you must update the cdf.toml file. For example, to enable the module-repeat alpha flag, add the following to your cdf.toml file:

[alpha_flags]
module-repeat = true

Cognite toolkit versioning and releases

The Cognite Toolkit uses semantic versioning to manage versions as major, minor, and patch (for example, 0.3.17).

  • A major version increases with breaking changes in the CLI or the format of modules and configuration files. Installing a new major toolkit version may require updating your configuration files or modules.

  • Minor versions increase with new features and patch versions with bug fixes.

As long as the major version is 0, breaking changes may happen between minor versions.

The toolkit follows a release cycle of alpha, beta, and stable releases, shown by 'a' and 'b' in the version number.

  • Alpha releases (for example, 0.3.0a1) test new features, may contain breaking changes, and aren't recommended for production.
  • Beta releases (0.3.0b1) focus on stability and bug fixes and are suitable for non-production testing.
  • Stable releases (0.3.0) are production-ready.

Introducing new functionality in stable versions can lead to new bugs. Alpha flags allow you to selectively enable new functionality, minimizing the risk of introducing new bugs. The state of alpha flags vary, with some planned for future releases and others being experimental, requiring further testing.

Alpha flag: module-repeat

Status: Experimental

[alpha_flags]
module-repeat = true

This flag enables you to deploy the same module multiple times, for example, if you have multiple locations that should all have the same module deployed.

To deploy the same module multiple times, you must define a list of variables in the config.[env].yaml file. For example, if you have a module my_module with a data set resource:

./modules/
└── my_module/
└── data_sets/
└── location.DataSet.yaml
./config.dev.yaml

The location.DataSet.yaml file looks like this:

location.DataSet.yaml
- externalId: ds_{{ location }}_assets
name: Dataset for assets on {{ location }}
description: This is the dataset for all assets on {{ location }}

In the config.dev.yaml file, define a list under the my_module key:

config.dev.yaml
environment: ...

variables:
modules:
to_repeat:
- location: oslo
- location: new_york

This creates two data sets, one for Oslo and one for New York.

In the build directory, you will get these two files:

1.location.DataSet.yaml
- externalId: ds_oslo_assets
name: Dataset for assets on oslo
description: This is the dataset for all assets on oslo
2.location.DataSet.yaml
- externalId: ds_new_york_assets
name: Dataset for assets on new_york
description: This is the dataset for all assets on new_york

Alpha flag: import-cmd

Status: experimental

[alpha_flags]
import-cmd = true

This flag enables the cdf import command. The only subcommand available is transformation-cli. The command converts the transformation-cli manifest files to the Cognite API (Toolkit) format. Use this, for example, if you have transformations managed by the transformation-cli and want to convert them to the toolkit format.

Alpha flag: dump-extended

Status: Planned for 0.5.0

Available from: 0.4.1

[alpha_flags]
dump-extended = true

[plugins]
dump = true

This flag enables the cdf dump workflow/transformation/group/node subcommands. This flag requires that the dump plugin is enabled in the cdf.toml file.