Skip to content

Update falcon 0.48.6 → 0.51.1 (major)#776

Closed
depfu[bot] wants to merge 1 commit intomasterfrom
depfu/update/falcon-0.51.1
Closed

Update falcon 0.48.6 → 0.51.1 (major)#776
depfu[bot] wants to merge 1 commit intomasterfrom
depfu/update/falcon-0.51.1

Conversation

@depfu
Copy link
Copy Markdown
Contributor

@depfu depfu bot commented Mar 9, 2025

Here is everything you need to know about this update. Please take a good look at what changed and the test results before merging this pull request.

What changed?

✳️ falcon (0.48.6 → 0.51.1) · Repo · Changelog

Release Notes

0.51.0 (from changelog)

  • Introduce {ruby Falcon::Environment::Server#make_server} which gives you full control over the server creation process.

Introduce Async::Container::Supervisor.

Async::Container::Supervisor is a new supervisor implementation that replaces Falcon's own supervisor. This allows you to use the same supervisor for all your services, and provides a more consistent interface for managing services. The supervisor is now a separate gem, async-container-supervisor.

By default, the supervisor does not perform any monitoring, but you may add monitoring by defining them in the service definition. For example:

service "hello.localhost" do
# Configure server...

<span class="pl-en">include</span> <span class="pl-v">Async</span>::<span class="pl-v">Container</span>::<span class="pl-v">Supervisor</span>::<span class="pl-v">Supervised</span>

end

service "supervisor" do
include Async::Container::Supervisor::Environment

<span class="pl-en">monitors</span> <span class="pl-k">do</span>
	<span class="pl-kos">[</span>
		<span class="pl-c"># Limit total memory usage to 512MiB:</span>
		<span class="pl-v">Async</span>::<span class="pl-v">Container</span>::<span class="pl-v">Supervisor</span>::<span class="pl-v">MemoryMonitor</span><span class="pl-kos">.</span><span class="pl-en">new</span><span class="pl-kos">(</span><span class="pl-pds">interval</span>: <span class="pl-c1">10</span><span class="pl-kos">,</span> <span class="pl-pds">limit</span>: <span class="pl-c1">1024</span> * <span class="pl-c1">1024</span> * <span class="pl-c1">512</span><span class="pl-kos">)</span><span class="pl-kos">,</span>
	<span class="pl-kos">]</span>
<span class="pl-k">end</span>

end

We retain the falcon:supervisor:restart task, but you may prefer to use async:container:supervisor:restart directly.

0.50.0 (from changelog)

  • Add {ruby Falcon::Environment::Server#endpoint_options} to allow configuration of the endpoint options more easily.

0.49.0 (from changelog)

Falcon Server Container Health Checks

{ruby Falcon::Service::Server} adds support for the {ruby Async::Container} health check which detects hung processes and restarts them. The default health check interval is 30 seconds.

falcon serve introduces a new --health-check-timeout option to configure the health check timeout. falcon.rb/falcon host can be changed using the health_check_timeout key within the container_options configuration - these are passed directly to {ruby Async::Container}. If you don't want a health check, set health_check_timeout to nil.

Falcon Server Process Title

The Falcon server process title is now updated periodically (alongside the health check) to include information about the numnber of connections and requests.

12211 ttys002    0:00.28 /Users/samuel/.gem/ruby/3.4.1/bin/falcon serve --bind http://localhost:8000      
12213 ttys002    0:04.14 http://localhost:8000 (C=2/2 R=0/49.45K L=0.353)
12214 ttys002    0:07.22 http://localhost:8000 (C=5/6 R=0/112.97K L=0.534)
12215 ttys002    0:05.41 http://localhost:8000 (C=3/3 R=0/71.7K L=0.439)
12216 ttys002    0:06.46 http://localhost:8000 (C=4/5 R=0/93.22K L=0.493)
12217 ttys002    0:02.58 http://localhost:8000 (C=1/1 R=0/24.9K L=0.251)
12218 ttys002    0:05.44 http://localhost:8000 (C=3/3 R=0/72.12K L=0.439)
12219 ttys002    0:06.47 http://localhost:8000 (C=4/4 R=0/93.13K L=0.493)
12220 ttys002    0:04.03 http://localhost:8000 (C=2/2 R=0/47.37K L=0.357)
12221 ttys002    0:06.41 http://localhost:8000 (C=4/4 R=0/92.46K L=0.494)
12222 ttys002    0:06.38 http://localhost:8000 (C=4/4 R=0/91.71K L=0.495)
  • C – Connections: (current/total) connections accepted by the server
  • R – Requests: (current/total) requests processed by the server
  • L – Scheduler Load: A floating-point value representing the event loop load

Note, if you are using htop, you should enable "Setup" → "Display Options" → "[x] Update process names on every refresh" otherwise the process title will not be updated.

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ async (indirect, 2.23.0 → 2.24.0) · Repo · Changelog

Release Notes

2.24.0 (from changelog)

  • Ruby v3.1 support is dropped.
  • Async::Wrapper which was previously deprecated, is now removed.

Flexible Timeouts

When {ruby Async::Scheduler#with_timeout} is invoked with a block, it can receive a {ruby Async::Timeout} instance. This allows you to adjust or cancel the timeout while the block is executing. This is useful for long-running tasks that may need to adjust their timeout based on external factors.

Async do
Async::Scheduler.with_timeout(5) do |timeout|
# Do some work that may take a while...

	<span class="pl-k">if</span> <span class="pl-en">some_condition</span>
		<span class="pl-s1">timeout</span><span class="pl-kos">.</span><span class="pl-en">cancel!</span> <span class="pl-c"># Cancel the timeout</span>
	<span class="pl-k">else</span>
		<span class="pl-c"># Add 10 seconds to the current timeout:</span>
		<span class="pl-s1">timeout</span><span class="pl-kos">.</span><span class="pl-en">adjust</span><span class="pl-kos">(</span><span class="pl-c1">10</span><span class="pl-kos">)</span>
	&lt;span class="pl-c"&gt;# Reduce the timeout by 10 seconds:&lt;/span&gt;
	&lt;span class="pl-s1"&gt;timeout&lt;/span&gt;&lt;span class="pl-kos"&gt;.&lt;/span&gt;&lt;span class="pl-en"&gt;adjust&lt;/span&gt;&lt;span class="pl-kos"&gt;(&lt;/span&gt;-&lt;span class="pl-c1"&gt;10&lt;/span&gt;&lt;span class="pl-kos"&gt;)&lt;/span&gt;
	
	&lt;span class="pl-c"&gt;# Set the timeout to 10 seconds from now:&lt;/span&gt;
	&lt;span class="pl-s1"&gt;timeout&lt;/span&gt;&lt;span class="pl-kos"&gt;.&lt;/span&gt;&lt;span class="pl-en"&gt;duration&lt;/span&gt; &lt;span class="pl-c1"&gt;=&lt;/span&gt; &lt;span class="pl-c1"&gt;10&lt;/span&gt;
	
	&lt;span class="pl-c"&gt;# Increase the current duration:&lt;/span&gt;
	&lt;span class="pl-s1"&gt;timeout&lt;/span&gt;&lt;span class="pl-kos"&gt;.&lt;/span&gt;&lt;span class="pl-en"&gt;duration&lt;/span&gt; += &lt;span class="pl-c1"&gt;10&lt;/span&gt;
&lt;span class="pl-k"&gt;end&lt;/span&gt;

<span class="pl-k">end</span>

end

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ async-container (indirect, 0.18.3 → 0.24.0) · Repo · Changelog

Release Notes

0.24.0 (from changelog)

  • Add support for health check failure metrics.

0.23.0 (from changelog)

Add support for NOTIFY_LOG for Kubernetes readiness probes.

You may specify a NOTIFY_LOG environment variable to enable readiness logging to a log file. This can be used for Kubernetes readiness probes, e.g.

containers:
	- name: falcon
		env:
			- name: NOTIFY_LOG
				value: "/tmp/notify.log"
		command: ["falcon", "host"]
		readinessProbe:
			exec:
				command: ["sh", "-c", "grep -q '\"ready\":true' /tmp/notify.log"]
			initialDelaySeconds: 5
			periodSeconds: 5
			failureThreshold: 12

0.21.0 (from changelog)

  • Use SIGKILL/Thread#kill when the health check fails. In some cases, SIGTERM may not be sufficient to terminate a process because the signal can be ignored or the process may be in an uninterruptible state.

0.20.1 (from changelog)

  • Fix compatibility between {ruby Async::Container::Hybrid} and the health check.
  • {ruby Async::Container::Generic#initialize} passes unused arguments through to {ruby Async::Container::Group}.

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ async-http (indirect, 0.87.0 → 0.89.0) · Repo · Changelog

Release Notes

0.88.0 (from changelog)

Support custom protocols with options

{ruby Async::HTTP::Protocol} contains classes for specific protocols, e.g. {ruby Async::HTTP::Protocol::HTTP1} and {ruby Async::HTTP::Protocol::HTTP2}. It also contains classes for aggregating protocols, e.g. {ruby Async::HTTP::Protocol::HTTP} and {ruby Async::HTTP::Protocol::HTTPS}. They serve as factories for creating client and server instances.

These classes are now configurable with various options, which are passed as keyword arguments to the relevant connection classes. For example, to configure an HTTP/1.1 protocol without keep-alive:

protocol = Async::HTTP::Protocol::HTTP1.new(persistent: false, maximum_line_length: 32)
endpoint = Async::HTTP::Endpoint.parse("http://localhost:9292", protocol: protocol)
server = Async::HTTP::Server.for(endpoint) do |request|
	Protocol::HTTP::Response[200, {}, ["Hello, world"]]
end.run

Making a request to the server will now close the connection after the response is received:

> curl -v http://localhost:9292
* Host localhost:9292 was resolved.
* IPv6: ::1
* IPv4: 127.0.0.1
*   Trying [::1]:9292...
* Connected to localhost (::1) port 9292
* using HTTP/1.x
> GET / HTTP/1.1
> Host: localhost:9292
> User-Agent: curl/8.12.1
> Accept: */*
> 
* Request completely sent off
< HTTP/1.1 200 OK
< connection: close
< content-length: 12
< 
* shutting down connection #0
Hello, world

In addition, any line longer than 32 bytes will be rejected:

curl -v http://localhost:9292/012345678901234567890123456789012
* Host localhost:9292 was resolved.
* IPv6: ::1
* IPv4: 127.0.0.1
*   Trying [::1]:9292...
* Connected to localhost (::1) port 9292
* using HTTP/1.x
> GET /012345678901234567890123456789012 HTTP/1.1
> Host: localhost:9292
> User-Agent: curl/8.12.1
> Accept: */*
> 
* Request completely sent off
* Empty reply from server
* shutting down connection #0
curl: (52) Empty reply from server

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ async-http-cache (indirect, 0.4.4 → 0.4.5) · Repo

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ async-service (indirect, 0.12.0 → 0.13.0)

Sorry, we couldn't find anything useful about this release.

↗️ console (indirect, 1.29.3 → 1.30.2) · Repo · Changelog

Release Notes

1.30.0 (from changelog)

Introduce Console::Config for fine grained configuration.

Introduced a new explicit configuration interface via config/console.rb to enhance logging setup in complex applications. This update gives the application code an opportunity to load files if required and control aspects such as log level, output, and more. Users can override default behaviors (e.g., make_output, make_logger, and log_level) for improved customization.

# config/console.rb
def log_level(env = ENV)
# Set a custom log level, e.g., force debug mode:
:debug
end

def make_logger(output = $stderr, env = ENV, **options)
# Custom logger configuration with verbose output:
options[:verbose] = true

 <span class="pl-v">Logger</span><span class="pl-kos">.</span><span class="pl-en">new</span><span class="pl-kos">(</span><span class="pl-s1">output</span><span class="pl-kos">,</span> **<span class="pl-s1">options</span><span class="pl-kos">)</span>

end

This approach provides a standard way to hook into the log setup process, allowing tailored adjustments for reliable and customizable logging behavior.

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ fiber-storage (indirect, 1.0.0 → 1.0.1) · Repo

Sorry, we couldn't find anything useful about this release.

↗️ io-endpoint (indirect, 0.14.0 → 0.15.2) · Repo

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ io-event (indirect, 1.9.0 → 1.10.0) · Repo · Changelog

Release Notes

1.10.0 (from changelog)

  • IO::Event::Profiler is moved to dedicated gem: fiber-profiler.
  • Perform runtime checks for native selectors to ensure they are supported in the current environment. While compile-time checks determine availability, restrictions like seccomp and SELinux may still prevent them from working.

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ json (indirect, 2.10.2 → 2.11.3) · Repo · Changelog

Release Notes

2.11.3 (from changelog)

  • Fix a regression in JSON.pretty_generate that could cause indentation to be off once some #to_json has been called.

2.11.2 (from changelog)

  • Add back JSON::PRETTY_STATE_PROTOTYPE. This constant was private API but is used by popular gems like multi_json. It now emits a deprecation warning.

2.11.1

What's Changed

  • Add back JSON.restore, JSON.unparse, JSON.fast_unparse and JSON.pretty_unparse.
    These were deprecated 16 years ago, but never emited warnings, only undocumented, so are
    still used by a few gems.

Full Changelog: v2.11.0...v2.11.1

2.11.0

What's Changed

  • Optimize Integer generation to be ~1.8x faster.
  • Optimize Float generation to be ~10x faster.
  • Fix JSON.load proc argument to substitute the parsed object with the return value.
    This better match Marshal.load behavior.
  • Deprecate JSON.fast_generate (it's not any faster, so pointless).
  • Deprecate JSON.load_default_options.
  • Deprecate JSON.unsafe_load_default_options.
  • Deprecate JSON.dump_default_options.
  • Deprecate Kernel#j
  • Deprecate Kernel#jj
  • Remove outdated JSON.iconv.
  • Remove Class#json_creatable? monkey patch.
  • Remove deprecated JSON.restore method.
  • Remove deprecated JSON.unparse method.
  • Remove deprecated JSON.fast_unparse method.
  • Remove deprecated JSON.pretty_unparse method.
  • Remove deprecated JSON::UnparserError constant.
  • Remove outdated JSON::MissingUnicodeSupport constant.

Full Changelog: v2.10.2...v2.11.0

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ localhost (indirect, 1.3.1 → 1.5.0) · Repo · Changelog

Release Notes

1.4.0 (from changelog)

  • Add localhost:purge to delete all certificates.
  • Add localhost:install to install the issuer certificate in the local trust store.

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ mapping (indirect, 1.1.1 → 1.1.3) · Repo · Changelog

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ metrics (indirect, 0.12.1 → 0.12.2) · Repo

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ protocol-http (indirect, 0.49.0 → 0.50.1) · Repo · Changelog

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ protocol-http1 (indirect, 0.30.0 → 0.34.0) · Repo

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ protocol-rack (indirect, 0.11.1 → 0.12.0) · Repo · Changelog

Release Notes

0.12.0 (from changelog)

  • Ignore (and close) response bodies for status codes that don't allow them.

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

🆕 async-container-supervisor (added, 0.5.1)

🆕 memory-leak (added, 0.5.2)

🗑️ process-metrics (removed)


Depfu Status

Depfu will automatically keep this PR conflict-free, as long as you don't add any commits to this branch yourself. You can also trigger a rebase manually by commenting with @depfu rebase.

All Depfu comment commands
@​depfu rebase
Rebases against your default branch and redoes this update
@​depfu recreate
Recreates this PR, overwriting any edits that you've made to it
@​depfu merge
Merges this PR once your tests are passing and conflicts are resolved
@​depfu cancel merge
Cancels automatic merging of this PR
@​depfu close
Closes this PR and deletes the branch
@​depfu reopen
Restores the branch and reopens this PR (if it's closed)
@​depfu pause
Ignores all future updates for this dependency and closes this PR
@​depfu pause [minor|major]
Ignores all future minor/major updates for this dependency and closes this PR
@​depfu resume
Future versions of this dependency will create PRs again (leaves this PR as is)
Go to the Depfu Dashboard to see the state of your dependencies and to customize how Depfu works.

@depfu depfu bot added the depfu label Mar 9, 2025
@depfu depfu bot force-pushed the depfu/update/falcon-0.51.1 branch from 0fe6730 to fa9a5ab Compare May 8, 2025 16:42
@depfu
Copy link
Copy Markdown
Contributor Author

depfu bot commented Jul 15, 2025

Closed in favor of #809.

@depfu depfu bot closed this Jul 15, 2025
@depfu depfu bot deleted the depfu/update/falcon-0.51.1 branch July 15, 2025 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants