Commit graph

62 commits

Author SHA1 Message Date
df697c0ff6 fix(sdk): correct delete payload structure for v2 API and add delete command
The v2 API requires a different JSON payload structure than what was being sent.
Both DeleteApp and DeleteAppInstance needed to wrap their parameters properly.

SDK Changes:
- Update DeleteAppInput to use {region, app: {key}} structure
- Update DeleteAppInstanceInput to use {region, appinst: {key}} structure
- Fix DeleteApp method to populate new payload structure
- Fix DeleteAppInstance method to populate new payload structure

CLI Changes:
- Add delete command with -f flag for config file specification
- Support --dry-run to preview deletions
- Support --auto-approve to skip confirmation
- Implement v1 and v2 API support following same pattern as apply
- Add deletion planner to discover resources matching config
- Add resource manager to execute deletions (instances first, then app)

Test Changes:
- Update example_test.go to use EdgeConnectConfig_v1.yaml
- All tests passing including comprehensive delete test coverage

Verified working with manual API testing against live endpoint.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-20 15:15:23 +02:00
f921169351 feat(examples): added edge connect v1 and v2 examples 2025-10-20 14:29:45 +02:00
98a8c4db4a feat(apply): add v1 API support to apply command
Refactor apply command to support both v1 and v2 APIs:
- Split internal/apply into v1 and v2 subdirectories
- v1: Uses sdk/edgeconnect (from revision/v1 branch)
- v2: Uses sdk/edgeconnect/v2
- Update cmd/apply.go to route to appropriate version based on api_version config
- Both versions now fully functional with their respective API endpoints

Changes:
- Created internal/apply/v1/ with v1 SDK implementation
- Created internal/apply/v2/ with v2 SDK implementation
- Updated cmd/apply.go with runApplyV1() and runApplyV2() functions
- Removed validation error that rejected v1
- Apply command now respects --api-version flag and config setting

Testing:
- V1 with edge.platform:  Generates deployment plan correctly
- V2 with orca.platform:  Works as before

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-20 13:57:57 +02:00
59ba5ffb02 fix(apply): add validation to reject v1 API version
The apply command requires v2 API features and cannot work with v1.
Add early validation to provide a clear error message when users try
to use apply with --api-version v1, instead of failing with a cryptic
403 Forbidden error.

Error message explains that apply only supports v2 and guides users
to use --api-version v2 or remove the api_version setting.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-20 13:49:09 +02:00
2a8e99eb63 feat(config): add API version selector for v1 and v2
Add configurable API version selection with three methods:
- Config file: api_version: "v1" or "v2" in .edge-connect.yaml
- CLI flag: --api-version v1/v2
- Environment variable: EDGE_CONNECT_API_VERSION=v1/v2

