Commit graph

50 commits

Author SHA1 Message Date
792cca4c8d feat(ec-api): new swagger from EC (Alex) with changes update app and appinstances. They call it 2.0 which already was delivered.
All checks were successful
test / test (push) Successful in 1m0s
we discussed in Teams:

Malashevich, Alex (ext) Freitag 10.10.25 17:19
Updated spec is available. It's relevant for Orca cluster you'll be added next week I hope
Swagger UI https://swagger.edge.platform.mg3.mdb.osc.live/#/

Stephan Lo, , Montag 13.10.25 09:37
hey alex ... this is great news! just a quick question: We still see version '2.0' - does this mean that there were no changes?

Malashevich, Alex (ext) Montag 13.10.25 09:49
yes, it's just relevant update of current state of things for external teams to integrate with us (FE, Developer Framework, AI, etc). So the spec you've seen before is our internal so to say
2025-10-13 10:10:16 +02:00
ce801f30d0 fix(test): finish fixing organisation refactoring tests failures
All checks were successful
test / test (push) Successful in 13s
2025-10-07 17:21:38 +02:00
ce2fb4208d fix(test): finish fixing organisation refactoring tests failures
All checks were successful
test / test (push) Successful in 53s
2025-10-07 17:19:52 +02:00
6a91b556a5 fix(test): fixed compile errors
Some checks failed
test / test (push) Failing after 12s
2025-10-07 17:09:36 +02:00
e04370a376 fix(test): started fixing tests
Some checks failed
test / test (push) Failing after 12s
2025-10-07 17:05:35 +02:00
b958acd94e
refactor(yaml): Moved organisation to metadata
Some checks failed
test / test (push) Failing after 51s
2025-10-07 16:30:57 +02:00
fdb931acc2
ci: Added test workflow running on each push except tags
All checks were successful
test / test (push) Successful in 13s
2025-10-07 16:10:02 +02:00
97517cacea
refactor(yaml): moved AppVersion into metadata 2025-10-07 16:01:38 +02:00
b712ae0869
fix(cli): Fixed tests after outputting plan diff 2025-10-07 15:40:27 +02:00
20e3afdf0d
chore: Added flake 2025-10-07 14:37:54 +02:00
d0b95d9d34 feat(cli): Added hash compare between current and desired manifest state without using annotation. instead the current hash is calculated from the showapp() app.deploymentmanifest field 2025-10-06 17:08:33 +02:00
36934e8abf feat(cli): Added output of diff when updating outboundConnections in the desired manifest 2025-10-06 16:45:53 +02:00
51ce4ed111 feat(cli): Added an auto approve flag for apply
All checks were successful
ci / goreleaser (push) Successful in 1m53s
2025-10-02 14:52:40 +02:00
975b5ad525
fix(cli): Run tests before release
All checks were successful
ci / goreleaser (push) Successful in 1m53s
2025-10-02 13:50:28 +02:00
c2f77aa2cb
fix(cli): Force usage of gitea token
All checks were successful
ci / goreleaser (push) Successful in 1m18s
2025-10-02 13:44:28 +02:00
bd3048a9a5
fix(cli): Unset GITHUB_TOKEN and set GITEA_TOKEN instead
Some checks failed
ci / goreleaser (push) Failing after 12s
2025-10-02 13:33:21 +02:00
d7ed7711a8
fix(cli): Changed GITEA_TOKEN to GITHUB_TOKEN
Some checks failed
ci / goreleaser (push) Failing after 1m14s
2025-10-02 13:22:10 +02:00
e5b069c498
fix(cli): Release pipeline using Goreleaser should work now
Some checks failed
ci / goreleaser (push) Failing after 14s
2025-10-02 13:19:40 +02:00
453cf9a33b
fix(release): Downgraded forgejo-release action
Some checks failed
ci / goreleaser (push) Failing after 1m33s
2025-10-01 15:40:11 +02:00
a18da5c940
fix(release): Added all of the config out of desperation
Some checks failed
ci / goreleaser (push) Failing after 1m14s
2025-10-01 15:17:16 +02:00
d25455a4c6
fix(release): Added repo to release action
Some checks failed
ci / goreleaser (push) Failing after 1m32s
2025-10-01 15:04:16 +02:00
ad48211227
fix(release): Removed wrong version setting, Skipping artifact pubish
Some checks failed
ci / goreleaser (push) Failing after 1m15s
2025-10-01 14:55:21 +02:00
6e04ac65bf
fix(release): Set go version in setup action
Some checks failed
ci / goreleaser (push) Failing after 30s
2025-10-01 14:51:09 +02:00
56dbb7a9d5
fix(release): Downgraded checkout action due to node24 issue
Some checks failed
ci / goreleaser (push) Failing after 24s
2025-10-01 14:48:43 +02:00
8b197ea9f5
feat(release): Added forgejo release action
Some checks failed
ci / goreleaser (push) Failing after 6s
2025-10-01 14:42:35 +02:00
a6a41e8d91 feat(goreleaser): fixed changelog messages 2025-10-01 14:20:11 +02:00
f7dd93a629 feat(goreleaser): added first implementation 2025-10-01 13:22:41 +02:00
06ea46b332
feat(sdk, cli): Implemented update endpoints. Added recreate deployment strategy to cli. Fixed tests. 2025-10-01 10:49:15 +02:00
05daaec70d
feat(sdk): Added update endpoints for app and appinst 2025-09-30 12:09:00 +02:00
f9faad4373
chore(cli): Removed appName from config schema. This is redundant to metadata name 2025-09-30 11:33:52 +02:00
6d8ed1f8d5
chore(cli): Added methods to EdgeClientInterface and removed unnecessary typecasting 2025-09-29 18:04:55 +02:00
366fa334af
chore(cli): Moved cli related packages out of sdk. Deleted duplicate files. 2025-09-29 17:35:34 +02:00
f3641e11ea
feat(apply): Implement CLI command with comprehensive deployment workflow
- Add edge-connect apply command with -f/--file and --dry-run flags
- Integrate config parser, deployment planner, and resource manager
- Provide comprehensive error handling and progress reporting
- Support deployment confirmation prompts and result summaries
- Move internal packages to public SDK packages for CLI access
- Update all tests to pass with new package structure
- Complete Phase 4 CLI Command Implementation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-29 17:24:59 +02:00
7e54e56c00
feat(apply): Implement resource management with parallel deployment and rollback
Phase 3 Complete: Resource Management
- Add EdgeConnectResourceManager with deployment execution
- Implement app creation with manifest file processing
- Support parallel instance deployment across multiple cloudlets
- Handle network configuration conversion to SecurityRules
- Add comprehensive rollback functionality for failed deployments
- Include detailed logging and progress tracking
- Create extensive test coverage with mock scenarios

