Skip to content

feat: multipart upload opt in AR-6 #437

Merged
Minister944 merged 6 commits into
mainfrom
AR-6-multipart-upload-opt-in
Jul 1, 2026
Merged

feat: multipart upload opt in AR-6 #437
Minister944 merged 6 commits into
mainfrom
AR-6-multipart-upload-opt-in

Conversation

@Minister944

Copy link
Copy Markdown
Contributor

Introduces a multipart_uploads boolean setting (default: true) that,
when set to false, generates lighter base client variants that omit
multipart/file-upload handling. Adds four new no-upload base client
dependency files (async, sync, with/without OpenTelemetry) and a
corresponding integration test fixture.

Introduces a `multipart_uploads` boolean setting (default: true) that,
when set to false, generates lighter base client variants that omit
multipart/file-upload handling. Adds four new no-upload base client
dependency files (async, sync, with/without OpenTelemetry) and a
corresponding integration test fixture.
@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 563351c1-1d3d-4b6e-90b5-35a4bbda785c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch AR-6-multipart-upload-opt-in

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

async_client: bool = True,
base_client_name: str = "AsyncBaseClient",
base_client_file_path: str = DEFAULT_ASYNC_BASE_CLIENT_PATH.as_posix(),
base_client_module_name: str = "",

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.

  1. This class provides the defaults for parameters to generate the functional default implementation (default async base client). Shouldn't this param be set then?
  2. What should be set here for using custom base client class?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

base_client_module_name is the name the base client is written under in the generated package (and what client.py imports). It has to stay because PackageGenerator needs that output name, and it can't be derived from base_client_file_path.stem: for the default no-upload variants the source file (async_base_client_no_upload.py) differs from the output module (async_base_client.py). Using the stem would give the wrong name.

So it's a computed value the generator consumes, not user config. I'd keep resolving it together with base_client_name / base_client_file_path in _set_default_base_client_data, since splitting it out produces the same value anyway and just adds a "default vs custom?" branch.

Comment thread ariadne_codegen/client_generators/package.py Outdated
Comment thread ariadne_codegen/client_generators/package.py Outdated
Comment thread ariadne_codegen/client_generators/package.py Outdated
Comment thread tests/main/clients/no_multipart_upload/expected_client/client.py Outdated
Comment thread ariadne_codegen/client_generators/package.py
Comment thread ariadne_codegen/client_generators/package.py Outdated
@Minister944 Minister944 changed the title AR-6 multipart upload opt in feat: multipart upload opt in AR-6 Jun 29, 2026
@Minister944 Minister944 merged commit c7367ee into main Jul 1, 2026
6 checks passed
@Minister944 Minister944 deleted the AR-6-multipart-upload-opt-in branch July 1, 2026 09:17
Minister944 added a commit that referenced this pull request Jul 8, 2026
…led packages AR-3 (#439)

Introduce a new `schema_paths` setting that builds the GraphQL schema from
multiple sources. Each entry is resolved either as a dotted Python attribute
path (e.g. `pkg.SCHEMA_DIR` or `pkg.get_schema_files`) - useful for pulling
type definitions from installed packages - or as a local file/directory path.

- schema.py: add `resolve_schema_paths` and `get_graphql_schema_from_paths`
- main.py: wire `schema_paths` into both `client` and `graphqlschema` strategies
- settings.py: add the `schema_paths` field and make the three schema sources
  (`schema_path`, `schema_paths`, `remote_schema_url`) mutually exclusive -
  providing more than one now raises InvalidConfiguration; simplify
  `using_remote_schema` accordingly
- docs/README: document `schema_paths` and the mutual-exclusivity rule

CI/CD does not pass. This is an unrelated error that is being fixed as part of [AR-6](#437)


## Acknowledgements

While working on this, we noticed #431 by @esfomeado, which also tackled
loading the schema from more than one source. After discussing it as a team,
we went with a different approach - a dedicated `schema_paths` setting that
additionally resolves dotted Python attribute paths from installed packages -
which we felt fit the project better. Thanks @esfomeado for raising the problem
and for your contribution! 🙏
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