fix: relax required stats fields (compute units, counts) to optional - #947
Merged
Conversation
apify-service-account
commented
Jul 13, 2026
Contributor
- Updates the auto-generated Pydantic models and TypedDicts based on the proposed OpenAPI specification changes.
- Based on apify-docs PR #2763.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #947 +/- ##
==========================================
- Coverage 94.56% 94.54% -0.03%
==========================================
Files 48 48
Lines 5119 5116 -3
==========================================
- Hits 4841 4837 -4
- Misses 278 279 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
vdusek
approved these changes
Jul 13, 2026
vdusek
left a comment
Contributor
There was a problem hiding this comment.
LGTM.
I just made the PR title more specific. The previous one ("Relax constraints on generated models based on updated specification") doesn't say much in the changelog (which constraints? which fields?), and we already have another PR with that exact title, so we'd get two identical changelog lines.
Please be more specific in these. And ask Claude if you can't come up with a good title 😄.
This was referenced Jul 28, 2026
vdusek
added a commit
that referenced
this pull request
Aug 3, 2026
) Replaces the apify-docs-triggered model regeneration with a nightly job, and records which published OpenAPI specification the generated models came from. ## What changes - **`on_schedule_regenerate_models.yaml`** - nightly at 02:00 UTC plus manual dispatch. Regenerates on master and opens a pull request when the models change. `manual_regenerate_models.yaml` is deleted. - **`scripts/openapi_spec.py`** - downloads and validates the published specification into git-ignored `tmp/` (both codegen passes read that one copy), then records its `info.version` in `pyproject.toml` under `[tool.apify.openapi-spec]`. The specification itself is not committed. - **`_models.py`** loses the `Plan.available_proxy_groups` docstring - accumulated codegen drift from the `datamodel-code-generator` bumps (#968, #975), not a specification change. ## Why The old workflow was dispatched by apify-docs and checked out a permanent, never-rebased branch *before* regenerating, so it generated with that branch's stale tooling. In #979 that produced `_literals.py` in the pre-#941 closed `Literal[...]` form; merging it would have silently reverted the enum relaxation. It also opened with a `TODO` title that blocked `pr-title-check` - a design that needs human action to become mergeable, which is what let #979 rot for 20 days while the same spec changes were landed by hand (#923, #936, #947, #960, #974). The nightly job always generates on master and rebuilds its `ci/regenerate-models` branch from master instead of appending, so the diff is always "current spec vs current master" and can't resurrect a stale generated file. It opens with a mergeable `chore:` title; reviewers retitle to `fix:`/`feat:` when the diff is user-facing. ## Notes - **Merge apify/apify-docs#2835 first** - it removes the dispatch that still calls the workflow deleted here. - **Needs a `SLACK_WEBHOOK_URL` repository secret** for the failure alert. - The recorded version is a coarse marker, not a content identity: apify-docs bumps `components/version.yaml` in a follow-up `[skip ci]` commit, so a deploy can publish new content under the old stamp. A moved value proves the specification changed; an unchanged one proves nothing. *✍️ Drafted by Claude Code*
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.