Skip to content

rofl-scheduler: Per-offer allowed_creators and allowed_artifacts - #2465

Merged
anzoman merged 6 commits into
mainfrom
anzoman/feature/rofl-scheduler-per-offer-config
Jun 1, 2026
Merged

rofl-scheduler: Per-offer allowed_creators and allowed_artifacts#2465
anzoman merged 6 commits into
mainfrom
anzoman/feature/rofl-scheduler-per-offer-config

Conversation

@anzoman

@anzoman anzoman commented May 25, 2026

Copy link
Copy Markdown
Contributor

Adds per-offer overrides for allowed_creators and allowed_artifacts, making it possible to mix public and internal workloads on the same scheduler instance without repeating the global allowlist for every offer.

What changed

  • offers is now a BTreeMap<String, OfferConfig> internally. Each entry carries optional allowed_creators and allowed_artifacts overrides; when absent, the top-level value is used as a fallback. Empty list = allow all.
  • offer_key_by_id is built once per scheduling round in discover() and reused in process_pending(), avoiding a redundant on-chain fetch.
  • Fully backwards compatible — the existing plain-string array format is still accepted. New entries can optionally carry per-offer config using a map with an id field.

Config

# Global fallback — applies to all offers that don't override it
allowed_creators: []

offers:
  - playground_short            # plain string — global defaults apply
  - playground_short_sgx
  - id: oasis_internal          # map entry — per-offer overrides
    allowed_creators:
      - "oasis1abc..."

@netlify

netlify Bot commented May 25, 2026

Copy link
Copy Markdown

Deploy Preview for oasisprotocol-oasis-sdk canceled.

Name Link
🔨 Latest commit 2a5dd44
🔍 Latest deploy log https://app.netlify.com/projects/oasisprotocol-oasis-sdk/deploys/6a1d6181d9667c00082fe58e

@anzoman
anzoman force-pushed the anzoman/feature/rofl-scheduler-per-offer-config branch from 2c74a06 to c494bee Compare May 25, 2026 09:23
@codecov

codecov Bot commented May 25, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 22.72727% with 85 lines in your changes missing coverage. Please review.
✅ Project coverage is 51.24%. Comparing base (1ca9917) to head (2a5dd44).

Files with missing lines Patch % Lines
rofl-scheduler/src/config.rs 34.24% 48 Missing ⚠️
rofl-scheduler/src/manager.rs 0.00% 37 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2465      +/-   ##
==========================================
- Coverage   51.33%   51.24%   -0.10%     
==========================================
  Files         237      237              
  Lines       17132    17212      +80     
==========================================
+ Hits         8795     8820      +25     
- Misses       8277     8332      +55     
  Partials       60       60              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@anzoman
anzoman force-pushed the anzoman/feature/rofl-scheduler-per-offer-config branch from bb27b06 to a1e2bc6 Compare May 25, 2026 11:10
Comment thread rofl-scheduler/src/config.rs Outdated
@anzoman
anzoman force-pushed the anzoman/feature/rofl-scheduler-per-offer-config branch from 950f9e1 to ed25373 Compare May 25, 2026 11:48
@anzoman
anzoman marked this pull request as ready for review May 25, 2026 11:58
@anzoman
anzoman requested a review from matevz May 26, 2026 06:29
Comment thread rofl-scheduler/src/config.rs Outdated
@anzoman
anzoman requested a review from kostko May 26, 2026 13:42
@anzoman
anzoman force-pushed the anzoman/feature/rofl-scheduler-per-offer-config branch 2 times, most recently from 6a98181 to e2be17f Compare May 28, 2026 13:48
anzoman added 5 commits May 28, 2026 16:35
Add per-offer overrides for `allowed_creators` and `allowed_artifacts`
so that a single scheduler can host both public and internal workloads
without repeating the global allowlist for every offer.
Support mixed array entries: plain strings (old format) alongside
single-key maps with per-offer overrides, so existing configs need
no changes.
@anzoman
anzoman force-pushed the anzoman/feature/rofl-scheduler-per-offer-config branch from e2be17f to 389c1db Compare May 28, 2026 14:35

@kostko kostko left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, have you tested it anywhere?

Comment thread rofl-scheduler/src/config.rs Outdated
@anzoman
anzoman force-pushed the anzoman/feature/rofl-scheduler-per-offer-config branch from 389c1db to 2a5dd44 Compare June 1, 2026 10:39
@anzoman
anzoman requested a review from kostko June 1, 2026 11:57
@anzoman
anzoman merged commit 9d70f5f into main Jun 1, 2026
38 of 41 checks passed
@anzoman
anzoman deleted the anzoman/feature/rofl-scheduler-per-offer-config branch June 1, 2026 13:11
github-actions Bot added a commit that referenced this pull request Jun 1, 2026
…nzoman/feature/rofl-scheduler-per-offer-config

rofl-scheduler: Per-offer allowed_creators and allowed_artifacts 9d70f5f
github-actions Bot added a commit that referenced this pull request Jun 1, 2026
…nzoman/feature/rofl-scheduler-per-offer-config

rofl-scheduler: Per-offer allowed_creators and allowed_artifacts 9d70f5f
github-actions Bot added a commit that referenced this pull request Jun 1, 2026
…/anzoman/feature/rofl-scheduler-per-offer-config

rofl-scheduler: Per-offer allowed_creators and allowed_artifacts 9d70f5f
github-actions Bot added a commit to OasisUnofficial/oasis-sdk that referenced this pull request Jun 1, 2026
…sisprotocol/anzoman/feature/rofl-scheduler-per-offer-config

rofl-scheduler: Per-offer allowed_creators and allowed_artifacts 9d70f5f
github-actions Bot added a commit to OasisUnofficial/oasis-sdk that referenced this pull request Jun 1, 2026
…sisprotocol/anzoman/feature/rofl-scheduler-per-offer-config

rofl-scheduler: Per-offer allowed_creators and allowed_artifacts 9d70f5f
github-actions Bot added a commit to OasisUnofficial/oasis-sdk that referenced this pull request Jun 1, 2026
…oasisprotocol/anzoman/feature/rofl-scheduler-per-offer-config

rofl-scheduler: Per-offer allowed_creators and allowed_artifacts 9d70f5f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants