Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 13 additions & 12 deletions .github/workflows/_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,22 +96,23 @@ jobs:
uses: nrwl/nx-set-shas@v4

- name: Run NX
run: pnpm exec nx affected -t lint build --exclude="apps-clients-public-cli-v2alpha-oeco" --base=${{ env.NX_BASE }} --head=${{ env.NX_HEAD }}
#run: pnpm exec nx affected -t lint build --exclude="apps-clients-public-cli-v2alpha-oeco" --base=${{ env.NX_BASE }} --head=${{ env.NX_HEAD }}
run: pnpm exec nx affected -t build --exclude='*,!tag:type:sdk' --base=${{ env.NX_BASE }} --head=${{ env.NX_HEAD }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GORELEASER_KEY: ${{ secrets.goreleaser_key }}

- name: Merge coverage reports
run: |
mkdir -p ./coverage
find ./coverage -name "coverage.txt" -exec cat {} + > ./coverage/coverage.txt

- name: Upload results to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.codecov_token }}
slug: openecosystems/ecosystem
files: "./coverage/coverage.txt"
# - name: Merge coverage reports
# run: |
# mkdir -p ./coverage
# find ./coverage -name "coverage.txt" -exec cat {} + > ./coverage/coverage.txt
#
# - name: Upload results to Codecov
# uses: codecov/codecov-action@v5
# with:
# token: ${{ secrets.codecov_token }}
# slug: openecosystems/ecosystem
# files: "./coverage/coverage.txt"

dependabot:
#needs: [ build, vulnerability ]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/_nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,5 +104,5 @@ jobs:
- name: Run NX
id: nx
run: |
pnpm exec nx run-many -t nightly -p ecosystem-v2alpha lighthouse-v2alpha
pnpm exec nx run-many -t nightly

2 changes: 1 addition & 1 deletion .github/workflows/_snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,4 @@ jobs:
- name: Run NX
id: nx
run: |
pnpm exec nx run-many -t nightly -p apps-workloads-private-event-v2alpha-event-multiplexer apps-workloads-public-mesh-v2alpha-lighthouse
pnpm exec nx run-many -t nightly
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ on:
branches-ignore:
- main

pull_request:
types: [opened, reopened, synchronize]
branches: [ "main" ]
# pull_request:
# types: [opened, reopened, synchronize]
# branches: [ "main" ]

permissions:
contents: write
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ name: cd-dev-1
on:
push:
branches:
- main
- main-disabled
paths:
- 'infrastructure/env/dev-1.properties'
pull_request:
branches:
- main
- main-disabled
paths:
- 'infrastructure/env/dev-1.properties'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/hugo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
# Runs on pushes targeting the default branch
push:
branches:
- main
- main-disabled
paths:
- 'apps/web/public/docs/v2alpha/**'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
pull_request:
types: [opened, reopened, synchronize]
branches:
- main
- main-disabled

#concurrency:
# group: snapshot
Expand Down
47 changes: 25 additions & 22 deletions .nx/workflows/agents.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,15 @@ launch-templates:
echo >> /home/workflows/.profile
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"'
brew install buf fastly/tap/fastly protobuf@3 hugo golangci-lint goreleaser/tap/goreleaser-pro goreleaser-pro ko
/home/linuxbrew/.linuxbrew/bin/brew link --overwrite protobuf@3
brew install buf golangci-lint
brew install --cask goreleaser/tap/goreleaser-pro
echo "PATH=$PATH:/home/workflows/go/bin" >> $NX_CLOUD_ENV
echo "LDFLAGS=-L/home/linuxbrew/.linuxbrew/opt/protobuf@3/lib" >> $NX_CLOUD_ENV
echo "CPPFLAGS=-I/home/linuxbrew/.linuxbrew/opt/protobuf@3/include" >> $NX_CLOUD_ENV
echo "PKG_CONFIG_PATH=/home/linuxbrew/.linuxbrew/opt/protobuf@3/lib/pkgconfig" >> $NX_CLOUD_ENV
# brew install buf fastly/tap/fastly protobuf@3 hugo golangci-lint goreleaser/tap/goreleaser-pro goreleaser-pro ko
# /home/linuxbrew/.linuxbrew/bin/brew link --overwrite protobuf@3
# echo "LDFLAGS=-L/home/linuxbrew/.linuxbrew/opt/protobuf@3/lib" >> $NX_CLOUD_ENV
# echo "CPPFLAGS=-I/home/linuxbrew/.linuxbrew/opt/protobuf@3/include" >> $NX_CLOUD_ENV
# echo "PKG_CONFIG_PATH=/home/linuxbrew/.linuxbrew/opt/protobuf@3/lib/pkgconfig" >> $NX_CLOUD_ENV


