Skip to content

add module categories - #122

Merged
kodiakhq[bot] merged 2 commits into
mainfrom
bb-cats
Aug 21, 2026
Merged

add module categories#122
kodiakhq[bot] merged 2 commits into
mainfrom
bb-cats

Conversation

@flybayer

@flybayer flybayer commented Aug 21, 2026

Copy link
Copy Markdown
Member

Greptile Summary

This PR introduces centrally defined module categories and integrates their creation, migration, global publication, and assignment into the module publishing workflow.

  • Adds category specifications and workload-based mappings for every authored module type.
  • Creates or updates categories before publishing definitions and attaches all matching category IDs.
  • Extends publish-plan Markdown and API client support for category operations.
  • Updates ECS Network Service release metadata and adds category publishing coverage.

Confidence Score: 5/5

The PR appears safe to merge because no concrete changed-code failure remains after checking category synchronization, migration, and definition backfill paths.

The normal publish workflow processes all compiled definitions, and the new category operations consistently create or update categories before assigning their resolved IDs to module definitions.

Important Files Changed

Filename Overview
tools/ravion-modules/src/module-categories.ts Defines the canonical category metadata and complete definition-type-to-category mappings.
tools/ravion-modules/src/publish.ts Adds category synchronization, assignment, publish-plan rendering, and category API operations without an established actionable defect.
tools/ravion-modules/test/publish.test.ts Covers category creation, dry runs, assignment, multi-category definitions, legacy-ID migration, and HTTP payloads.
tools/ravion-modules/test/module-categories.test.ts Verifies every compiled definition is categorized and expected workload modules are cross-listed.
compute/ecs_service/rvn-ecs-nlb-definition.yml Bumps the patch release and clarifies the existing one-to-five-listener capability.
tools/ravion-modules/src/generate-definitions.ts Extends remote definition typing with organization and category fields consumed by publishing.
README.md Updates the generated ECS Network Service version to match its definition.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
    A[Compile module definitions] --> B[Resolve category specifications]
    B --> C[List remote categories]
    C --> D{Matching category exists?}
    D -- No --> E[Create category]
    E --> F[Publish category globally]
    D -- Yes --> G[Update metadata or scope if needed]
    F --> H[Resolve category IDs by definition type]
    G --> H
    H --> I[Create or patch module definitions]
    I --> J[Validate and publish module versions]
Loading

Reviews (1): Last reviewed commit: "add module categories" | Re-trigger Greptile

Context used:

@flybayer
flybayer requested a review from mabadir August 21, 2026 19:53
@github-actions

github-actions Bot commented Aug 21, 2026

Copy link
Copy Markdown

Ravion Module Publish Plan

Dry run only. No Ravion API mutations were made.

Module Current Version New Version Description
rvn-ecs-nlb 1.1.0 1.1.1 Clarify that one ECS Network Service can expose up to five TCP, UDP, or TLS ports.

Diffs

rvn-ecs-nlb n/a -> 1.1.1

--- remote
+++ compiled
-description: Network Load Balanced ECS service for running TCP, UDP, or TLS workloads behind an ECS cluster Network Load Balancer.
+description: Network Load Balanced ECS service for exposing one to five TCP, UDP, or TLS ports through an ECS cluster Network Load Balancer.
 name: ECS Network Service
 type: rvn-ecs-nlb

rvn-ecs-nlb 1.1.0 -> 1.1.1

--- remote
+++ compiled
     required: false
     type: object
 readme: |
-  Network Load Balanced ECS service for running TCP, UDP, or TLS workloads behind an ECS cluster Network Load Balancer.
+  Network Load Balanced ECS service for exposing one to five TCP, UDP, or TLS ports through an ECS cluster Network Load Balancer.
 
   ## Overview
 
@@
 
   The module is intentionally focused on Layer 4 services behind a Network Load Balancer. Use ECS Web Service for HTTP host and path routing through an Application Load Balancer.
 
