Skip to content

Commit

Permalink
feat: add new workflowOrchestrationAcl (#106)
Browse files Browse the repository at this point in the history
* feat: add new acl
- added to `with-undocumented-capabilities` feature flag
- workflowOrchestrationAcl (beta, no dtaset support)

* added chater with notes
- about versioning and release flow
  • Loading branch information
spex66 authored Nov 29, 2023
1 parent 732419e commit fd10cae
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 209 deletions.
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ the CLI to maintain or migrate existing CDF projects.
- [Run locally with Poetry (requires Python 3.11 being available)](#run-locally-with-poetry-requires-python-311-being-available)
- [Run locally with Docker images using buildpacks (v3)](#run-locally-with-docker-images-using-buildpacks-v3)
- [Run locally with Docker (v2)](#run-locally-with-docker-v2)
- [bootstrap-cli versioning and release steps](#bootstrap-cli-versioning-and-release-steps)

<!-- /code_chunk_output -->

Expand Down Expand Up @@ -1091,3 +1092,23 @@ docker build -t incubator/bootstrap-cli:latest .
# ${PWD} because only absolute paths can be mounted
docker run --volume ${PWD}/configs:/configs --env-file=.env incubator/bootstrap-cli --dry-run deploy /configs/config-deploy-example.yml
```

# bootstrap-cli versioning and release steps

- open a branch for example: `fix/<bug>` or `feat/add-smthg-new`
- make changes to code and/or documentation
- test changes running code locally (python and from docker) against a test-project
- increase version numbers **manually** in three locations, following the semantic-versioning `major.minor.path` scheme:
- pyproject.toml
- action.yml
- src/bootstrap/__init__.py
- run `pre-commit run` on staged changes or `pre-commit run --all-files`
- commit to branch, publish and create PR
- when merged to main
1. create a new release with a tag matching the version like this: `v3.3.0` (with a leading `v`)
- dopt style from releases before
2. run **manually** gh-action "ci" ([link](https://github.com/cognitedata/inso-bootstrap-cli/actions/workflows/ci.yaml))
- starting with "Run workflow" button
- typically using "Branch: main"
- type image name matching the version like this: `v3.3.0` (with a leading `v`)
- build and publish requires approval from either Peter (`spex66`) or Tugce (`tugceozgur`)
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ inputs:

runs:
using: "docker"
image: docker://cognite/bootstrap-cli:v3.2.1
image: docker://cognite/bootstrap-cli:v3.3.0
env:
BOOTSTRAP_TOKEN_URL: ${{ inputs.token-url }}
BOOTSTRAP_PROJECT: ${{ inputs.cdf-project-name }}
Expand Down
197 changes: 0 additions & 197 deletions configs/config-deploy-example-v2.yml

This file was deleted.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "inso-bootstrap-cli"
# 230802 pa: switched to keep manually in sync with
# 1. src/bootstrap/__init__.py => __version__ = "3.0.6"
# 2. action.yml => image: docker://cognite/bootstrap-cli:v3.0.6
version = "3.2.1"
version = "3.3.0"
description = "A CLI to deploy a CDF Project to bootstrap CDF Groups scoped with Data Sets and RAW DBs"
authors = ["Peter Arwanitis <[email protected]>", "Tugce Ozgur Oztetik <[email protected]>"]
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion src/bootstrap/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
# 230301 pa: automated by adding it to pyproject.toml > [tool.semantic_release] > version_variable

# 230802 pa: switched to manual updates, after issues with semver gh-actions
__version__ = "3.2.1"
__version__ = "3.3.0"
25 changes: 16 additions & 9 deletions src/bootstrap/app_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ class RoleType(str, ReprEnum):
# and read: ["READ"])
#
AclDefaultTypes = [
"assets",
"annotations",
"dataModels",
"assets",
"dataModelInstances",
"dataModels",
"datasets",
"digitalTwin",
"entitymatching",
Expand Down Expand Up @@ -58,7 +58,13 @@ class RoleType(str, ReprEnum):
"wells",
]

UndocumentedAclDefaultTypes = ["documentFeedback", "documentPipelines", "monitoringTasks", "notifications"]
UndocumentedAclDefaultTypes = [
"documentFeedback",
"documentPipelines",
"monitoringTasks",
"notifications",
"workflowOrchestration",
]


def getAllAclTypes(with_undocumented_capabilities: bool = False):
Expand All @@ -72,23 +78,24 @@ def getAllAclTypes(with_undocumented_capabilities: bool = False):
# a subset of AclDefaultTypes
AclAllScopeOnlyTypes = set(
[
"projects",
"sessions",
"annotations",
"digitalTwin",
"entitymatching",
"functions",
"types",
"seismic",
"digitalTwin",
"geospatial",
"geospatialCrs",
"wells",
"projects",
"seismic",
"sessions",
"timeSeriesSubscriptions",
"types",
"wells",
# undocumented alcls
"documentFeedback",
"documentPipelines",
"monitoringTasks",
"notifications",
"workflowOrchestration",
]
)

Expand Down

0 comments on commit fd10cae

Please sign in to comment.