All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Changes are grouped as follows:
Added
for new features.Changed
for changes in existing functionality.Deprecated
for soon-to-be removed features.Improved
for transparent changes, e.g. better performance.Removed
for now removed features.Fixed
for any bug fixes.Security
in case of vulnerabilities.
- [Alpha feature] Support for specifying list of variables under modules in
config.[env].yaml
file. This allows you to reuse the same module with different variables. - [Alpha feature] GraphQL now supports the
preserveDml
parameter.
- [Alpha feature]
cdf deploy
will no longer deployGraphQL
resources if they are not changed. - In
cdf build
when loadingconfig.[env].yaml
the Toolkit now correctly prefers variables deeper, more specific, in the hierarchy over more general variables. - [Alpha feature]
cdf build
will no longer copy contentYAML
files to the build directory. - A bug caused the comparison with existing Tranformation Notifications to fail. This is now fixed.
- The
cdf auth verify
no longer gives UserWarning is the user has unknown capabilities.
cdf auth verify
no longer asks to update missing capabilities if there are no missing capabilities.run function local
now works with functions that are importing adjacent modules.- Environment variables were not replaced in Functions. This is now fixed.
run function local
give a more informative error message if the function code cannot be imported.run function local
now automatically loads environment variables from.env
file. This is useful if you want to run therun_check.py
script manually, for example, in debug mode with your IDE.
- [alpha-feature]
--force-update
flag tocdf deploy
to force update of all resources even if they are not changed.
- Running
cdf run function local
no longer defaults toIDP_CLIENT_SECRET
as the environment variable for the client secret. Instead, it will use the name specified in the function schedule configuration. cdf auth verify
now asks the user to verify before updating the capabilities of the service principal.
- Deploying RAW Tables/Databases no longer raises a
ToolkitRequiredValueError
. - Deploying Asset given as
.csv
/.parquet
is now supported again. - Running
cdf deploy
no longer complains about!keyvault
syntax inExtractionPipelineConfig
resources.
- When running
cdf modules add
, the Toolkit removed trailing slash in the module path causing a build error. This is now fixed. - When running
cdf build
, the Toolkit now stops if an error is encountered. Asset
resources withoutmetadata
are no longer always redeployed when runningcdf deploy
, only if the local is different than the CDF configuration.- Asset centric
LocationFilter
s are no longer always redeployed when runningcdf deploy
, only if the local is different than the CDF configuration. - When deleting a
Function
the file is also removed if it exists. - The
parentExternalId
inLocationFilter
is now correctly replaced byparentId
when runningcdf deploy
.
No changes to cdf CLI.
- Building a
WorkflowTrigger
will no longer complain thatauthentication
is an unused variable. - In resource
Group
, the following lookups are now done when runningcdf deploy/clean
:securityCategoriesAcl
idscope
Security Names are now replaced by IDs.locationFiltersAcl
idscope
external LocationFilter Ids are now replaced by IDs.timeSeriesAcl
idscope
external TimeSeries IDs are now replaced by internal IDs.assetRootIdScope
external Asset IDs are now replaced by internal IDs.
- The resource
ResourceScopedGroup
is now correctly deployed afterRAW
Tables
andDatabases
,LocationFilters
, andSecurityCategories
when runningcdf deploy
.
- Running
cdf deploy --verbose
will no longer raise aToolkitRequiredValueError
when creating a newFunctionSchedule
. - If
--verbose
is set on any command and an error occurs, the Toolkit will now print a full traceback.
- Deploying
Robotics
resourceMap
now accounts for the dependencies onFrame
andLocation
. - The Hosted Extractor Resources now respects the dependencies between the resources. For example, if a
Job
is referencing aDestination
, theDestination
will be deployed before theJob
. - Deploying a view-based
LocationFilter
no longer raises a400
error. - When running
cdf modules init
required modules are now created. Before, the Toolkit would skip creating the required modules. - When running
cdf build
, in thehosted_extractors
folder, the Toolkit will now give a warning if aDestination
is referring toa non-existing dataset. - Running
cdf modules upgrade
from version0.3.0
and earlier will no longer fail if you have a view basedLocationFilter
in thelocations
folder.
- Views based location filters no longer raises a TypeError when running
cdf clean
orcdf deploy
. - CogniteFiles are not recognized by
CogniteFile
and not.CogniteFile
suffix in thefiles
resource folder.
- Support for
$FILENAME
expansion pattern forCogniteFile
in thefiles
folder. - The
cdf repo init
command now creates aGitHub
workflow for the Toolkit.
- Running
cdf dump datamodels
now dumps containers and views into separate folders.
- Added support for device code login flow.
- Support for uploading
CogniteFiles
. - Docker release of the Toolkit.
- When running
deploy --dry-run
, the Toolkit will not require write access to the CDF project.
- Uploading a file will no longer overwrite the
FileMetadata
.
- Upgrading the
cognite-sdk
to6.62.5
no longer raises anImportError
when running thecdf
commands.
- Support for hosted extractors mappings.
- [Feature Preview] Deploying
GraphQL
resources withcdf deploy
no longers fails with aToolkitRequiredValueError
, if there is a comment in the.graphql
file or a multiline@import
directive is used. For example:
type MyType
@import(
dataModel: {
externalId: "MyModel"
version: "v1"
space: "MySpace"
}
) {
name: String!
}
- If there are multiple
cognite_toolkit_service_principal
s, thecdf auth verify
will offer to delete duplicates.
- Running
cdf auth verify
now prompts the user to create thecognite_toolkit_service_principal
if it does not exist. - In the
cdf build
command, version variables (DataModel
,View
,Transformations
) are now always read as string and not integer. This ensures no false positive warnings for missing dependencies. - In the
cdf deploy/clean
command, if a transformation is writing to aDataModel
or aView
the version is now always read as a string. Before if it was for example,3_0_0
it would be read as300
and cause the deployment of the transformation to fail. - [Feature Preview] The
GraphQL
loader now includes the.graphql
file in thecdf build
command.
- Dump for
Assets
andTimeSeries
withcdf dump asset
andcdf dump timeseries
commands. - Support for Hosted Extractors
Destination
andJob
. - Support for
CogniteFile
.
- The Toolkit no longer gives a warning if it cannot import Cognite Function code when executing the
cdf build
command. This is to separate the build and deploying of artifacts from validating/debugging the function code. Validation of the function code is expected to be handled bycdf run function local
. - [BREAKING] The resource folder
timeseries_datapoints
is removed andcsv
andparquet
files with datapoints are now expected to be in thetimeseries
folder. - The dump of data models has changed interface, now the data model id is optionally given as positional instead of flags. If now data model is given, the user will be prompted to select one.
- CSV files in the
timeseries_datapoins
folder with the stringtimeshift_
in the index will no longer be timeshifted to today when runningcdf build
- FileMetadata pattern
$FILENAME
is no longer supports prefix and suffix in thename
parameter. This is to simplify the pattern. - [BREAKING] The command
cdf describe
is removed. This functionality was not used and thus removing it to simplify the Toolkit and to focus on the core functionality. - [BREAKING] Support for api parameters in
Node
resource is removed. - Support for Python 3.9.
- Running
cdf modules upgrade
no longer raises an error when upgrading from0.2.x
.
- Added flag
--modules
/-m
to select which modules to build in thecdf build
command. - The
cdf build
command no longer requiresconfig.[env].yaml
to be present. If it is not present, the Toolkit will use the default values for the environment.
- If you removed
metadata
in any resource file, the Toolkit would not update this change in CDF. This is now fixed.
- The new
cdf modules add
subcommand lets users add modules to an existing modules directory. - [Feature Preview] Support for resource type Hosted Extractor Source. This should be in the
hosted_extractors
folder, and the file needs to be suffixed with.Source.yaml
, for example,my_eventhub.Source.yaml
. [CAUTION] The current implementation will always redeploy the source, even if it has not changed. This will be fixed in a future release. - Added support for resource type
Sequence
in theclassic
folder. - Added parameter
--selected
to thecdf build
command to overwrite theselected
in theconfig.[env].yaml
file. - Made the
config.[env].yaml
optional when running the `cdf build command.
- [BREAKING] The command
cdf auth verify
has been split intocdf auth init
andcdf auth verify
. Theinit
command is used to initialize the auth parameters, and theverify
command is used to verify that required privileges are set. Theinit
command will by default run theverify
command after the initialization unless a--no-verify
flag is set. In addition, the two commands have been reworked to be more user-friendly. They are now interactive (no longer requires a--interactive
flag) and have no longer supports passing in a custom Group file. Instead, they are intended to only set up and verify a service principal for the Toolkit.
- The
config
value of aExtractionPipelineConfig
is now correctly parsed as a string. Before it was parsed as YAML, typically an object/dict, which caused loss of information. This is becauseyaml.safe_dump(yaml.safe_load(config)) != config
as, for example, special YAML tags are lost. - Deploying a
LocationFilter
with a data model no longer returns a400
error.
- The
--interactive
flag from thecdf deploy
andcdf clean
commands. - The shared flags
--verbose
. This has been deprecated and has been replaced by--verbose
on each individual command. For example, before you could writecdf --verbose build --env dev
, now you should writecdf build --env dev --verbose
.
- The
WorkflowTrigger
config files now supportsobject
(dict
) as a valid type for thedata
field. This will automatically be converted to ajson
string when deploying the trigger.
- The field
default_organization_dir
was not read in thecdf.toml
file. This is now fixed. - The
cdf modules upgrade
command would fail to update0.3.0a1
and0.3.0a2
to0.3.0a3
. This is now fixed. - If the version of a
DataModel
orView
was set to1_0_0
in the resource file, Toolkit would send it as100
to the API. This is now fixed. - Groups without metadata no longer triggers redeploy when running
cdf deploy
- LocationFilter did not load subclasses properly. This is now fixed.
- When running any command, the terminal would print warnings from the
cognite-sdk
. This is now fixed. - The
cdf modules init
no longer creates an invalidcdf.toml
file when the user uses anorganization-dir
.
- In the commands
build
andpull
,modules upgrade
andmodules list
,organization-dir
is now an optional argument--organization-dir
and-o
instead of positional argument. This is to have consistent behavior with other commands. - The config filed
cdf.toml
is now created withcdf modules init
instead ofcdf repo init
. - In
cdf.toml
theorganization_dir
is renameddefault_organization_dir
.
- Running
cdf repo init
now creates acdf.toml
with the correct version.
- Loaders for resource types
Assets
,3DModel
, andRobotic
(Map
,DataPostProcessing
,RobotCapability
,Frame
, andLocation
). These loaders were earlier available as feature preview. - Support for
LocationFilter
in thelocations
folder. - Command
cdf repo init
to initialize the repository with.gitignore
,.env
, and the new Toolkit configuration filecdf.toml
- Command
cdf modules list
to list all modules. - Command
cdf modules init
to setup modules. This is interactive and will guide you through selecting the modules you want to use. You can bypass the interactive mode by using the--all
flag. which will select all modules, similar to the previouscdf-tk init
command. - Command
cdf modules upgrade
to upgrade all modules automatically.
- The resource
FunctionSchedule
is not uniquely identified byname
instead ofcronExpression
by the Toolkit. This enables multiple schedules with the same cron expression for the same function. - The Toolkit no longer gives warnings for naming conventions that are not followed.
- [BREAKING] The resource
Label
is now in the resource folderclassic
and not in thelabels
folder.
- [BREAKING] The command
cdf-tk init
it now replaced bycdf repo init
andcdf modules init
.
- Ignore
.pyc
files when hashing function directories in thecdf-tk deploy
command. This prevents unnecessary redeployments of functions.
- Views and DataModels with versions that are integers are only being redeployed if they have changed in the
cdf-tk deploy
command. They were earlier always redeployed.
- Location Filter support
-
When running
cdf-tk deploy
, the Toolkit would not detectFunction
secrets that were changed, which leads to theFunction
not being updated. This is now fixed. -
[Feature Preview] improved
--interactive / -i
fordump asset
anddump timeseries
-
which can list datasets or assets with
clear-name (external_id) [count]
? Select a data set listed as 'name (external_id) [count]' (Use arrow keys to move, <space> to select, <a> to toggle, <i> to invert) » ○ (WITSML) [286,088] ○ (DBCalculations) [6,007] ○ (SAP) [6] ○ (Wells) [0] ○ (Drilling) [45]
-
an "Abort" option is now available
No data set selected. Select a data set to dump (Use arrow keys) Data Set Done » Abort
-
-
[Feature Preview] new feature
TIMESERIES_DUMP
addedcdf-tk dump timeseries
now dumps to yaml/csv/parquet- supports
--data-set / -d
selection - supports
--interactive / -i
- feature does not include datapoints
-
[Feature Preview] In the command
cdf-tk import transformation-cli
, the Toolkit no longer raises anUnicodeDecodeError
when importing a manifest with a query file that contains special characters on Windows. -
The Toolkit previously detected a version as changed in the cdf-tk deploy command if it was an integer in a DataModel or View resource file. This issue is now fixed.
- [Feature Preview]
cdf-tk dump asset
now dumps into multiple files and no longer raise an Exception when dumping into.parquet
format. - [Feature Preview]
cdf-tk dump asset
now also dumps labels used by the assets.
- [Feature Preview]
cdf-tk dump asset
now respects the selecteddataset
when set in interactive mode. - The Toolkit no longer tries to do variable replacement in
.parquet
files incdf-tk build
, which would raise an error. - When running
cdf-tk deploy
with a capability that is undocumented but supported in the API, the Toolkit would raise an error. This is now fixed. - [Feature Preview] When using
functionExternalID
+name
to identify a function schedule, thecdf-tk deploy
command no longer raise aValueError
.
- In the
cdf-tk build
command, if theFunction
code cannot be imported, the Toolkit will now give a warning instead of anToolkitValidationError
. This is to allow you to deploy code developed in a different environment than the environment used to run Toolkit.
- [Feature Preview] Support for uploading
3DModel
resource to CDF. Note this is the metadata about a 3D model Turn on the feature by runningcdf-tk features set model-3d --enable
.
- Running
cdf-tk deploy
after a failed build would raise an incorrectToolkitNotADirectoryError
, instead of aToolkitFileNotFoundError
for the_build_enviroment.yaml
file. This is now fixed. - When running
cdf-tk deploy
withFunctions
that have not explicitly setcpu
,memory
, orruntime
, would always be classified as changed. This is now fixed. - [Feature Preview] When dumping assets to
csv
, headers are no longer repeated for each 1000 asset. - [Feature Preview] When dumping assets to
parquet
, you can now dump more than 1000 assets without getting the errorTypeError: write() got an unexpected keyword argument 'mode'
. - [Feature Preview] When dumping assets to
parquet/csv
, the Toolkit now keeps all asset in memory until it finds all unique metadata keys. This is to ensure that header is correct in the resultingparquet/csv
file. - In the
config.[env].yaml
, thename
parameter in theenvironment
section is no longer required. This was supposed to be remove in0.2.0a4
. - If you run
cdf-tk build --env dev
, and thencdf-tk deploy -env prod
the Toolkit will now raise aToolkitEnvError
. - If you run
cdf-tk build
, the Toolkit will no longer complain about resources that exist in CDF but not in the build directory (given that the Toolkit has access to CDF). - If you deploy a data model that already exists in CDF, the API will silently fail to update the data model if there are any changes to the views in the data model. The Toolkit will now verify that the update of data models was successful and raise an error if it was not.
- When running
cdf-tk deploy
for a function the Toolkit checked that it could import the function code before deploying the function. This is now removed. The reason is that the toolkit is often run in a different Python environment than the function code. This made this check unnecessarily restrictive as it would fail even though the function code was correct due to missing dependencies. - [Feature Preview] Instead of using
functionExternalID
+cron
expression to identify a function schedule, the Toolkit now usesfunctionExternalID
+name
. This is to avoid the Toolkit to create multiple schedules for the same function if the cron expression is changed and allow to have multiple schedules with the same cron expression for the same function. To enable this feature, runcdf-tk features set fun-schedule --enable
.
- If a container with a direct relation property with a required constraint on another container, the
cdf-tk build
would not give a warning if the required container was missing. This is now fixed. - [Feature Preview] In the feature preview,
robotics
, the propertiesinputSchema
ordataHandlingSchema
inRobotCapability
andDataPostProcessing
were not updated correctly. This is now fixed. - When running
cdf-tk build
, with aNode
resource. You would get aMissingRequiredIdentifierWarning
even though theNode
had aspace
/externalId
. This is now fixed. - In the
cdf-tk deploy/clean
command, the-i
short flag was used for--interactive
and--include
at the same time. This is now fixed, and the-i
flag is only used for--interactive
. - Require
cognite-sdk>=7.54.1
, this version fixed a bug in thecognite-sdk
that caused thecdf-tk
to raise anCogniteAPIError
when deploying or cleaning more than 10functions
.
- [Feature Preview] In the feature preview,
cdf-tk import transformation-cli
, the Toolkit would fail to convert manifest withdestination: <string>
correctly. This is now fixed. - On Windows, when reading files from disk, the Toolkit could raise an
UnicodeDecodeError
. This is now fixed. - [Feature Preview] In the feature preview,
robotics
, if you tried to update a set of resources in which some were existing and others not, the Toolkit would create the new resources. This is now fixed.
- [Feature Preview] Robotic support.
- When running
cdf-tk build
, if you had two files non-YAML files named the same in different modules, or subdirectories in the same module, the Toolkit would overwrite the first file with the second file. This is now fixed.
- When running
cdf-tk build
, if you use subdirectories in a resource directories, and have two resources with the same file name, the Toolkit would overwrite the first resource with the second resource. This is now fixed. For example, if you havemy_module/transformation/subdirectory1/my_transformation.Transformation.yaml
andmy_module/transformation/subdirectory2/my_transformation.Transformation.yaml
, the Toolkit would only build the second resource.
- Tracking usage of Toolkit commands.
- [Feature Preview] Option to turn off semantic naming checks for resources. Turn on the feature by running
cdf-tk features set no-naming --enable
.
- When running
cdf-tk run function --local
, the toolkit would raise anToolkitValidationError
. This is now fixed. - When running
cdf-tk deploy --dry-run
, if any resource was referencing aDataSet
,SecurityCategory
, orExtractionPipeline
, it would incorrectly be classified as changed. This is now fixed. This applied toExtractionPipeline
,FileMetadata
,Function
,Group
,Label
,TimeSeries
, andTransformation
resources.
- Function configurations for multiple functions can now be in multiple files in the function directory. Before all configurations had to be listed in the same YAML file.
- Function schedule for functions with a
:
in the external id would raise anValueError
. This is now fixed. - Transformation notifications for transformations with a
:
in the external id would raise anValueError
. This is now fixed. - When running
cdf-tk deploy
, you would get warnings about unrelated resources that were not part of the deployment. This is now fixed. - The
transformations/notifications
endpoint was giving500
errors for requests to non-exising transformations. This is now handled by the toolkit and will not raise an error. - When doing variable replacement in a
sql
such asdataset_id('{{dataset_external_id}}')
, the toolkit would remove the quotes. This is now fixed.
- The
--verbose
flag is now moved to the end of the command. For example, instead ofcdf-tk --verbose build
, you should now writecdf-tk build --verbose
. The old syntax is still supported but will raise a deprecation warning. - When running
cdf-tk deploy --verbose
you will now get a detailed output for each resource that has changed (or will change if you use --dry-run). - Allow values
test
andqa
astype
in theconfig.[env].yaml
file.
- When running
cdf-tk build
withViews
with custom filters, the Toolkit would likely give aUnusedParameterWarning
. This is now fixed by not validating the details ofView.filters
. The motivation is thatView.filters
is a complex structure, and it is likely that you will get a false warning. The users that starts to useView.filters
are expected to know what they are doing. - If you run
cdf-tk deploy
and you had a child view that overrides a property from a parent view, the Toolkit would log it as changed even though it was not. This is now fixed.
- When running
cdf-tk build
, withRAW
tables in the selected modules, the Toolkit would always warn that the tables were missing, even though they were present. This is now fixed. - When running
cdf-tk init --upgrade <YOUR PROJECT>
form version0.1.4
the user would get aERROR (ToolkitMigrationError): Failed to find migration from version 0.1.4.
. This is now fixed. - When running
cdf-tk build
, the Toolkit would give you warning when referencing a systemSpace
,View
,Container
orDataModel
. This is now fixed. - [Feature Preview] When running
cdf-tk import transformation-cli
on a manifest with a query file that is separated from the manifest, the toolkit would raise aFileNotFoundError
. This is now fixed.
- [Feature Preview] Support for resource type
Asset
in theassets
folder. Turn on the feature by runningcdf-tk features set assets --enable
.
- When running
cdf-tk build
and the selected modules is missing, the user will now get a hint about how to fix the issue. - When running
cdf-tk build
and a module contains non-resource directories, the user will now get a warning that the directory is not a resource directory.
- The data type of variables
config.[env].yaml
file is now preserved. For example, if you hadmy_variable: "123"
, then thecdf-tk build
would build the resource file with the number instead of the string,my_variable: 123
. This is now fixed. - File configurations given as a list/array, lost the
dataSetExternalId
in thecdf-tk deploy
command. This is now fixed. - Added missing required dependency
packaging
tocognite-toolkit
.
- When running
cdf-tk build
and missingCDF_PROJECT
environment variable, the user will now get a more informative error message.
- The variable
type
in theenvironment
section of theconfig.[env].yaml
now raises an error if it is not set todev
,staging
, orprod
.
- The preview feature
IMPORT_CMD
added. This enables you to import atransformation-cli
manifest into resource configuration files compatible with thecognite-toolkit
. Activate by runningcdf-tk features set IMPORT_CMD --enable
, and deactivate by runningcdf-tk features set IMPORT_CMD --disable
. Runcdf-tk import transformation-cli --help
for more information about the import command.
- The command line messages have been improved to be more informative and user-friendly when running
cdf-tk auth verify
. - The
variables
section inconfig.[env].yaml
is now optional. - In
cdf-tk build
, more informative error message when a variable is unresolved in a resource file.
- In the
cdf-tk auth verify
command, if the flag--interactive
was set, the--update-group
andcreate-group
flags were not ignored. This is now fixed. - In the
cdf-tk auth verify
command, if there was no.env
or--cluster
and--project
flags, the toolkit would raise anAuthentciationError
, instead of prompting the user for cluster and project. This is now fixed. - In the
cdf-tk auth verify
command, the if function service was not activated, the toolkit will now activate it. - When running
cdf-tk build
, and a resource file was missing its identifier, for example,externalId
for a dataset, an error such asAttributeError: 'NoneType' object has no attribute 'split'
was raised. This is now fixed.
- When running
cdf-tk auth verify
, if the client does not have access to theCDF_PROJECT
the user will now get a more informative error message. - When running
cdf-tk auth verify
and missing theFunctionAcl(READ)
capability, the user will now get a more informative error message when checking the function service status
- Preview feature
MODULES_CMD
to allow interactive init and automatic upgrade of modules. Activate by runningcdf-tk features set MODULES_CMD --enable
, and deactivate by runningcdf-tk features set MODULES_CMD --disable
. Runcdf-tk modules init/upgrade
to interactively initialize or upgrade modules.
- When running
cdf-tk build
, you would get aDuplicatedItemWarning
on RAW Databases that are used with multiple tables. This is now fixed.
- Preview feature
MODULES_CMD
to allow interactive init and automatic upgrade of modules. Activate by runningcdf-tk features set MODULES_CMD --enable
, and deactivate by runningcdf-tk features set MODULES_CMD --disable
. Runcdf-tk modules init/upgrade
to interactively initialize or upgrade modules.
- When running
cdf-tk clean
orcdf-tk deploy --drop --drop-data
there was an edge case that triggered the bugValueError: No capabilities given
. This is now fixed. - When deploying
containers
resources with an index, thecdf-tk deploy
would consider the resource as changed even though it was not. This is now fixed. - When parsing yaml without
libyaml
,cognite-toolkit
would raise anAttributeError: module 'yaml' has no attribute 'CSafeLoader'
. This is now fixed by falling back to the pythonyaml
parser iflibyaml
(c-based) is not available.
- Support for resource type
TransformationNotification
in thetransformations
folder.
- [BREAKING] In
functions
, the function config file must be in the root function directory. This means that, for example,my_module/function/some_folder/function.yaml
will no longer be included by thecdf-tk build
command. Instead, it must be inmy_module/function/function.yaml
. The motivation is to allow arbitrary YAML files as part of the function code. - The toolkit now only gives a
TemplateVariableWarning
(Variable my_variable has value <change_me> ...
) if the variable is used byselected
in theconfig.[env].yaml
. This is to avoid unnecessary warnings. - The
FeaturePrevieWarnings
are no longer printed when runningcdf-tk deploy
orcdf-tk clean
. These warnings are from thecognite-sdk
and can be confusing to the user.
- When running
cdf-tk init --upgrade
from version0.1.4
the user would get aToolkitMigrationError
. This is now fixed.
- Support for resource type
Label
in thelabels
folder.
- The toolkit now ensures
Transformations
andFunctions
are deployed beforeWorkflows
- The toolkit now ensures
TimeSeries
andGroups
are deployed beforeDatapointSubscriptions
.
- Running the build command,
cdf-tk build
, withGroup
resources scoped will read to incorrect warning such asWARNING [HIGH]: Space 'spaceIds' is missing and is required by:
andWARNING [HIGH]: DataSet 'ids' is missing and is required by:
. This is now fixed. - Running the build command,
cdf-tk build
, with aView
resource with ahasData
filter would print aUnusedParameterWarning: Parameter 'externalId' is not used in section ('filter', 'hasData', 0, 'externalId').
. This is incorrect and is now fixed to not print this warning. - If you had a
container
with a direct relation property with a required constraint, thecdf-tk build
command would incorrectly yield a warning that theParameter 'type' is not used ...
. This is now fixed.
- Support for loading
nodes
withAPICall
arguments. The typical use case is whennode types
are part of a data model, and the defaultAPICall
arguments works well.
- Error message displayed to console on failed
cdf-tk deploy
command could be modified. This is now fixed. - Using display name instead of folder name on a failed
cdf-tk deploy
orcdf-tk clean
command. For example, ifdatapoints subscription
was failing the error message would beFailure to load/deploy timeseries as expected
, now it isFailure to load/deploy timeseries.subscription as expected
. - Unique display names for all resource types.
- Fixed bug when deploying extraction pipeline config, when none existed from before:
There is no config stored for the extraction pipeline
.
- In
config.[env].yaml
, in theenvironment
section,selected_modules_and_packages
is renamed toselected
. The old names will still work, but will trigger a deprecation warning.
- If a resource is referring to another resource, the
cdf-tk build
will now give a warning if the referred resource is not found in the same build. For example, if you have a data model and is missing the space, the build command will give a warning that the space required by the data model is missing. - The
cdf-tk build
command will now give warnings on duplicated resource. For example, if you have two files with the same externalId in the same module, the build command will give a warning that the externalId is duplicated, and that only the first file is used. - Support for
securityCategories
in theauth
folder. - Added support for resource type
DatapointSubscription
in thetimeseries
folder.
- In a
function
config, if you did not setfileId
you would get an error when runningcdf-tk deploy
,Missing required field: 'fileId'.
. ThefileId
is generated automatically when the function is created, so it is not necessary to set it in the config file. This is now fixed. - If you do
cdf-tk init --upgrade
, on a pre0.2.0a3
version, you are met withERROR (ToolkitModuleVersionError): Failed to load previous version, ...
. This is now fixed. - The parameter
container.properties.<property>.type.list
was required to be set, even thought it is optional in the CDF API. This is now fixed. - The
ExtractionPipelineConfig
create, update and delete report numbers were incorrect. This is now fixed.
- Gives a more informative error message when the authentication segment of a transformation resource file is missing a required field.
- Transformation queries can be inline, i.e. set in either the Transformation
query
property in the yaml or as a separate file. If set in both, an error is raised because it is ambiguous which query to use. - In the
cdf-tk pull
command, if an error occurs, the temporary directory was not removed. This is now fixed. - Improved error message when running
cdf-tk deploy/clean
before runningcdf-tk build
.
- [BREAKING] In function YAML config
externalDataSetId
is renamed todataSetExternalId
to be consistent with the naming convention used in the rest of the toolkit.
- [BREAKING]
cognite-tookit
no longer supportscommon_function_code
. The code used by functions must be in each function directory. The reason for this is thatcognite-toolkit
is a tool for governance and deployment of modules, it is not for development of functions. Thecommon_function_code
was a feature to support easier development of functions. It is expected that functions are developed in a separate environment and then moved to thecognite_modules
folder for deployment and promotion between environments.
- In
config.[env].yaml
, in theenvironment
section,name
is no longer required. Instead, the[env]
part of theconfig.[env].yaml
file is used as thename
of the environment. This is to avoid redundancy.
- When running
cdf-tk clean --dry-run
the output would show local resources regardless of whether they existed in CDF or not. This is now fixed and only resources that exist in CDF are shown in the output. - Better error message (no exception raised) if the config file has
selected_modules_and_packages
, but with no list items. - If yaml files are invalid, a link to the API docs for the resource is shown in the error message.
- When deploying a
FunctionSchedule
that requires an update, thecdf-tk
would fail with errorFailed to update functions.schedules. Error 'FunctionSchedulesAPI' object has no attribute 'update'.
. This is now fixed. - When calling
cdf-tk init --upgrade
, the user is met with aFailed to load previous version, ...
. This is now fixed. - When running
cdf-tk auth verify --interactive
and the user want to create a new group with the necessary capabilities, thecdf-tk
would successfully create a group, but then raise an Error:cognite.client.exceptions.CogniteAPIError: Insufficient access rights.
when trying to validate. This is now fixed.
- Support for the Workflow and WorkflowVersion resource type
- Support for specifying
selected_modules_and_packages
as paths and parent paths. For example, you can now writecognite_modules/core/cdf_apm_base
instead of justcdf_apm_base
. This is to support modules that have the same name but are in different parent directories. In addition, this also better reflects the structure of thecognite_modules
andcustom_modules
folder better.
- Functions that are deployed with schedules no longer uses a short-lived session (before: failed after ~an hour).
- [BREAKING] The
cdf-tk build
will now clean the build directory by default before building the modules to avoid unwanted side effects from previous builds. To stop this behavior, use the--no-clean
flag. - [BREAKING] The
_system.yaml
is now required to be on the root level when running anycdf-tk
command. This means that the_system.yaml
file must be in the same directory as theconfig.[env].yaml
files. This is to support runningcdf-tk
without thecognite_modules
folder. - [BREAKING] In the
config.[env].yaml
files, themodules
section is now renamed tovariables
. This is to better reflect the content of this section, which is variables that can be used in the resource files. - In addition to
cognite_modules
andcustom_modules
, thecognite-toolkit
now also supportmodules
as the top-level folder for modules. This together with the two changes above, is to have a better support for running thecognite-toolkit
as a standalone CLI without thecognite_modules
. - The
.gitignore
file you get by runningcdf-tk init
now ignores the/build
by default. - The dependency
cognite-sdk
must now be>=7.37.0
to use thecdf-tk
.
- Variables can now have extra spaces between curly braces and the variable name. For example,
{{ my_variable }}
is now a valid variable. Before this change, you would have to write{{my_variable}}
. - If an environment variable is not found in a resource file, for example,
${CDF_CLUSTER}
, when runningcdf-tk deploy
the user will now get a warning message that the variable is missing. Before this change, this would pass silently and potentially cause an error when trying to deploy to CDF that was hard to debug.
- When running
cdf-tk
with a Token for initialization, thecdf-tk
would raise anIndexError
. This is now fixed. - Container resources that did not have set the optional property
usedFor
would always be classified as changed, when, for example, runningcdf-tk deploy --dry-run
. This is now fixed.
- If two modules have the same name, the
cdf-tk build
command will now stop and raise an error. Before this change, thecdf-tk build
command would continue and overwrite the first module with the second module.
- Support for interactive login. The user can now set
LOGIN_FLOW=interactive
in the.env
file to use interactive login.
- The verification of access by the tool is now scoped to the resources that are being deployed instead of the entire project. This means that if the user only has access to a subset of the resources in the project, the tool will still be able to deploy those resources.
- Running the command
cdf-tk auth verify --interactive
without a.env
would raise aAttributeError: 'CDFToolConfig' object has no attribute '_client'
error. This is now fixed and instead the user gets a guided experience to set up the.env
file.
cognite-toolkit
have moved the upper bound on thecognite-sdk
dependency from7.27
to8.0
.- Creating/Removing
spaces
no longer requiresDataModelingInstances
capability.
- When running
cdf-tk clean
orcdf-tk deploy --drop-data
for a data model with more than 10 containers, the command would raise an APIError. This is now fixed. - A few minor potential
AttributeError
andKeyError
bugs have been fixed.
- Command
cdf-tk dump datamodel
for dumping data models from CDF into a local folder. The use case for this is to dump an existing data model from CDF and use it as a basis for building a new custom module with that data model. - A Python package API for the cdf-tk. This allows for programmatic access to the cdf-tk functionality. This
is limited to the
build
anddeploy
functionality. You can start byfrom cognite_toolkit import CogniteToolkit
.
- In the function deployment, the hashing function used of the directory was independent of the location of the files within the function directory. This caused moving files not to trigger a redeployment of the function. This is now fixed.
- Removed unused dependencies
mypy
,pyarrow
andchardet
fromcognite-toolkit
package. - Lowered the required version of
pandas
to1.5.3
in thecognite-toolkit
package.
- Introduced
cdf-tk pull transformation
andcdf-tk pull node
commands to pull transformation or nodes from CDF to the local module. - Support for using a template for file names
name: prefix_$FILENAME_suffix
in thefiles
resource. The files will be processed and renamed as part of the build step.
- Fixed a bug that caused
Group
upsert to leave duplicate Groups - Fixed issue with
run function --local
that did not pick up functions in modules without config variables. - Fixed error when running
run function --local
on a function without all optional parameters for handle() being set. - Bug when
cdf-tk deploy
ofExtractionPipelineConfig
with multipleconfig
objects in the same file. Then only the firstconfig
object was deployed. This is now fixed.
cdf-tk
now uses --external-id consistently instead of --external_id.- Removed upper limit on Python version requirement, such that, for example,
Python 3.12
is allowed. Note that when working withfunctions
it is recommended to usePython 3.9-3.11
asPython 3.12
is not supported yet. cdf-tk deploy
/cdf-tk clean
now deploys all config files in one go, instead of one by one. This means batching is no longer done based on the number of resource files, but instead based on the limit of the CDF API.- Files in module directories that do not live in a recognised resource directory will be skipped when building. If verbose is enabled, a warning will be printed for each skipped file.
- Only .yaml files in functions resource folders and the defined function sub-directories will be processed as part of building.
Group
resource type supports list of groups in the same file
View
which implements other views would always be classified as changed, ven though no change has been done to theview
, in thecdf-tk deploy
command. This is now fixed.DataModels
which are equal would be wrongly classified as changed if the view order was different. This is now fixed.- In the
cdf-tk build
, modules with a nested folder structure under the resource folder were not built correctly. For example, if you hadmy_module/data_models/container/my_container.container.view
, it would be put inside abuild/container/my_container.container.yaml
instead ofbuild/data_models/my_container.container.yaml
, and thus fail in thecdf-tk deploy/clean
step. This is now fixed. - When running
cdf-tk deploy
the prefixed number on resource file was not used to sort the deployment order. This is now fixed. - Fixed a bug that caused Extraction Pipeline Config update to fail
NOTE: The function changelog was by accident included in beta6 and has been moved to the correct version.
- Added support for loading functions and function schedules. Example of a function can be found in
cognite_modules/example/cdf_functions_dummy
. - Added support for common function code as defined by
common_function_code
parameter in the environment config file. - Added support for new command,
run function
that runs a function with a one-shot session created using currently configured credentials for cdf-tk. - Added support for running a Cognite function locally using the
run function --local
command. This command will run the function locally in a virtual environment simulating CDF hosted run-time environment and print the result to the console.
- BREAKING: The cdf-toolkit now requires one
config.yaml
per environment, for example,config.dev.yaml
andconfig.prod.yaml
. - BREAKING: The file
environments.yaml
has been merged intoconfig.[env].yaml
. This means that theenvironments.yaml
file is no longer used and theconfig.[env].yaml
file now contains all the information needed to deploy to that environment. - The module
cognite_modules
is no longer considered to be a black box governed by the toolkit, but should instead be controlled by the user. There are two main changes to thecognite_modules
folder:- All
default.config.yaml
are removed fromcognite_modules
and only used when runningcdf-tk init
to generateconfig.[env].yaml
files. - The file
default.packages.yaml
has been renamed_system.yaml
and extended to include thecdf-tk
version. This should not be changed by the user and is used to store package information for the toolkit itself and version.
- All
- Running the
cdf-tk init --upgrade
now gives the user instructions on how to update the breaking changes since their last upgrade. - If the user has changed any files in
cognite_modules
, the commandcdf-tk init --upgrade
will no longer overwrite the content of thecognite_modules
folder. Instead, the user will be given instructions on how to update thecognite_modules
files in the folder manually.
- In the generation of the
config.[env].yaml
multiline comments were lost. This is now fixed.
- In
raw
resources, a RAW database or tables can be specified without data. Example, of a single database
dbName: RawDatabase
or a database with table, no need to also specify a .csv
or .parquet
file for the table as was necessary before.
dbName: myRawRawDatabase
tableName: myRawTable
- Update is implemented for all resources. This means that if a resource already exists and is exactly the same as the one to be deployed, it will be updated instead of deleted and recreated.
- The
cdf-tk deploy
--drop-data
is now independent of the--drop
flag. This means that you can now drop data without dropping the resource itself. The reverse is not true, if you specify--drop
without--drop-data
, only resources that can be deleted without dropping data will be deleted. - The output of the
cdf-tk deploy
command has been improved. Instead of created, deleted, and skipped resources being printed in a table at the end of the command, the resources are now printed as they are created, deleted, changed, and unchanged. In addition, an extra table is printed below with the datapoints that have been uploaded and dropped. - The output of the
cdf-tk clean
command has also been changed in the same way as thecdf-tk deploy
command. - The
files
resource has been split into two resources,FileMetadata
andFiles
to separate the metadata from the data (the file). - To ensure comparison of resources and be able to determine whether they need to be updated, any resource defined in a YAML file will be augmented with default values (as defined by the CDF API) if they are missing before they are deployed.
- Bug in
auth
resource, this caused groups withall
andresource
scoped capabilities to be written in two steps first with onlyall
scoped capabilities and then all capabilities. This is now fixed by deploying groups in a single step.
- Support for custom environment variables injected into build files when calling the command
cdf-tk deploy
. - All resources that are unchanged are now skipped when running
cdf-tk deploy
. - Support for loading
Group
Capabilities with scopeidScope
of type string. This means you can now set theidScope
to the external id of adataSet
and it will be automatically replaced by the dataset idcdf-tk deploy
.
- Fixed bug when calling any command loading a
.env
file and the path is not relative to the current working directory. This is now fixed. - Calling
cdf-tk init --upgrade
overwrote all variables and comments set in theconfig.yaml
file. This is now fixed.
- Improved error message when missing a variable in
config.yaml
and a variable with the same name is defined for another module.
- Added
--env-path
option to specify custom locations of.env
file
- Fixed bug in command
cdf-tk build
that can occur when running onPython>=3.10
which caused an error with textTypeError: issubclass() arg 1 must be a class
. This is now fixed.
- Fixed bug in
cdf-tk deploy
where auth groups with a mix of all and resource scoped capabilities skipped the all scoped capabilities. This is now fixed.
- Handle duplicate
TransformationSchedules
when loadingTransformation
resources. - Print table at the end of
cdf-tk deploy
failed withAttributeError
, if any of resources were empty. This is now fixed. - The
cdf-tk build
command no longer gives a warning about missingsql
file forTransformationSchedule
s.
- Warnings if a configuration file is using
snake_case
when then resource type is expectingcamelCase
. - Added support for validation of
space
for data models. - Check for whether template variables
<change_me>
are present in the config files. - Check for whether data set id is present in the config files.
- Print table at the end of
cdf-tk deploy
with the resources that were created, deleted, and skipped. - Support for Extraction Pipelines and Extraction Pipeline configuration for remotely configured Extractors
- Separate loader for Transformation Schedule resources.
- In the
deploy
commanddrop_data
option has been removed. To drop data, use theclean
command instead.
- Require all spaces to be explicitly defined as separate .space.yaml file.
- The
data_set_id
forTransformations
must now be set explicitly in the yaml config file for theTransformation
under thedata_set_id
key. Note that you also need to explicitly define thedata_set
in its own yaml config file. - All config files have been merged to a single config file,
config.yaml
. Upon callingcdf-tk init
theconfig.yaml
is created in the root folder of the project based on thedefault.config.yaml
file of each module. - DataSetID is no longer set implicitly when running the
cdf-tk deploy
command. Instead, thedata_set_id
must be set explicitly in the yaml config file.
- When running
cdf-tk deploy
with--dry-run
aValueError
was raised if not all datasets were pre-existing. This is now fixed by skipping dataset validation when running with--dry-run
. - When having a
auth
group with mixed capabilities of all scoped and resource scoped, the all scoped capabilities were not removed when runningcdf-tk deploy
. This is now fixed. - Loading
Transformation
did not support settingdataSetExternalId
in the yaml config file. This is now fixed.
- Refactored load functionality. Loading raw tables and files now requires a
yaml
file with metadata. - Fix container comparison to detect identical containers when loading data models (without --drop flag).
- Clean up error on resource does not exist when deleting (on
deploy --drop
or using clean command).
- Support for loading
data_sets
. - Support for loading auth without --drop, i.e.
deploy --include=auth
and only changed groups are deployed. cdf-tk --verbose build
now prints the resolution of modules and packages.- Added
cdf-tk --version
to print the version of the tool and the templates. - Support for
upsert
fordata_sets
. - The cmd
cdf-tk deploy
creates thedata_set
before all other resources. - Data sets are no longer implicitly created when referenced by another resource, instead an error is raised.
- Require all spaces to be explicitly defined as separate .space.yaml file.
- Add protection on group deletion and skip any groups that the current service principal belongs to.
- Support for multiple file resources per yaml config file for files resources.
- Support templated loading of * files in a folder when a single yaml has
externalId: something_$FILENAME
. - You can now name the transformation .sql either with the externalId (as defined in the
corresponding yaml file) or with the name of the file of the corresponding yaml file.
I.e. if a transformation is defined in my_transformation.yaml with externalId:
tr_something
, the SQL file should be named eithertr_something.sql
ormy_transformation.sql
. - Missing .sql files for transformations will now raise an error in the build step.
- The build step will now raise a number of warnings for missing externalIds in the yaml files, as well as if the naming conventions are not followed.
- System section in
environments.yaml
to track local state ofcdf-toolkit
. - Introduced a
build_environment.yaml
in the/build
folder to track how the build was run.
cdf-tk clean
not supporting--include
properly.cdf-tk clean
not working properly for data models with data.- Fix group deletion on use of clean command to actually delete groups.
- The
experimental
module was not included when running commandcdf-tk init
. This is now fixed.
Initial release