# - name: Debug
# script: |
Expand All @@ -59,22 +62,22 @@ launch-templates:

- name: Go Dependencies
script: |
go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.28.1
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.2.0
go install mvdan.cc/gofumpt@latest
go install golang.org/x/vuln/cmd/govulncheck@latest
# go install github.com/google/gnostic/cmd/protoc-gen-openapi@v0.6.8
# go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2@v2.14.0
# go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.28.1
# go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.2.0
# go install github.com/google/gnostic/cmd/protoc-gen-openapi@v0.6.8
# go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2@v2.14.0

- name: Rust Dependencies
script: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain 1.81.0
echo "PATH=/home/workflows/.cargo/bin:$PATH" >> $NX_CLOUD_ENV
/home/workflows/.cargo/bin/rustup install 1.81.0
/home/workflows/.cargo/bin/rustup target add wasm32-wasi --toolchain 1.81.0
/home/workflows/.cargo/bin/rustup toolchain add 1.81.0
/home/workflows/.cargo/bin/rustup target add wasm32-wasi --toolchain 1.81.0
. "/home/workflows/.cargo/env"
# - name: Rust Dependencies
# script: |
# curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain 1.81.0
# echo "PATH=/home/workflows/.cargo/bin:$PATH" >> $NX_CLOUD_ENV
# /home/workflows/.cargo/bin/rustup install 1.81.0
# /home/workflows/.cargo/bin/rustup target add wasm32-wasi --toolchain 1.81.0
# /home/workflows/.cargo/bin/rustup toolchain add 1.81.0
# /home/workflows/.cargo/bin/rustup target add wasm32-wasi --toolchain 1.81.0
# . "/home/workflows/.cargo/env"

# - name: Dotnet Dependencies
# script: |
Expand All @@ -92,10 +95,10 @@ launch-templates:
# curl -o go/bin/protoc-gen-grpc-java -fsSL https://repo1.maven.org/maven2/io/grpc/protoc-gen-grpc-java/1.54.0/protoc-gen-grpc-java-1.54.0-linux-x86_64.exe
# chmod +x go/bin/protoc-gen-grpc-java

- name: Install Binary Cache (if needed)
script: |
cd libs/partner/go/nebula/v1
make generate
# - name: Install Binary Cache (if needed)
# script: |
# cd go/oeco-sdk/bindings/nebula
# make generate

