Skip to content

Prune the environment when installing an app #15715

Prune the environment when installing an app

Prune the environment when installing an app #15715

Triggered via pull request May 8, 2024 00:20
Status Success
Total duration 10m 34s
Artifacts

ci.yml

on: pull_request
Matrix: Build and Test
Matrix: Jmh CachedDateHeaderBenchmark
Matrix: Jmh CookieDecodeBenchmark
Matrix: Jmh EndpointBenchmark
Matrix: Jmh HttpCollectEval
Matrix: Jmh HttpCombineEval
Matrix: Jmh HttpNestedFlatMapEval
Matrix: Jmh HttpRouteTextPerf
Matrix: Jmh ProbeContentTypeBenchmark
Matrix: Jmh SchemeDecodeBenchmark
Matrix: Jmh ServerInboundHandlerBenchmark
Matrix: Jmh UtilBenchmark
Matrix: Unsafe Scoverage
Matrix: Release Drafter
Matrix: Publish Artifacts
Matrix: Cache Jmh benchmarks
Fit to window
Zoom out
Zoom in

Annotations

2 errors and 1 warning
Release Drafter (ubuntu-latest, 2.13.10, temurin@8)
Resource not accessible by integration { name: 'HttpError', id: '8994111292', status: 403, response: { url: 'https://api.github.com/repos/zio/zio-http/releases', status: 403, headers: { 'access-control-allow-origin': '*', 'access-control-expose-headers': 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset', connection: 'close', 'content-encoding': 'gzip', 'content-security-policy': "default-src 'none'", 'content-type': 'application/json; charset=utf-8', date: 'Wed, 08 May 2024 00:20:47 GMT', 'referrer-policy': 'origin-when-cross-origin, strict-origin-when-cross-origin', server: 'GitHub.com', 'strict-transport-security': 'max-age=31536000; includeSubdomains; preload', 'transfer-encoding': 'chunked', vary: 'Accept-Encoding, Accept, X-Requested-With', 'x-accepted-github-permissions': 'contents=write; contents=write,workflows=write', 'x-content-type-options': 'nosniff', 'x-frame-options': 'deny', 'x-github-api-version-selected': '2022-11-28', 'x-github-media-type': 'github.v3; format=json', 'x-github-request-id': '0CA6:21F144:9713FDE:F830480:663AC55F', 'x-ratelimit-limit': '5000', 'x-ratelimit-remaining': '4980', 'x-ratelimit-reset': '1715128187', 'x-ratelimit-resource': 'core', 'x-ratelimit-used': '20', 'x-xss-protection': '0' }, data: { message: 'Resource not accessible by integration', documentation_url: 'https://docs.github.com/rest/releases/releases#create-a-release' } }, request: { method: 'POST', url: 'https://api.github.com/repos/zio/zio-http/releases', headers: { accept: 'application/vnd.github.v3+json', 'user-agent': 'probot/12.2.5 octokit-core.js/3.5.1 Node.js/16.20.2 (linux; x64)', authorization: 'token [REDACTED]', 'content-type': 'application/json; charset=utf-8' }, body: '{"target_commitish":"refs/pull/2833/merge","name":"v3.0.0 🌈","tag_name":"v3.0.0","body":"## Changes\\n\\n- Update zio-config, zio-config-typesafe to 4.0.2 @scala-steward (#2820)\\n- Add tests to check if the ZIO Runtime is propagated to req execution @kyri-petrou (#2809)\\n- Documentation: \\"Tutorials section >> docs\\" @daveads (#2806)\\n- Add `context` method to request context @987Nabil (#2799)\\n- Cleanup Documentation @khajavi (#2797)\\n- Use current runtime when initializing AppRef @kyri-petrou (#2807)\\n- Documentation of FAQ Page @khajavi (#2795)\\n- breaking: Make `Root` a `PathCodec`, remove `Empty` @erikvanoosten (#2796)\\n- Avoid providing the ZEnvironment on very request @kyri-petrou (#2800)\\n- Deprecate HttpApp and remove internal usage. @987Nabil (#2791)\\n- Fix streaming response compression @kyri-petrou (#2798)\\n- Update zio-schema, zio-schema-json, ... to 1.1.1 @scala-steward (#2794)\\n- Documentation: Reference Section on Sidebar @khajavi (#2785)\\n- Documentation of BinaryCodecs @khajavi (#2793)\\n- Documentation of Testing HTTP Applications @khajavi (#2774)\\n- Showcase for Both Client and Server @khajavi (#2775)\\n- rename enumValues to enum to comply with OSA 3 @lachezar (#2787)\\n- fix doc mixup for ConcreteEntity.scala and CliExamples.scala @YassineMEJRI (#2788)\\n- Update Documentation of Overview Section @khajavi (#2784)\\n- Implement client SSL certificates @WesselVS (#2783)\\n- Provide HandlerAspect context via env instead of function param (#2488) @987Nabil (#2778)\\n- Explicit and customizable error messages for Endpoint BadRequest (#2650) @987Nabil (#2714)\\n- Use `fork` instead of `runOrFork` in NettyRuntime @kyri-petrou (#2782)\\n- Documentation of Endpoint API @khajavi (#2741)\\n- Add the `Date` header to responses by default @kyri-petrou (#2773)\\n- introduce multipart/mixed support @eyalfa (#2765)\\n- Update client3:core to 3.9.5 @scala-stewa
Release Drafter (ubuntu-latest, 2.13.10, temurin@8)
HttpError: Resource not accessible by integration at /home/runner/work/_actions/release-drafter/release-drafter/v5/dist/index.js:8462:21 at processTicksAndRejections (node:internal/process/task_queues:96:5) at async Job.doExecute (/home/runner/work/_actions/release-drafter/release-drafter/v5/dist/index.js:30793:18) { name: 'AggregateError', event: { id: '8994111292', name: 'pull_request', payload: { action: 'edited', changes: { body: { from: 'Hi team 👋\r\n' + '\r\n' + '## Context\r\n' + '\r\n' + "There is a bug that's been around for some time (probably since the 0.x days) that I never paid too much attention to before because I didn't understand much about ZIO.\r\n" + '\r\n' + "Currently, when we bootstrap / wire an app, we provide the current `ZEnvironment` in the NettyRuntime. This environment, however, contains pretty much all the services that were used to wire the app. Let's take the following app as an example:\r\n" + '\r\n' + '```scala\r\n' + 'object HelloWorld extends ZIOAppDefault {\r\n' + ' final class Service {\r\n' + ' def printEnv: UIO[Unit] = ZIO.environment.debug.unit\r\n' + ' }\r\n' + '\r\n' + ' val homeRoute = Method.GET / Root -> handler(ZIO.serviceWithZIO[Service](_.printEnv.as(Response.text("foo"))))\r\n' + '\r\n' + ' override val run =\r\n' + ' Server.serve(Routes(homeRoute)).provide(Server.default, ZLayer.succeed(new Service))\r\n' + '}\r\n' + '```\r\n' + '\r\n' + 'In this case, sending a request to the server will print the following in the console. As you can see, the environment contains 6 services in this case, where in theory it should only be containing our `Service`.\r\n' + '\r\n' + '```\r\n' + 'ZEnvironment(EventLoopGroup -> io.netty.channel.nio.NioEventLoopGroup@81f8e, ChannelFactory[=ServerChannel] -> zio.http.netty.ChannelFactories$$anon$1@41f33ad, Server::Config -> Config(None,0.0.0.0/0.0.0.0:8080,false,true,No,None,Disabled(102400),4096,8192,true,PT10S,WebSocketConfig(None,10000,-1,true,NormalClosure,true,SocketDecoder(65536,true,false,false,true,true)),None), NettyConfig -> NettyConfig(SIMPLE,AUTO,0,PT2S,PT15S), HelloWorld::Service -> example.HelloWorld$Service@55615130, Server -> ServerLive(NettyDriver(Config(None,0.0.0.0/0.0.0.0:8080,false,true,No,None,Disabled(102400),4096,8192,true,PT10S,WebSocketConfig(None,10000,-1,true,NormalClosure,true,SocketDecoder(65536,true,false,false,true,true)),None)),8080))\r\n' + '```\r\n' + '\r\n' + '## Main change\r\n' + '\r\n' + 'The changes in this PR ensure that the environment is pruned to contained only the services that are required to run the app. The downside to this is that we require an implicit `EnvironmentTag` now in the `install` and `serve` methods. I think that in most cases this should be okay, since most users would be using `install` or `serve` when R is statically known.\r\n' + '\r\n' + '### Alternative approach (no breaking changes)\r\n' + '\r\n' + "An alternative that doesn't involve breaking changes would be to revert the implicit `EnvironmentTag` changes, and keep only the change made to `AppRef`. This way, we leave it up to the user to properly clean the environment prior to calling `serve` or `install`. The downside to this is that it's unlikely that users will do this" } }, number: 2833, organization: { avatar_url: 'https://avatars.githubusercontent.com/u/49655448?v=4', description: 'ZIO — Real World Functional Programming', events_url: 'https://api.github.com/orgs/zio/events', hooks_url: 'https://api.github.com/orgs/zio/hooks', id: 49655448, issues_url: 'https://api.github.com/orgs
Release Drafter (ubuntu-latest, 2.13.10, temurin@8)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: release-drafter/release-drafter@v5. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.