-  Terraform source: [ravionhq/modules/compute/ecs_service](https://github.com/ravionhq/modules/tree/rvn-ecs-nlb@1.1.0/compute/ecs_service)
+  Terraform source: [ravionhq/modules/compute/ecs_service](https://github.com/ravionhq/modules/tree/rvn-ecs-nlb@1.1.1/compute/ecs_service)
 
   ## Use cases
 
@@
         base_path: compute/ecs_service
         branch: main
         execution_environment_id: << module.input.execution_environment_id >>
-        ref: rvn-ecs-nlb@1.1.0
+        ref: rvn-ecs-nlb@1.1.1
         repo: https://github.com/ravionhq/modules
         stack_id: <<stack.id>>
         terraform_variables:

Module Category Changes

diff --git a/tools/ravion-modules/src/module-categories.ts b/tools/ravion-modules/src/module-categories.ts
new file mode 100644
index 0000000..eb0382c
--- /dev/null
+++ b/tools/ravion-modules/src/module-categories.ts
@@ -0,0 +1,125 @@
+export interface ModuleCategorySpec {
+  givenId: string;
+  name: string;
+  description: string;
+  sortOrder: number;
+  definitionTypes: readonly string[];
+  previousGivenIds?: readonly string[];
+}
+
+export const MODULE_CATEGORIES: readonly ModuleCategorySpec[] = [
+  {
+    givenId: "web-server",
+    name: "Web server",
+    description: "For websites, HTTP APIs, and services reached through a browser or web client.",
+    sortOrder: 10,
+    definitionTypes: ["rvn-ec2-service", "rvn-ecs-nlb", "rvn-ecs-web"],
+  },
+  {
+    givenId: "tcp-udp-server",
+    name: "TCP/UDP server",
+    description: "For Layer 4 workloads such as game servers, MQTT brokers, and custom TCP, UDP, or TLS protocols.",
+    sortOrder: 20,
+    definitionTypes: ["rvn-ecs-nlb"],
+    previousGivenIds: ["tcp-udp-service"],
+  },
+  {
+    givenId: "worker",
+    name: "Worker",
+    description: "For queue consumers, scheduled jobs, and background processes without public endpoints.",
+    sortOrder: 30,
+    definitionTypes: ["rvn-ec2-service", "rvn-ecs-worker"],
+  },
+  {
+    givenId: "function",
+    name: "Function",
+    description: "For webhook handlers, scheduled tasks, and event processing that run only when invoked.",
+    sortOrder: 40,
+    definitionTypes: ["rvn-lambda"],
+  },
+  {
+    givenId: "static-site",
+    name: "Static site",
+    description: "For frontend assets, documentation, and single-page apps that do not need an always-on server.",
+    sortOrder: 50,
+    definitionTypes: ["rvn-aws-static"],
+  },
+  {
+    givenId: "database",
+    name: "Database",
+    description: "For relational data such as PostgreSQL or MySQL, including connection pooling.",
+    sortOrder: 60,
+    definitionTypes: ["rvn-aurora", "rvn-rds", "rvn-rds-proxy"],
+  },
+  {
+    givenId: "cache",
+    name: "Cache",
+    description: "For Redis or Memcached workloads that need low-latency shared state.",
+    sortOrder: 70,
+    definitionTypes: ["rvn-elasticache"],
+  },
+  {
+    givenId: "storage",
+    name: "Storage",
+    description: "For uploads, backups, and shared files that need persistent object or file storage.",
+    sortOrder: 80,
+    definitionTypes: ["rvn-efs", "rvn-s3"],
+  },
+  {
+    givenId: "cluster",
+    name: "Cluster",
+    description: "For services that share container capacity, load balancers, and placement configuration.",
+    sortOrder: 90,
+    definitionTypes: ["rvn-ecs-cluster"],
+  },
+  {
+    givenId: "network",
+    name: "Network",
+    description: "For private subnets, internet access, service connectivity, and shared load balancers.",
+    sortOrder: 100,
+    definitionTypes: ["rvn-aws-alb", "rvn-aws-network"],
+  },
+  {
+    givenId: "domain",
+    name: "Domain",
+    description: "For custom domains, DNS records, and HTTPS certificates.",
+    sortOrder: 110,
+    definitionTypes: ["rvn-acm-certificate", "rvn-route53"],
+  },
+  {
+    givenId: "cdn",
+    name: "CDN",
+    description: "For serving images, JavaScript bundles, and downloads closer to users.",
+    sortOrder: 120,
+    definitionTypes: ["rvn-cloudfront"],
+  },
+  {
+    givenId: "security",
+    name: "Security",
+    description: "For service roles, deployment permissions, and least-privilege access.",
+    sortOrder: 130,
+    definitionTypes: ["rvn-aws-iam-policy", "rvn-aws-iam-role"],
+  },
+  {
+    givenId: "iac",
+    name: "IaC",
+    description: "For custom infrastructure that is not covered by a purpose-built module.",
+    sortOrder: 140,
+    definitionTypes: ["rvn-stack"],
+  },
+];
+
+const MODULE_CATEGORIES_BY_DEFINITION_TYPE = new Map<string, ModuleCategorySpec[]>();
+for (const category of MODULE_CATEGORIES) {
+  for (const definitionType of category.definitionTypes) {
+    const categories = MODULE_CATEGORIES_BY_DEFINITION_TYPE.get(definitionType) ?? [];
+    categories.push(category);
+    MODULE_CATEGORIES_BY_DEFINITION_TYPE.set(definitionType, categories);
+  }
+}
+
+export function getModuleCategoriesForDefinitionType(
+  definitionType: string,
+): readonly ModuleCategorySpec[] {
+  return MODULE_CATEGORIES_BY_DEFINITION_TYPE.get(definitionType) ?? [];
+}

@kodiakhq
kodiakhq Bot merged commit a4fe18e into main Aug 21, 2026
8 checks passed
@kodiakhq
kodiakhq Bot deleted the bb-cats branch August 21, 2026 20:08
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.

2 participants