amoghrajesh commented on code in PR #77143:
URL: https://github.com/apache/airflow/pull/77143#discussion_r4614355772
##########
registry/src/js/operator-filters.js:
##########
@@ -17,48 +17,65 @@
* under the License.
*/
-// Filters for the /durable/ page. State lives in the query string
-// (?capability=deferrable&provider=amazon&type=sensor&q=glue) so a filtered
-// view can be shared.
+// Filters for the /operators/ page. State lives in the query string
+// (?capability=durable&provider=amazon&type=sensor&q=glue) so a filtered
+// view can be shared. Type defaults to operator, so "all types" is written
+// to the URL as type=all.
(function() {
- const searchInput = document.getElementById('durable-search');
+ const searchInput = document.getElementById('operator-search');
const capabilityButtons = document.querySelectorAll('.capability-btn');
- const providerSelect = document.getElementById('durable-provider-filter');
- const typeSelect = document.getElementById('durable-type-filter');
- const status = document.getElementById('durable-status');
- const emptyState = document.getElementById('durable-empty');
- const groups = document.querySelectorAll('.durable-page .provider-group');
+ const providerSelect = document.getElementById('operator-provider-filter');
+ const typeSelect = document.getElementById('operator-type-filter');
+ const status = document.getElementById('operator-status');
+ const emptyState = document.getElementById('operator-empty');
+ const groups = document.querySelectorAll('.operators-page .provider-group');
if (!searchInput || !providerSelect || !typeSelect) return;
- const state = { capability: 'all', provider: 'all', type: 'all', q: '' };
+ const defaults = { capability: 'all', provider: 'all', type: 'operator', q:
'' };
Review Comment:
The cell now says it fails with `ConcurrentRunsExceededException` until the
first run ends, and keeps "submits a new job run" for a higher limit.
##########
registry/src/operators.njk:
##########
@@ -0,0 +1,109 @@
+---
+layout: base.njk
+title: Operators
+description: Operators, hooks, sensors, triggers and other modules across all
Airflow providers, filterable by durable and deferrable support
+mainClass: operators-page
+---
+
+{% set counts = operatorModules.counts %}
+
+<div class="container">
+ <header class="page-header">
+ <h1>Operators</h1>
+ <p>{{ counts.all }} operators, hooks, sensors, triggers and other modules
across {{ operatorModules.groups.length }} providers. Filter by type, provider,
or durable and deferrable support.</p>
+ </header>
+
+ <dl class="capabilities">
+ <div>
+ <dt><span class="durable-badge">Durable</span> {{ counts.durable }}</dt>
+ <dd>On retry, reconnects to the job it already started, or replays the
progress it saved, instead of starting over. Controlled by the operator's
<code>durable</code> flag: on by default for most, opt-in for the AI agent
operators. Several only reconnect on Airflow 3.3+.</dd>
+ </div>
+ <div>
+ <dt><span class="deferrable-badge">Deferrable</span> {{
counts.deferrable }}</dt>
+ <dd>Frees the worker slot while waiting: a Triggerer does the waiting,
and if it dies another Triggerer restarts the wait. Off by default: pass
<code>deferrable=True</code> (or set <code>[operators]
default_deferrable</code>) where the operator exposes it; some always
defer.</dd>
+ </div>
+ </dl>
+
+ <div class="filters">
+ <div class="search-wrapper">
+ <svg class="search-icon" fill="none" stroke="currentColor" viewBox="0 0
24 24" aria-hidden="true">
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" />
+ </svg>
+ <input id="operator-search" type="text" placeholder="Search modules..."
aria-label="Search modules">
+ </div>
+
+ <div class="filter-group">
+ <label id="capability-label">Capability:</label>
+ <div class="capability-buttons" role="group"
aria-labelledby="capability-label">
+ <button class="capability-btn active" data-capability="all"
aria-pressed="true">All (<span class="count">{{ counts.all }}</span>)</button>
+ <button class="capability-btn" data-capability="durable-or-deferrable"
aria-pressed="false">Durable or deferrable (<span class="count">{{
counts.durableOrDeferrable }}</span>)</button>
+ <button class="capability-btn" data-capability="durable"
aria-pressed="false">Durable (<span class="count">{{ counts.durable
}}</span>)</button>
+ <button class="capability-btn" data-capability="deferrable"
aria-pressed="false">Deferrable (<span class="count">{{ counts.deferrable
}}</span>)</button>
+ </div>
+ </div>
+
+ <div class="filter-group">
+ <label for="operator-provider-filter">Provider:</label>
+ <select id="operator-provider-filter">
+ <option value="all">All providers</option>
+ {% for group in operatorModules.groups %}
+ <option value="{{ group.id }}">{{ group.name }} ({{
group.modules.length }})</option>
Review Comment:
Scoped the tables to synchronous mode on Redshift Data, Snowflake and both
Databricks pages, with a line that `deferrable=True` submits again whether or
not task state was kept.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]