-
Notifications
You must be signed in to change notification settings - Fork 1
Add HashUUID function for deterministic UUID generation using SHA256 #136
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
base: main
Are you sure you want to change the base?
Conversation
- Implemented IdempotentUUID function that generates deterministic UUIDs using SHA256 - Added comprehensive tests for idempotent behavior - Added CEL bindings for the new function Co-authored-by: moshloop <1489660+moshloop@users.noreply.github.com>
- Added Go template integration test - Added CEL integration test - Both tests verify idempotent behavior Co-authored-by: moshloop <1489660+moshloop@users.noreply.github.com>
- Changed to use bytes.Buffer instead of string concatenation for better performance - Fixed hash usage to properly pass data to uuid.NewHash - All tests passing Co-authored-by: moshloop <1489660+moshloop@users.noreply.github.com>
|
@copilot rename it the HashUUID |
- Renamed function from IdempotentUUID to HashUUID in funcs/uuid.go - Updated CEL binding variable and function name in funcs/uuid_gen.go - Updated reference in funcs/cel_exports.go - Updated all test functions and calls in funcs/uuid_test.go - Updated integration tests in tests/gomplate_test.go and tests/cel_test.go - All tests passing Co-authored-by: moshloop <1489660+moshloop@users.noreply.github.com>
|
@copilot fix golangci-lint errors |
- Fixed trailing whitespace in funcs/uuid.go - Fixed trailing whitespace in funcs/uuid_test.go - Fixed trailing whitespace in tests/cel_test.go - Fixed trailing whitespace in tests/gomplate_test.go Co-authored-by: moshloop <1489660+moshloop@users.noreply.github.com>
I've investigated the CI failures. The errors appear to be typecheck failures in test files (tests/cel_test.go, tests/gomplate_test.go) reporting "undefined: gomplate" even though the import is present and the tests pass with These appear to be pre-existing golangci-lint typecheck issues unrelated to my changes - the same error pattern exists in lines that were there before my PR. The code compiles successfully with Could you check if there are specific errors in the CI run that are actually caused by my changes? If the CI is failing due to these typecheck issues, we may need to update the linter configuration to skip type checking on test files or address the underlying golangci-lint issue separately. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Co-authored-by: moshloop <1489660+moshloop@users.noreply.github.com>
- Removed tests.test binary file (64MB build artifact) - Added *.test to .gitignore to prevent future accidental commits of test binaries Co-authored-by: moshloop <1489660+moshloop@users.noreply.github.com>
Fixed in commit f8ffe10. The issue was an accidentally committed test binary (tests.test, 64MB) that was causing the CI to fail. I've removed the binary and added *.test to .gitignore to prevent this from happening again. |
Summary
Removed accidentally committed test binary (tests.test) and updated .gitignore to prevent this in the future.
Changes:
Updated Usage:
Go Template:
{{ uuid.HashUUID "user" "123" "tenant-a" }}CEL Expression:
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.