Changes:
- Update root.go to add api_version config and env var support
- Update app.go and instance.go to support both v1 and v2 clients
- Add example config file with api_version documentation
- Default to v2 for backward compatibility
- Apply command always uses v2 (advanced feature)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-20 13:41:50 +02:00
3486b2228d refactor(sdk): restructure to follow Go module versioning conventions
Reorganize SDK to support both v1 and v2 APIs following Go conventions:
- sdk/edgeconnect/ now contains v1 SDK (from revision/v1 branch)
- sdk/edgeconnect/v2/ contains v2 SDK with package v2
- Update all CLI and internal imports to use v2 path
- Update SDK examples and documentation for v2 import path

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-20 13:34:22 +02:00
1413836b68 feat(swagger_v2): added support for the orca staging environment 2025-10-20 13:12:06 +02:00
0f71239db6 doc(api): rename current swagger to _v2, add old swagger as _v1 2025-10-20 10:05:24 +02:00
dbf7ccb0d6 chore(http-timeout): removed timeout functionality when calling the API as it was not needed and malfunctional
All checks were successful
ci / goreleaser (push) Successful in 59s
2025-10-17 12:01:47 +02:00
5f54082813 doc(create-appinstance): added documentation of the correct parsing of an errorneous app instance creation response 2025-10-16 17:42:29 +02:00
0b31409b26 feat(parser): add result parser of createappinstance and added a configurable timeout for that function 2025-10-16 11:12:57 +02:00
8f6fd94442 feat(edge-connect): Added Forgejo Runner Deployment in Edge Connect Example 2025-10-15 16:00:38 +02:00
4ded2e193e feat(ec-api): new swagger from EC (Alex) with changes update app and appinstances. They call it 2.0 which already was delivered.
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
c7b1284606 fix(test): finish fixing organisation refactoring tests failures 2025-10-07 17:21:38 +02:00
921822239b fix(test): finish fixing organisation refactoring tests failures 2025-10-07 17:19:52 +02:00
f32479aaf8 fix(test): fixed compile errors 2025-10-07 17:09:36 +02:00
a72341356b fix(test): started fixing tests 2025-10-07 17:05:35 +02:00
bc524c3b0e refactor(yaml): Moved organisation to metadata 2025-10-07 16:30:57 +02:00
0f3cc90b01 ci: Added test workflow running on each push except tags 2025-10-07 16:10:02 +02:00
06f921963a refactor(yaml): moved AppVersion into metadata 2025-10-07 16:01:38 +02:00
cc8b9e791b fix(cli): Fixed tests after outputting plan diff 2025-10-07 15:40:27 +02:00
f635157d67 chore: Added flake 2025-10-07 14:37:54 +02:00
e092f352f8 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
6de170f6cf feat(cli): Added output of diff when updating outboundConnections in the desired manifest 2025-10-06 16:45:53 +02:00
393977c7fc feat(cli): Added an auto approve flag for apply
All checks were successful
ci / goreleaser (push) Successful in 1m52s
2025-10-02 14:52:40 +02:00
e061883c32 fix(cli): Run tests before release
All checks were successful
ci / goreleaser (push) Successful in 1m19s
2025-10-02 13:50:28 +02:00
38c08ccf00 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
6a66c8659b fix(cli): Unset GITHUB_TOKEN and set GITEA_TOKEN instead 2025-10-02 13:33:21 +02:00
7085667d31 fix(cli): Changed GITEA_TOKEN to GITHUB_TOKEN
Some checks failed
ci / goreleaser (push) Failing after 1m19s
2025-10-02 13:22:10 +02:00
a56360eacc fix(cli): Release pipeline using Goreleaser should work now 2025-10-02 13:19:40 +02:00
2f52257f1a fix(release): Downgraded forgejo-release action
Some checks failed
ci / goreleaser (push) Failing after 38s
2025-10-01 15:40:11 +02:00
be22a018d3 fix(release): Added all of the config out of desperation 2025-10-01 15:17:16 +02:00
81cbca153e fix(release): Added repo to release action 2025-10-01 15:04:16 +02:00
8a0c201b74 fix(release): Removed wrong version setting, Skipping artifact pubish 2025-10-01 14:55:21 +02:00
7936d2b845 fix(release): Set go version in setup action 2025-10-01 14:51:09 +02:00
b80c424840 fix(release): Downgraded checkout action due to node24 issue 2025-10-01 14:48:43 +02:00
54cc8caf1a feat(release): Added forgejo release action 2025-10-01 14:42:35 +02:00
72f9806e32 feat(goreleaser): fixed changelog messages 2025-10-01 14:20:11 +02:00
7da4e23b57 feat(goreleaser): added first implementation 2025-10-01 13:22:41 +02:00
7bfdeba49f feat(sdk, cli): Implemented update endpoints. Added recreate deployment strategy to cli. Fixed tests. 2025-10-01 10:49:15 +02:00
240a9028b3 feat(sdk): Added update endpoints for app and appinst 2025-09-30 12:09:00 +02:00
5d6fd8fc59 chore(cli): Removed appName from config schema. This is redundant to metadata name 2025-09-30 11:33:52 +02:00
5f0eccd315 chore(cli): Added methods to EdgeClientInterface and removed unnecessary typecasting 2025-09-29 18:04:55 +02:00
42ae3f61d9 chore(cli): Moved cli related packages out of sdk. Deleted duplicate files. 2025-09-29 17:35:34 +02:00
8b02fe54e5 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
8bfcd07ea4 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
02767adccd 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
1e48e1b059 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
37df99810b feat(validation): Added validation of baseURL config 2025-09-29 10:48:52 +02:00
053de33fa7 feat(validation): Added validation of baseURL config 2025-09-29 10:29:11 +02:00