Features:
- Parallel deployment with configurable limits
- Intelligent rollback in reverse order
- Manifest file reading and hash calculation
- Network rule conversion and validation
- Deployment progress tracking and logging
- Comprehensive error handling with detailed messages

Testing:
- 16 test scenarios covering success/failure cases
- Mock client interfaces for reliable testing
- Rollback testing with failure scenarios
- Configuration conversion validation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-29 16:46:34 +02:00
e5563e7ef4
feat(apply): Implement deployment planning with intelligent state comparison
Phase 2 Complete: Deployment Planning
- Add comprehensive deployment plan types with action tracking
- Implement EdgeConnectPlanner with state comparison logic
- Support manifest hash calculation and change detection
- Add parallel infrastructure target planning
- Create deployment summary generation with duration estimates
- Include comprehensive test coverage with mock scenarios
- Handle API errors and edge cases gracefully

Features:
- Smart comparison of current vs desired state
- Minimal API calls through batched queries
- Support for dry-run planning operations
- Detailed deployment summaries with resource counts
- Extensible action types (CREATE, UPDATE, DELETE, NONE)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-29 16:36:21 +02:00
1e1574e6a6
feat(apply): Implement EdgeConnect configuration parsing foundation
- Add comprehensive YAML configuration types for EdgeConnectConfig
- Implement robust parser with validation and path resolution
- Support both k8sApp and dockerApp configurations
- Add comprehensive test coverage with real example parsing
- Create validation for infrastructure uniqueness and port ranges
- Generate instance names following pattern: appName-appVersion-instance

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-29 16:18:35 +02:00
7db520a417 feat(validation): Added validation of baseURL config 2025-09-29 10:48:52 +02:00
03942636c8 feat(validation): Added validation of baseURL config 2025-09-29 10:29:11 +02:00
68b792dca4
Renamed package and removed unused make calls 2025-09-29 09:41:44 +02:00
3745379552
Removed binaries and fixed tests 2025-09-25 17:11:50 +02:00
2ebba4ea22
feat(sdk): Fixed filters. Keys are nested resources in edgecon 2025-09-25 17:08:08 +02:00
60f038e9ab
feat(examples): Add instance state polling with 5-minute timeout
Enhanced comprehensive example to wait for AppInstance deployment completion:

