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

Windows Support on Build and all of the Tests and Adding Windows to CI #1214

Closed
wants to merge 45 commits into from

Conversation

zelosleone
Copy link

  • Updated Cargo.toml to upgrade rustls to version 0.23.20, added rustls-native-certs and rustls-pemfile dependencies, and updated wasm-wave to version 0.222.0 (wasm was possible thanks to @vigoo )
  • Patched the crate poule for managing a pool of reusable values. Refactor memory management and improve platform compatibility for Windows sozu-proxy/poule#4 It passes their tests on local.
  • Enhanced GitHub Actions CI configuration to support builds on both Ubuntu and Windows, including conditional steps for Redis setup based on the OS.
  • Improved test execution strategy by implementing a matrix build for various OS environments. Removed docker requirements by adding fallbacks on windows, docker and redis can be used on windows but its not required! Also added new proxy module for windows specific windows-sys their docs can be found here: https://docs.rs/windows-sys/0.59.0/windows_sys/Win32/Foundation/index.html
  • Refactored paths and dependencies in multiple modules to ensure compatibility across platforms.

/claim #1210

Deleted codes are mainly from my OpenAPI export module branch. As this is the "windowsbuild" branch, openapi export remains in the main branch of my fork.

Plus unit tests, some documentation.
* Delete client-generation-tests directory
* Update openapi_converter.rs
* Update openapi_export.rs
* Update rib_converter.rs
* Update openapi_export.rs
* Update openapi_converter.rs
* Update swagger_ui.rs
* Delete golem-worker-service-base/src/gateway_api_definition/http/tests directory
* Update mod.rs
* Update mod.rs
* Create openapi-integration-tests.yaml
* Update openapi-integration-tests.yaml
* Update rib_converter.rs
- Added multiple new test files for API integration, OpenAPI conversion, and schema validation.
- Introduced new test cases for complex workflows and validation of JSON schemas against OpenAPI specifications.
- Updated `Cargo.toml` to include additional dependencies for testing and API functionality.
- Removed outdated tests related to Swagger UI and OpenAPI export.
- Improved the structure and organization of test cases for better maintainability and clarity.
…n (finally manually tested, 5/7 tests passed, couldnt test it further because of RAM size)

- Updated `Cargo.toml` to enable harness for multiple test cases.
- Refactored `openapi_converter.rs` to improve path merging logic and component handling.
- Enhanced test cases across various modules, including API integration, OpenAPI conversion, and JSON schema validation, to utilize a dynamic test registration framework.
- Improved test structure for clarity and maintainability, ensuring comprehensive coverage of complex workflows and validation scenarios.
- Removed outdated tests and streamlined existing ones for better performance.
- Updated `Cargo.toml` to enable harness for multiple test cases and adjusted test configurations.
- Refactored `rib_converter.rs` to improve schema conversion logic, including the addition of new types and validation mechanisms.
- Enhanced test cases across various modules, including API integration, OpenAPI conversion, and JSON schema validation, to utilize a dynamic test registration framework.
- Improved the structure and organization of tests for better maintainability and clarity, ensuring comprehensive coverage of complex workflows and validation scenarios.
- Removed outdated tests and streamlined existing ones for better performance and reliability.
- Updated `Cargo.toml` to upgrade `rustls` to version 0.23.20, added `rustls-native-certs` and `rustls-pemfile` dependencies.
- Introduced a new crate `poule` for managing a pool of reusable values.
- Enhanced GitHub Actions CI configuration to support builds on both Ubuntu and Windows, including conditional steps for Redis setup based on the OS.
- Improved test execution strategy by implementing a matrix build for various OS environments.
- Refactored paths and dependencies in multiple modules to ensure compatibility across platforms.
Fixed CWE-676 in the codebase as well for better memory management and security
- Added null check for memory allocation to prevent potential crashes.
- Ensured proper string termination when copying from input structure.
- Replaced localtime with localtime_r for thread safety in time retrieval.
- Freed allocated memory to prevent memory leaks.
@zelosleone
Copy link
Author

There was a security and memory leak issue in the original golem repo https://cwe.mitre.org/data/definitions/676.html#Vulnerability_Mapping_Notes_676

Fixed that as well.

@jdegoes
Copy link
Contributor

jdegoes commented Jan 1, 2025

@zelosleone There are quite a few serious failures in the CI build. If possible, I would recommend to try to get Github Actions working in your own fork, so you have a fast way to test. I can kick off a CI build from time to time here on golemcloud, but it will probably be about 1x per day, which is not very good for iteration.

@zelosleone zelosleone closed this by deleting the head repository Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants