Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -903,7 +903,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: magmalake/customs@v0.3.1
- uses: magmalake/customs@v0.4.0
# And the packages as layers: `_internal` imports no public module
# that imports `_internal` back (AGENTS.md).
- run: python3 scripts/check_layers.py
Expand Down
1 change: 0 additions & 1 deletion examples/taxi/taxi.mojo
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ later.
from std.os import getenv, setenv

from dista import Seq
from parquet import RecordBatch

from morca import (
Cron,
Expand Down
1 change: 0 additions & 1 deletion src/morca/_cli.mojo
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ from morca._internal.state import PgStore
from morca._internal.store import (
CANCELLED,
DEFERRED,
FAILED,
RUNNING,
SUCCEEDED,
MemoryStore,
Expand Down
2 changes: 1 addition & 1 deletion src/morca/_internal/actions.mojo
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ from std.os import getenv

import morca._internal.db.actions as actions_db
import morca._internal.db.starting as starting_db
from morca._internal.db.live import live_runs, stale_seconds, stalled_sql
from morca._internal.db.live import live_runs
from morca.name import parse_names
from morca._internal.pause import set_paused
from morca._internal.queueing import (
Expand Down
2 changes: 1 addition & 1 deletion src/morca/_internal/aws_replace.mojo
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ one (started again), the Elastic IP moved back, and the new slot off.
stay paused throughout: unpause them once it's done.
"""

from std.os import getenv, remove
from std.os import getenv
from std.os.path import exists
from std.time import sleep

Expand Down
1 change: 0 additions & 1 deletion src/morca/_internal/config_show.mojo
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ from morca._internal.config import (
FROM_FLAG,
Setting,
flag_of,
max_runs_auto,
max_runs_text,
parse_env,
)
Expand Down
2 changes: 1 addition & 1 deletion src/morca/_internal/db/starting.mojo
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ for a run whose process died, with the stale limit as the parameter

from postgres import Connection, Params, Transaction, is_retryable, sqlstate_of

from morca._internal.db.live import behind_sql, ordered_runs
from morca._internal.db.live import behind_sql
from morca._internal.db.scheduler import RETRIED


Expand Down
3 changes: 1 addition & 2 deletions src/morca/_internal/fleet.mojo
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,10 @@ from std.os import getenv
from json import Value, loads
import morca._internal.db.fleet as fleet_db

from morca._internal.html import Html, escape, url_encode
from morca._internal.html import Html, escape
from morca._internal.json import quote
from morca._internal.db.live import stale_limit, start_grace
from morca._internal.logs import read_location
from morca._internal.metrics import bytes_text
from morca._internal.sample import metrics_location
from morca._internal.state import State

Expand Down
4 changes: 1 addition & 3 deletions src/morca/_internal/follow.mojo
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,10 @@ from std.collections import Dict

import morca._internal.db.sensing as sensing_db

from morca._internal.calendar import Cell, states_of
from morca._internal.calendar import states_of
from morca.civil import Civil, now
from morca.day import Day
from morca._internal.estimate import Pace, pace
from morca._internal.json import quote
from morca.month import Month
from morca.name import sort_texts
from morca._internal.sensors import key_kind, map_keys, split_keys
from morca._internal.state import State
Expand Down
1 change: 0 additions & 1 deletion src/morca/_internal/handover.mojo
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ from postgres import Connection
from threads import AtomicCounter, Mutex

import morca._internal.db.handover as handover_db
from morca._internal.db.handover import differs_sql, label_sql, outdated_sql
from morca._internal.source import source_commit, source_dirty


Expand Down
2 changes: 0 additions & 2 deletions src/morca/_internal/http_store.mojo
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,10 @@ from morca._internal.handover import set_outdated
from morca._internal.store import (
FINAL,
Backoff,
Recorder,
RunResult,
RunStore,
StepRun,
SUCCEEDED,
Store,
TableSnapshot,
)
from morca._internal.db.run_rows import RunInfo, StepInfo, Usage
Expand Down
1 change: 0 additions & 1 deletion src/morca/_internal/instances.mojo
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ from std.os import getenv
from std.time import sleep

import morca._internal.db.schedulers as schedulers_db
from morca._internal.db.schedulers import live_cond

from morca._internal.db.live import stale_limit
from morca._internal.migrations import known_migrations, migration_floor
Expand Down
1 change: 0 additions & 1 deletion src/morca/_internal/lineage.mojo
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ The same edges are in the snapshots' own summaries, as `orca.reads`.

import morca._internal.db.lineage as lineage_db
from morca._internal.db.lineage import (
DEPTH,
Commit,
Dataset,
Flow,
Expand Down
File renamed without changes.
1 change: 0 additions & 1 deletion src/morca/_internal/queueing.mojo
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ from morca._internal.db.batches import mark_batch
import morca._internal.db.queueing as queueing_db
import morca._internal.db.starting as starting_db
from morca._internal.db.live import live_runs
from morca._internal.db.queueing import APPENDING_SQL, DONE_SQL
from morca._internal.timekeys import parse_time_keys
from morca.name import (
Name,
Expand Down
1 change: 0 additions & 1 deletion src/morca/_internal/registering.mojo
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ from morca._internal.registered import (
repeated_fill,
)
from morca._internal.queueing import (
backfill,
dataset_cycle,
kind_mismatch,
)
Expand Down
1 change: 0 additions & 1 deletion src/morca/_internal/run_cluster.mojo
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ TLS, and is never in a log or a page.

from json import Value
import morca._internal.db.run_cluster as cluster_db
from morca._internal.db.run_cluster import MEMBER_GRANTS_SQL, MEMBER_MB_SQL

from morca._internal.http_store import Body
from morca._internal.registered import registered, run_request
Expand Down
2 changes: 0 additions & 2 deletions src/morca/_internal/sample.mojo
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,8 @@ one message, and it carries on: a sampler never fails a run.
"""

from std.ffi import c_int, external_call
from std.memory import stack_allocation
from std.os import getenv, listdir, makedirs
from std.os.path import exists
from std.sys import exit
from std.sys.info import CompilationTarget
from std.time import perf_counter_ns, sleep

Expand Down
1 change: 0 additions & 1 deletion src/morca/_internal/scheduler.mojo
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,6 @@ from morca._internal.pressure import (
pct_text,
read_psi,
)
from morca._internal.recommend import learned
from morca._internal.state import State
from morca._internal.watchdog import (
check as check_watchdog,
Expand Down
3 changes: 1 addition & 2 deletions src/morca/_internal/sqlite_store.mojo
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ from morca._internal.store import (
FINAL,
INTERRUPTED,
RUNNING,
SKIPPED,
SUCCEEDED,
Backoff,
RunResult,
Expand All @@ -55,7 +54,7 @@ from morca._internal.store import (
StepRun,
TableSnapshot,
)
from morca._internal.db.run_rows import RunInfo, StepInfo, Usage
from morca._internal.db.run_rows import RunInfo, StepInfo

comptime _BUSY_MS = 1000
"""How long a write waits for another writer's lock before it fails (and,
Expand Down
1 change: 0 additions & 1 deletion src/morca/_internal/starting.mojo
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ from morca._internal.db.concurrency import FILLS, OTHERS
from morca._internal.key_wait import key_room, started
from morca._internal.kube import (
RunSpec,
cpu_millis,
)
from morca._internal.logs import (
is_remote,
Expand Down
6 changes: 1 addition & 5 deletions src/morca/_internal/state.mojo
Original file line number Diff line number Diff line change
Expand Up @@ -37,28 +37,24 @@ from morca._internal.migrations import (
known_migrations,
schema_ahead,
)
from morca._internal.db.live import stale_limit
from morca._internal.db.pipelines import set_version
from morca._internal.db.schedulers import live_older
from morca._internal.handover import run_outdated, set_outdated
from morca._internal.store import (
CANCELLED,
DEFERRED,
FINAL,
FAILED,
INTERRUPTED,
Backoff,
RUNNING,
SKIPPED,
SUCCEEDED,
RunResult,
RunStore,
status_list,
StepRun,
TableSnapshot,
process_owner,
)
from morca._internal.db.run_rows import RunInfo, StepInfo, Usage
from morca._internal.db.run_rows import RunInfo, StepInfo


comptime _MIGRATION_LOCK = 0x6F726361 # "orca"
Expand Down
2 changes: 1 addition & 1 deletion src/morca/_internal/system.mojo
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ from morca._internal.db.system import Container, Minute

from morca.civil import Civil
from morca._internal.fleet import Series, Summary, _chart, _fixed
from morca._internal.html import Html, escape
from morca._internal.html import Html
from morca._internal.json import quote
from morca._internal.logs import (
is_remote,
Expand Down
2 changes: 1 addition & 1 deletion src/morca/_internal/ui/data.mojo
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ from json import Value, loads

from morca._internal.auth import login_required
from morca._internal.dataset_config import dataset_public
from morca._internal.html import Html, query_param, url_encode
from morca._internal.html import Html, query_param
from morca._internal.json import quote
from morca._internal.lineage import datasets as dataset_rows
from morca._internal.metrics import bytes_text
Expand Down
1 change: 0 additions & 1 deletion src/morca/_internal/ui/layout.mojo
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ buttons, and the 404 and 400 pages.
from std.os import getenv

from morca._internal.html import Html, escape
from morca._internal.json import quote
from morca._internal.ui.loading import LOADING_JS
from morca._internal.ui.step_cards import LEAD_JS, STEP_CARDS_JS
from morca._internal.ui.terms import header_help
Expand Down
2 changes: 0 additions & 2 deletions src/morca/_internal/ui/ops.mojo
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ refreshes from; Alerts (`/ops/alerts`, where `/ops` goes) is
Workers' old paths redirect to Pools (`moved`, `to_pools`).
"""

from std.os import getenv

from morca._internal.admission import (
pressure_html,
Expand Down Expand Up @@ -44,7 +43,6 @@ from morca._internal.watchdog import (
config as watchdog_config,
prometheus as watchdog_prometheus,
rule_rows,
trips_json,
watchdog_html,
watchdog_json,
)
Expand Down
1 change: 0 additions & 1 deletion src/morca/_internal/ui/pipeline.mojo
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ from morca._internal.ui.pipeline_data import pipeline_data_html
from morca._internal.ui.parts import (
CPU_HELP,
PEAK_HELP,
dataset_links,
datasets_with_data,
named_code_link,
pause_button,
Expand Down
2 changes: 0 additions & 2 deletions src/morca/_internal/ui/runs.mojo
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ from morca._internal.api.runs import (
runs_filters_json,
)
from morca._internal.html import Html, query_param, url_encode
from morca._internal.json import quote
from morca._internal.state import State
from morca._internal.system import alert_html
from morca._internal.ui.layout import (
Expand All @@ -30,7 +29,6 @@ from morca._internal.ui.terms import RUN_STATUSES, RUN_TRIGGERS
from morca._internal.views.code import runs_code
from morca._internal.views.runs import (
BULK_MAX,
RUNS_PAGE,
RunsPage,
RunsQuery,
int_or_zero,
Expand Down
1 change: 0 additions & 1 deletion src/morca/_internal/usage.mojo
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ seconds before the request, so neither clock needs to agree with the
database's).
"""

from std.ffi import c_int, external_call
from std.time import perf_counter_ns

from json import Value
Expand Down
3 changes: 1 addition & 2 deletions src/morca/_internal/views/data.mojo
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,10 @@ What a read keeps on disk for the next, by snapshot, is
from std.os import getenv
from std.os.path import exists

from json import Value, loads
from json import loads

from morca._internal.expiry import maintain_binary
from morca._internal.html import query_param, query_values, url_encode
from morca._internal.json import quote
from morca._internal.proc import capture

comptime OPS = ["eq", "ne", "lt", "le", "gt", "ge", "in"]
Expand Down
1 change: 0 additions & 1 deletion src/morca/_internal/views/pipelines.mojo
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ from morca._internal.db.pipelines_view import (
PipelineRow,
StepDef,
UsageSummary,
comma_list,
)

from morca.civil import Civil, now
Expand Down
1 change: 0 additions & 1 deletion src/morca/_internal/views/recent.mojo
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ what needs attention first.
"""

import morca._internal.db.home_view as home_db
from morca._internal.db.home_view import FAILED_LATELY

from morca._internal.json import quote
from morca._internal.state import State
Expand Down
3 changes: 1 addition & 2 deletions src/morca/_internal/views/runs.mojo
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,10 @@ from morca._internal.db.run_view import (
AuditRow,
ClusterRow,
InstanceRow,
StepRecord,
Touch,
VersionRow,
)
from morca._internal.db.runs_view import RunRecord, RunsFilter, utc_sql
from morca._internal.db.runs_view import RunRecord, RunsFilter

from morca._internal.views.cluster import cluster_rows
from morca._internal.handover import run_outdated
Expand Down
1 change: 0 additions & 1 deletion src/morca/_internal/worker.mojo
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ started has its start given back.

from std.ffi import c_int, external_call
from std.os import getenv, makedirs, remove
from std.os.path import exists
from std.sys.info import CompilationTarget, num_logical_cores
from std.time import perf_counter_ns, sleep

Expand Down
5 changes: 2 additions & 3 deletions src/morca/_internal/workers.mojo
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ worker checks the spec again before it starts anything (`morca._internal.worker`

from std.os import getenv

from json import Value, loads
from json import Value
import morca._internal.db.audit as audit_db
import morca._internal.db.pools as pools_db
import morca._internal.db.scheduler as scheduler_db
Expand All @@ -72,9 +72,8 @@ from morca._internal.admission import (
row_json,
worker_host,
)
from morca._internal.control import WORKER_PREFIX, pool_of, pool_problem
from morca._internal.control import WORKER_PREFIX, pool_problem
from morca._internal.http_store import (
STORE_PATH,
Body,
bytes_of_hex,
pins_json,
Expand Down
3 changes: 0 additions & 3 deletions src/morca/_lake/batch.mojo
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ from arrow_mlake import (
AT_FLOAT64,
AT_INT16,
AT_INT32,
AT_INT64,
AT_INT8,
AT_LARGE_BINARY,
AT_LARGE_LIST,
Expand All @@ -23,8 +22,6 @@ from arrow_mlake import (
AT_MAP,
AT_STRUCT,
AT_TIME32,
AT_TIME64,
AT_TIMESTAMP,
AT_UTF8,
ArrayArena,
bit_get,
Expand Down
2 changes: 1 addition & 1 deletion src/morca/_lake/calls.mojo
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ one over a `mut` borrow of it, and says so at compile time.
from arrow_mlake.carrow_import import ImportedArray, ImportedStream
from parquet import RecordBatch

from morca._lake.abi import Enc, Slots, bytes_of, get_int, put_int, text_of
from morca._lake.abi import Enc, Slots, bytes_of, put_int, text_of
from morca._lake.client import Api, Exported


Expand Down
Loading
Loading