## New Polling Features:
- **State Monitoring**: Polls ShowAppInst every 10 seconds until ready
- **Timeout Protection**: 5-minute maximum wait time with context cancellation
- **Smart State Detection**: Handles Creating, Ready, Running, Error states
- **Progress Feedback**: Real-time status updates during deployment

## Implementation Details:
- **waitForInstanceReady()**: Robust polling function with timeout
- **State Logic**: Exits on non-creating states (Ready, Running, Error)
- **Error Handling**: Distinguishes between polling errors and failure states
- **Context Management**: Proper timeout context with cleanup

## User Experience:
```
5️⃣  Waiting for application instance to be ready...
   Polling instance state (timeout: 5 minutes)...
   📊 Instance state: Creating
   📊 Instance state: Creating (power: PowerOn)
   📊 Instance state: Ready (power: PowerOn)
    Instance reached ready state: Ready
```

This ensures the example demonstrates a complete, realistic deployment
workflow where instance creation is fully completed before proceeding
to subsequent operations.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-25 16:59:24 +02:00
9d3ad3075b
feat(sdk): Fixed test 2025-09-25 16:31:23 +02:00
95b2d62032
feat(sdk): The deploy app example is now working 2025-09-25 16:23:35 +02:00
95b2409146
feat(sdk): improved error messages 2025-09-25 15:32:07 +02:00
25ad2edfcc
feat(sdk): Complete Phase 2 - AppInstance, Cloudlet APIs & CLI integration
Implemented comprehensive EdgeXR SDK with full API coverage and CLI integration:

## New API Coverage:
- **AppInstance Management**: Create, Show, List, Refresh, Delete instances
- **Cloudlet Management**: Create, Show, List, Delete cloudlets
- **Cloudlet Operations**: GetManifest, GetResourceUsage for monitoring
- **Streaming JSON**: Support for EdgeXR's multi-line JSON response format

## API Implementations:
### AppInstance APIs:
- CreateAppInstance → POST /auth/ctrl/CreateAppInst
- ShowAppInstance → POST /auth/ctrl/ShowAppInst
- ShowAppInstances → POST /auth/ctrl/ShowAppInst (multi-result)
- RefreshAppInstance → POST /auth/ctrl/RefreshAppInst
- DeleteAppInstance → POST /auth/ctrl/DeleteAppInst

### Cloudlet APIs:
- CreateCloudlet → POST /auth/ctrl/CreateCloudlet
- ShowCloudlet → POST /auth/ctrl/ShowCloudlet
- ShowCloudlets → POST /auth/ctrl/ShowCloudlet (multi-result)
- DeleteCloudlet → POST /auth/ctrl/DeleteCloudlet
- GetCloudletManifest → POST /auth/ctrl/GetCloudletManifest
- GetCloudletResourceUsage → POST /auth/ctrl/GetCloudletResourceUsage

## CLI Integration:
- **Backward Compatible**: Existing CLI commands work unchanged
- **Enhanced Reliability**: Now uses SDK with retry logic and caching
- **Same Interface**: All flags, config, and behavior preserved
- **Better Errors**: Structured error handling with meaningful messages

## Testing & Examples:
- **Comprehensive Test Suite**: 100+ test cases covering all APIs
- **Mock Servers**: httptest-based integration testing
- **Error Scenarios**: Network failures, auth errors, 404 handling
- **Real Workflow**: Complete app deployment example with cleanup

## Documentation:
- **SDK README**: Complete API reference and usage examples
- **Migration Guide**: Easy transition from existing client
- **Configuration**: All authentication and retry options documented
- **Performance**: Token caching, connection pooling benchmarks

