Skip to content

Commit

Permalink
Release 0.4.5 (#1446)
Browse files Browse the repository at this point in the history
# Description

Please describe the change you have made.

## Checklist

- [ ] Prefixed the PR title with the Jira issue number on the form
`[CDF-12345]`.
- [ ] Tests added/updated.
- [ ] Run Demo Job Locally.
- [ ] Documentation updated.
- [ ] Changelogs updated in
[CHANGELOG.cdf-tk.md](https://github.com/cognitedata/toolkit/blob/main/CHANGELOG.cdf-tk.md).
- [ ] Template changelogs updated in
[CHANGELOG.templates.md](https://github.com/cognitedata/toolkit/blob/main/CHANGELOG.templates.md).


[CDF-12345]:
https://cognitedata.atlassian.net/browse/CDF-12345?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
  • Loading branch information
doctrino authored Feb 6, 2025
2 parents a908ad1 + ae1b808 commit 699e35d
Show file tree
Hide file tree
Showing 20 changed files with 36 additions and 21 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.cdf-tk.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@ Changes are grouped as follows:
- `Fixed` for any bug fixes.
- `Security` in case of vulnerabilities.

## [0.4.5] - 2025-02-06

### Fixed

- Building a Group with a table scoped RAWAcl no longer complains about missing dependency `tables` if the
`tables` keyword is used to specify the tables.
- When authentication with Toolkit, multiple `IDP_Scopes` are assumed to be separated by a comma in the environment
variable `IDP_SCOPES`.

## [0.4.4] - 2025-02-05

### Fixed
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.templates.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ Changes are grouped as follows:
- `Fixed` for any bug fixes.
- `Security` in case of vulnerabilities.

## [0.4.5] - 2025-02-06

No changes to templates.

## [0.4.4] - 2025-02-05

No changes to templates.
Expand Down
2 changes: 1 addition & 1 deletion cdf.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ dump = true
[modules]
# This is the version of the modules. It should'n be changed manually.
# It will be updated by the 'cdf module upgrade' command.
version = "0.4.4"
version = "0.4.5"
2 changes: 1 addition & 1 deletion cognite_toolkit/_builtin_modules/cdf.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ default_env = "<DEFAULT_ENV_PLACEHOLDER>"
[modules]
# This is the version of the modules. It should not be changed manually.
# It will be updated by the 'cdf module upgrade' command.
version = "0.4.4"
version = "0.4.5"


[plugins]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,10 @@ def get_dependent_items(cls, item: dict) -> Iterable[tuple[type[ResourceLoader],
if table_ids := scope.get(cap.TableScope._scope_name, []):
for db_name, tables in table_ids.get("dbsToTables", {}).items():
yield RawDatabaseLoader, RawDatabase(db_name)
if isinstance(tables, Iterable):
for table in tables:
if isinstance(tables, list):
yield from ((RawTableLoader, RawTable(db_name, table)) for table in tables)
elif isinstance(tables, dict) and "tables" in tables:
for table in tables["tables"]:
yield RawTableLoader, RawTable(db_name, table)
if extraction_pipeline_ids := scope.get(cap.ExtractionPipelineScope._scope_name, []):
if isinstance(extraction_pipeline_ids, dict) and "ids" in extraction_pipeline_ids:
Expand Down
6 changes: 3 additions & 3 deletions cognite_toolkit/_cdf_tk/utils/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,7 @@ def initialize_from_auth_variables(self, auth: AuthVariables, clear_cache: bool
self._credentials_provider = OAuthDeviceCode(**self._credentials_args)
elif auth.login_flow == "interactive":
if auth.scopes:
self._scopes = [auth.scopes]
self._scopes = auth.scopes.split(",")
if not (auth.client_id and auth.authority_url and auth.scopes):
raise AuthenticationError(
"Login flow=interactive is set but missing required authentication "
Expand Down Expand Up @@ -637,7 +637,7 @@ def initialize_from_auth_variables(self, auth: AuthVariables, clear_cache: bool
"Set LOGIN_FLOW to 'client_credentials', 'token', or 'interactive' to avoid this warning."
)
if auth.scopes:
self._scopes = [auth.scopes]
self._scopes = auth.scopes.split(",")
if auth.audience:
self._audience = auth.audience

Expand Down Expand Up @@ -786,7 +786,7 @@ def create_client(self, credentials: ClientCredentials) -> ToolkitClient:
token_url=self._auth_vars.token_url,
client_id=credentials.client_id,
client_secret=credentials.client_secret,
scopes=[self._auth_vars.scopes],
scopes=self._auth_vars.scopes.split(",") if self._auth_vars.scopes else [],
)

return ToolkitClient(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
pool:
vmImage: 'ubuntu-latest'
container:
image: 'cognite/toolkit:0.4.4'
image: 'cognite/toolkit:0.4.5'
env:
CDF_CLUSTER: $(CDF_CLUSTER)
CDF_PROJECT: $(CDF_PROJECT)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
pool:
vmImage: 'ubuntu-latest'
container:
image: 'cognite/toolkit:0.4.4'
image: 'cognite/toolkit:0.4.5'
env:
CDF_CLUSTER: $(CDF_CLUSTER)
CDF_PROJECT: $(CDF_PROJECT)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
environment: dev
name: Deploy Dry Run
container:
image: cognite/toolkit:0.4.4
image: cognite/toolkit:0.4.5
env:
CDF_CLUSTER: ${{ vars.CDF_CLUSTER }}
CDF_PROJECT: ${{ vars.CDF_PROJECT }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
environment: dev
name: Deploy
container:
image: cognite/toolkit:0.4.4
image: cognite/toolkit:0.4.5
env:
CDF_CLUSTER: ${{ vars.CDF_CLUSTER }}
CDF_PROJECT: ${{ vars.CDF_PROJECT }}
Expand Down
2 changes: 1 addition & 1 deletion cognite_toolkit/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.4.4"
__version__ = "0.4.5"
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "cognite_toolkit"
version = "0.4.4"
version = "0.4.5"
description = "Official Cognite Data Fusion tool for project templates and configuration deployment"
authors = [
{name ="Cognite AS", email="support@cognite.com"}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ project: pytest-project
type: dev
selected:
- modules
cdf_toolkit_version: 0.4.4
cdf_toolkit_version: 0.4.5
2 changes: 1 addition & 1 deletion tests/data/cdf_toml_data/cdf.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[modules]
# This is the version of the modules. It should not be changed manually.
# It will be updated by the 'cdf module upgrade' command.
version = "0.4.4"
version = "0.4.5"

[plugins]
graphql = true
Expand Down
2 changes: 1 addition & 1 deletion tests/data/complete_org/cdf.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[modules]
# This is the version of the modules. It should not be changed manually.
# It will be updated by the 'cdf module upgrade' command.
version = "0.4.4"
version = "0.4.5"
2 changes: 1 addition & 1 deletion tests/data/complete_org_alpha_flags/cdf.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[modules]
# This is the version of the modules. It should not be changed manually.
# It will be updated by the 'cdf module upgrade' command.
version = "0.4.4"
version = "0.4.5"
2 changes: 1 addition & 1 deletion tests/data/project_no_cognite_modules/cdf.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[modules]
# This is the version of the modules. It should not be changed manually.
# It will be updated by the 'cdf module upgrade' command.
version = "0.4.4"
version = "0.4.5"
2 changes: 1 addition & 1 deletion tests/data/project_with_bad_modules/cdf.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[modules]
# This is the version of the modules. It should not be changed manually.
# It will be updated by the 'cdf module upgrade' command.
version = "0.4.4"
version = "0.4.5"
2 changes: 1 addition & 1 deletion tests/data/project_with_duplicates/cdf.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[modules]
# This is the version of the modules. It should not be changed manually.
# It will be updated by the 'cdf module upgrade' command.
version = "0.4.4"
version = "0.4.5"
2 changes: 1 addition & 1 deletion tests/data/run_data/cdf.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[modules]
# This is the version of the modules. It should not be changed manually.
# It will be updated by the 'cdf module upgrade' command.
version = "0.4.4"
version = "0.4.5"

[modules.packages]
cdf_infield = [
Expand Down

0 comments on commit 699e35d

Please sign in to comment.