Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fully support service namespacing and revision tagging #529

Merged
merged 95 commits into from
Oct 13, 2022

Conversation

cortadocodes
Copy link
Member

@cortadocodes cortadocodes commented Oct 4, 2022

Summary

This release add support and requirement for service namespaces and service revision tags. This allows services to be versioned and provides a more familiar format for service IDs that's, for example, similar to Docker image names (e.g. octue/example-service:latest). Full validation of service IDs comes as part of this.

The new octue deploy create-push-subscription has also been added as requested by users and will be accompanied by a GitHub action in another repository.

Contents (#529)

IMPORTANT: There are 4 breaking changes.

New features

  • 💥 BREAKING CHANGE: Add support for and require revision tags for services
  • 💥 BREAKING CHANGE: Validate service IDs before creating or questioning services
  • Add ability to set service namespace, name, and revision tag by environment variable
  • Add octue deploy create-push-subscription CLI command

Enhancements

  • 💥 BREAKING CHANGE: Require services to have a namespace and replace use of organisation with namespace in service configurations
  • 💥 BREAKING CHANGE: Remove namespace parameter from Topic and Subscription and apply octue.services Pub/Sub namespace to all topic/subscription paths
  • Remove application of octue.services Pub/Sub namespace from Service
  • Use a coolname revision tag to allow a service revision with a non-unique SRUID to start as a unique service revision when using the octue start CLI command
  • Set the Service.id attribute to the user-friendly SRUID instead of the Pub/Sub-friendly SRUID
  • Return SRUID from DataflowDeployer.deploy

Fixes

  • Handle inability to find/load version compatibility data file
  • Use latest Apache Beam base image in Dataflow Dockerfile
  • Fix some log and error messages

Operations

  • Speed up and simplify release workflow
  • Use new Octue GitHub actions in workflows
  • Improve installation process in main Dockerfile
  • Use latest commit message checker

Dependencies

  • Update Dataflow setup.py file

Refactoring

  • Rename OCTUE_NAMESPACE to OCTUE_SERVICES_NAMESPACE
  • Remove cool-naming of services when instantiated without id and simplify the name argument

Upgrade instructions

💥 Add support for and require revision tags for services

The ServiceConfiguration.service_id attribute and the SERVICE_ID environment variable have been removed.

  • ServiceConfiguration: Use octue.cloud.service_id.create_service_id to create IDs from ServiceConfiguration.namespace and ServiceConfiguration.name

  • SERVICE_ID environment variable: Use the new OCTUE_SERVICE_NAMESPACE, OCTUE_SERVICE_NAME, and OCTUE_SERVICE_REVISION_TAG environment variables.

💥 Validate service IDs before creating or questioning services

Update your services' namespaces, names, and revision tags to follow the requirements set out in the Creating services doc.

💥 Require services to have a namespace and replace use of organisation with namespace in service configurations

Provide the namespace key in the service configuration (the octue.yaml file). If you were using the organisation key before, the namespace key now replaces it. Examples of a namespace are your organisation's name or your GitHub username.

💥 Remove namespace parameter from Topic and Subscription and apply octue.services Pub/Sub namespace to all topic/subscription paths

The octue.services namespace is now mandatory and applied automatically in topic and subscription paths. Please stop providing the namespace argument if you were providing it before.

@cortadocodes cortadocodes linked an issue Oct 4, 2022 that may be closed by this pull request
BREAKING CHANGE: The `octue.services` namespace is now mandatory. Please stop providing the `namespace` argument if you were before.
BREAKING CHANGE: Provide a namespace in the service configuration (`octue.yaml`) e.g. your organisation, name, or GitHub username.
BREAKING CHANGE: Update your service IDs to follow the requirements set out in the docs.
BREAKING CHANGE: This removes the `service_id` attribute from `ServiceConfiguration` and removes the use of the `SERVICE_ID` environment variable.

- **`ServiceConfiguration`:** Use `octue.cloud.service_id.create_service_id` to create IDs from `ServiceConfiguration.namespace` and `ServiceConfiguration.name`

- **`SERVICE_ID` environment variable:** Use the new `OCTUE_SERVICE_NAMESPACE`, `OCTUE_SERVICE_NAME`, and `OCTUE_SERVICE_TAG` environment variables.
@cortadocodes cortadocodes changed the title Resolve and fully support service namespacing Resolve and fully support service namespacing and revision tagging Oct 13, 2022
@cortadocodes cortadocodes force-pushed the feature/add-topic-and-subscription-creation-command branch from 8db9230 to 899f59b Compare October 13, 2022 11:26
.github/workflows/python-ci.yml Show resolved Hide resolved
.github/workflows/release.yml Outdated Show resolved Hide resolved
docs/source/creating_services.rst Outdated Show resolved Hide resolved
octue/cli.py Outdated Show resolved Hide resolved
@cortadocodes cortadocodes changed the title Resolve and fully support service namespacing and revision tagging Fully support service namespacing and revision tagging Oct 13, 2022
@cortadocodes cortadocodes merged commit f0b1cab into main Oct 13, 2022
@cortadocodes cortadocodes deleted the feature/add-topic-and-subscription-creation-command branch October 13, 2022 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Resolve service namespacing Create push subscriptions
3 participants