## Quality Features:
- **Type Safety**: No more interface{} - full type definitions
- **Context Support**: Proper timeout/cancellation throughout
- **Error Handling**: Structured APIError with status codes
- **Resilience**: Automatic retry with exponential backoff
- **Observability**: Request logging and metrics hooks

The SDK is now production-ready with comprehensive API coverage,
robust error handling, and seamless CLI integration while maintaining
full backward compatibility.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-25 14:53:43 +02:00
3c88e5a08a
feat(sdk): Add username/password authentication matching existing client
Implemented dynamic token authentication using existing RetrieveToken pattern:

## Authentication Enhancements:
- **UsernamePasswordProvider**: Implements existing `POST /api/v1/login` flow
- **Token Caching**: 1-hour cache with thread-safe refresh logic
- **NewClientWithCredentials()**: Convenience constructor for username/password auth
- **Dual Auth Support**: Both static token and dynamic username/password flows

## Key Features:
- **Exact API Match**: Mirrors existing `client/client.go RetrieveToken()` implementation
- **Thread Safety**: Concurrent token refresh with mutex protection
- **Caching Strategy**: Reduces login calls, configurable expiry
- **Error Handling**: Structured login failures with context
- **Token Invalidation**: Manual cache clearing for token refresh

## Implementation Details:
```go
// Static token (existing)
client := client.NewClient(baseURL,
  client.WithAuthProvider(client.NewStaticTokenProvider(token)))

// Username/password (new - matches existing pattern)
client := client.NewClientWithCredentials(baseURL, username, password)
```

## Testing:
- **Comprehensive Auth Tests**: Login success/failure, caching, expiry
- **Mock Server Tests**: httptest-based token flow validation
- **Concurrent Safety**: Token refresh under concurrent access
- **Updated Examples**: Support both auth methods

## Backward Compatibility:
- Existing StaticTokenProvider unchanged
- All existing APIs maintain same signatures
- Example updated to support both auth methods via environment variables

This matches the existing prototype's authentication exactly while adding
production features like caching and thread safety.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-25 14:21:31 +02:00
9a15f232f6
feat(sdk): Implement EdgeXR Master Controller Go SDK foundation
Phase 1 Implementation - Core SDK foundation with typed APIs:

## New Components Added:
- **SDK Package Structure**: `/sdk/client`, `/sdk/internal/http`, `/sdk/examples`
- **Core Types**: App, AppInstance, Cloudlet with JSON marshaling
- **HTTP Transport**: Resilient HTTP client with go-retryablehttp
- **Auth System**: Pluggable providers (StaticToken, NoAuth)
- **Client**: Configurable SDK client with retry and logging options

## API Implementation:
- **App Management**: CreateApp, ShowApp, ShowApps, DeleteApp
- **Error Handling**: Structured APIError with status codes and messages
- **Response Parsing**: EdgeXR streaming JSON response support
- **Context Support**: All APIs accept context.Context for timeouts/cancellation

## Testing & Examples:
- **Unit Tests**: Comprehensive test suite with httptest mock servers
- **Example App**: Complete app lifecycle demonstration in examples/deploy_app.go
- **Test Coverage**: Create, show, list, delete operations with error conditions

## Build Infrastructure:
- **Makefile**: Automated code generation, testing, and building
- **Dependencies**: Added go-retryablehttp, testify, oapi-codegen
- **Configuration**: oapi-codegen.yaml for type generation

## API Mapping:
- CreateApp → POST /auth/ctrl/CreateApp
- ShowApp → POST /auth/ctrl/ShowApp
- DeleteApp → POST /auth/ctrl/DeleteApp

Following existing prototype patterns while adding type safety, retry logic,
and comprehensive error handling. Ready for Phase 2 AppInstance APIs.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-25 14:05:20 +02:00
c539eb2210
feat(cli): Implement Edge Connect CLI tool
Creates a new command-line interface for managing Edge Connect applications and instances with the following features:

- Configuration management via YAML files and environment variables
- Application lifecycle commands (create, show, list, delete)
- Instance management with cloudlet support
- Improved error handling and authentication flow
- Comprehensive documentation with usage examples

The CLI provides a user-friendly interface for managing Edge Connect resources while following best practices for command-line tool development using Cobra and Viper.
2025-09-18 13:51:09 +02:00
4429f3fa18 feat(client): add basic client, model 2025-09-16 13:02:33 +02:00