- name: Git Config
script: |
Expand Down
6 changes: 0 additions & 6 deletions apps/clients/public/cli/v2alpha/oeco/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@
"targets": {
"build": {
"executor": "nx:run-commands",
"dependsOn": [
{
"target": "generate",
"projects": ["libs-partner-go-nebula-v1"]
}
],
"outputs": [
"{workspaceRoot}/dist/apps/clients/public/cli/v2alpha/oeco"
],
Expand Down
4 changes: 2 additions & 2 deletions go/oeco-sdk/v2beta/.goreleaser.sdk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ variables:
dist: ./dist/go/oeco-sdk/v2beta

monorepo:
tag_prefix: "oeco-sdk-v2beta/"
tag_prefix: "go/oeco-sdk/v2beta/"
dir: go/oeco-sdk/v2beta

includes:
Expand All @@ -21,7 +21,7 @@ includes:

nightly:
version_template: "{{ incpatch .Version }}-devel"
tag_name: "oeco-sdk-v2beta/devel"
tag_name: "go/oeco-sdk/v2beta/devel"
publish_release: true
keep_single_release: true
#
32 changes: 32 additions & 0 deletions go/oeco-sdk/v2beta/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,35 @@
## 0.13.0 (2025-07-19)

### 🚀 Features

- collapsing GO SDK for easier imports ([d1bfb11](https://github.com/openecosystems/ecosystem/commit/d1bfb11))

### ❤️ Thank You

- Dimy Jeannot

## 0.12.0 (2025-07-19)

### 🚀 Features

- collapsing GO SDK for easier imports ([841ee0f](https://github.com/openecosystems/ecosystem/commit/841ee0f))
- Oeco cleanup 29 ([#61](https://github.com/openecosystems/ecosystem/pull/61))

### ❤️ Thank You

- Dimy Jeannot @dimyjeannot

## 0.11.0 (2025-07-19)

### 🚀 Features

- collapsing GO SDK for easier imports ([841ee0f](https://github.com/openecosystems/ecosystem/commit/841ee0f))
- Oeco cleanup 29 ([#61](https://github.com/openecosystems/ecosystem/pull/61))

### ❤️ Thank You

- Dimy Jeannot @dimyjeannot

## 0.10.0 (2025-07-19)

### 🚀 Features
Expand Down
12 changes: 12 additions & 0 deletions go/oeco-sdk/v2beta/bindings/nats/data.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package natsnodev1

import (
sdkv2betalib "github.com/openecosystems/ecosystem/go/oeco-sdk/v2beta"
specproto "github.com/openecosystems/ecosystem/go/oeco-sdk/v2beta/gen/platform/spec/v2"
)

// NatsSpecWrapper wrapper for Data and Error
type NatsSpecWrapper struct {
SpecData *specproto.SpecData
SpecError sdkv2betalib.SpecError
}
13 changes: 13 additions & 0 deletions go/oeco-sdk/v2beta/bindings/nats/listener.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ func ListenForMultiplexedRequests(_ context.Context, listener SpecEventListener)

_, err := n.QueueSubscribe(subject, queue, func(msg *nats.Msg) {
messageCtx, message, _ := convertNatsToListenerMessage(configuration, msg)

// The Processor is responsible for replying to the Reply subject and responding with any errors
listener.Process(messageCtx, &message)
})
if err != nil {
Expand All @@ -115,6 +117,14 @@ func ListenForMultiplexedRequests(_ context.Context, listener SpecEventListener)
}
}

func RespondWithError(_ context.Context, request *ListenerMessage, err error) {
nm := *request.NatsMessage

errResp := []byte(fmt.Sprintf(`{"error":"%s"}`, err.Error()))
nm.Respond(errResp)
return
}

// RespondToMultiplexedRequest processes an inbound request, modifies the provided message, and sends a response through NATS.
func RespondToMultiplexedRequest(_ context.Context, request *ListenerMessage, m protopb.Message) {
log := *zaploggerv1.Bound.Logger
Expand Down Expand Up @@ -177,12 +187,15 @@ func RespondToMultiplexedRequest(_ context.Context, request *ListenerMessage, m
marshal, err3 := protopb.Marshal(m)
if err3 != nil {
fmt.Println("Cannot marshal Message", zap.Error(err3))

// TODO: Respond with failure here
return
}

err4 := nm.Respond(marshal)
if err4 != nil {
log.Error("Error acknowledging message", zap.Error(err4))
// TODO: Respond with failure here
return
}
}
Expand Down
7 changes: 6 additions & 1 deletion go/oeco-sdk/v2beta/bindings/nats/producer.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,17 @@ func (b *Binding) MultiplexCommandSync(_ context.Context, s *specv2pb.Spec, comm

n := b.Nats

// When a Listener responds to a request/reply subject, it should always respond
// with a special type that stores both the Data and the Error
reply, err := n.RequestMsg(&nats.Msg{
Subject: subject,
Data: specBytes,
}, 10*time.Second)
// Here we deserialize the SpecData/SpecError object
// If an .Error !=nil, then we repond with a Connect ErrorDetail and respond to the multiplexer
if err != nil {
fmt.Println(err)
log.Error(err.Error())
return nil, err
}

return reply, err
Expand Down
4 changes: 2 additions & 2 deletions go/oeco-sdk/v2beta/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "oeco-sdk-v2beta",
"version": "0.10.0",
"name": "go/oeco-sdk/v2beta",
"version": "0.13.0",
"description": "SDK version v2beta",
"private": true,
"license": "Apache-2.0"
Expand Down
4 changes: 4 additions & 0 deletions governance/RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Prerequisites
- Ensure Git is not in a "dirty" state
- Ensure all of the protos have been published if changed
- cd proto
- buf registry login buf.build
- buf push

# Initial Release
nx release --first-release -p oeco-sdk-v2beta --dry-run
Expand Down
2 changes: 1 addition & 1 deletion nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@
"createRelease": "github"
}
},
"releaseTagPattern": "{projectName}/{version}"
"releaseTagPattern": "{projectName}/v{version}"
},

"workloads-public": {
Expand Down