On PR merge #12791
Triggered via workflow run
July 21, 2025 12:18
dreamorosi
completed
919063b
Status
Failure
Total duration
25s
Artifacts
–
on_merged_pr.yml
on: workflow_run
get_pr_details
/
export_pr_details
6s
release_label_on_merge
7s
Annotations
1 error
release_label_on_merge
Unable to find related issue for PR number 4188.
Body details: "* Removed `EnvironmentVariablesService` class.\r\n* Replaced repeated environment variable reads with a single `#envConfig` object populated once during `setOptions()`.\r\n* Updated `Metrics.ts` to use `#envConfig` for values like `namespace`, `serviceName`, `functionName`, etc.\r\n* Removed all references to `envVarsService`, including `getEnvVarsService()` and `setEnvVarsService()` methods.\r\n\r\nThis refactor improves runtime performance by avoiding redundant environment variable reads and follows a cleaner, more functional approach. It also aligns with the `setOptions()` pattern for centralized config management and eliminates \\~50 lines of unnecessary code.\r\n\r\n---\r\n\r\n## Summary\r\n\r\n### What’s being changed?\r\n\r\nThis PR removes the verbose class-based `EnvironmentVariablesService` and replaces it with a private, cached `#envConfig` object in the `Metrics` class. The object is populated once during initialization via the `setOptions()` method using functional utilities from `@aws-lambda-powertools/commons/utils/env`.\r\n\r\n### Why?\r\n\r\n* **Performance**: Avoids repeated environment variable lookups at runtime.\r\n* **Code quality**: Cleaner, more maintainable, and aligns with existing config patterns.\r\n* **Consistency**: Follows the tenets of making things explicit, safe, and minimal.\r\n\r\n### Benefits\r\n\r\n* Improved runtime efficiency.\r\n* Simplified implementation.\r\n* Easier to reason about and maintain.\r\n\r\n---\r\n\r\n#4136 \r\n\r\n---\r\n\r\nBy submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.\r\n\r\nDisclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful."
|