Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release: v1.47.0 #5180

Merged
merged 200 commits into from
May 21, 2024
Merged

release: v1.47.0 #5180

merged 200 commits into from
May 21, 2024

Conversation

bnjjj
Copy link
Contributor

@bnjjj bnjjj commented May 16, 2024

Note
This particular PR must be true-merged to main.

  • This PR is only ready to review when it is marked as "Ready for Review". It represents the merge to the main branch of an upcoming release (version number in the title).
  • It will act as a staging branch until we are ready to finalize the release.
  • We may cut any number of alpha and release candidate (RC) versions off this branch prior to formalizing it.
  • This PR is primarily a merge commit, so reviewing every individual commit shown below is not necessary since those have been reviewed in their own PR. However, things important to review on this PR once it's marked "Ready for Review":
    • Does this PR target the right branch? (usually, main)
    • Are the appropriate version bumps and release note edits in the end of the commit list (or within the last few commits). In other words, "Did the 'release prep' PR actually land on this branch?"
    • If those things look good, this PR is good to merge!

pcmanus and others added 30 commits May 17, 2023 10:46
Co-authored-by: Sylvain Lebresne <lebresne@gmail.com>
Co-authored-by: Dariusz Kuc <9501705+dariuszkuc@users.noreply.github.com>
Co-authored-by: Sachin D. Shinde <sachin@apollographql.com>
Co-authored-by: Gary Pennington <gary@apollographql.com>
Co-authored-by: Coenen Benjamin <benjamin.coenen@hotmail.com>
Co-authored-by: Renée <renee@kooi.me>
Co-authored-by: Simon Sapin <simon.sapin@exyr.org>
## Motivation / Implements
This PR updates the version of the SecOps orb used in this repo. Version
2.0.0 of the orb included an issue on the gitleaks job that prevented
the job from running on PRs created from forks. The issue was caused by
a default configuration in CircleCI which prevents providing secrets
provided through CircleCI contexts to PRs created from forks. This
default configuration is probably the correct one, so we needed up
update the SecOps orb to properly operate on PRs from forks.
…/federation-next#63)

Trigger CircleCI release job when new GH release (and associated tag) are created
Cargo doesnt support publishing multiple modules so we have to
explicitly publish single module at a time.

Updating publish job to `apollo-federation` working directory
…xt#56)

Code for extracting subgraphs from supergraphs, and any other code in the `federation` repo that this code uses.

A few things to note:
- Despite naming, the function does not generally extract subgraphs from supergraphs, as composition at this time is not a fully reversible transformation. It extracts subgraph information for the purposes of query planning; other purposes may find this "extraction" lacking/insufficient.
- This code is not directly called by router; it's one of the early parts of query planning.
- This code aims to mimic the JS code where possible to ease understanding and maintenance burden, but if this leads to unacceptable Rust practices please let me know.
- There are currently no tests; these will be added later.
apollographql/federation-next#67)

To simplify publishing and building `federation-next`, this PR removes
`apollo-harness` into its own repo -
[`federation-performance-harness`](https://github.com/apollographql/federation-performance-harness)
This adds a CI job to ensure this repo can compile to wasm. Any change
that doesn't work with wasm will then be flagged early.
Accidentally dropped it when doing the repo structure cleanup in
apollographql/federation-next#68.....
…xt#79)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[secops](https://circleci.com/developer/orbs/orb/apollo/circleci-secops-orb)
| orb | patch | `2.0.1` -> `2.0.2` |

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - "after 8am and before 4pm on tuesday" in timezone Etc/UTC.

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://togithub.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS4xNTkuNSIsInVwZGF0ZWRJblZlciI6IjM1LjE1OS41IiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: renovate[bot] <svc-secops+renovate@apollographql.com>
Sylvain is no longer at Apollo, and I should probably be added to reviews.
…0-beta.6` (apollographql/federation-next#85)

This PR exists mainly to unblock the rebasing of apollographql/federation-next#80 and apollographql/federation-next#84, as they'll have merge conflicts with the updated code (and I'd like to update the code for those PRs today). After I've finished rebasing those two PRs, will file a PR for 2nd half (probably later today).
….0-beta.6` (apollographql/federation-next#86)

This PR is the second half of apollographql/federation-next#85 , and fully updates `federation-next` to work with `apollo-compiler@1.0.0-beta.6`.

Some notes:
- This is mainly replacing `&str` with `Name`, and converting some functions to use `Result`s.
- The other notable changes are that types (e.g. `ObjectType`) need a `name` field now (making it consistent with the rest of the schema elements in `apollo-rs`), and some minor renames.
- Clippy warns that since `NodeStr` doesn't have `#[derive(PartialEq, Eq)]`, then we can't use `Name` in pattern-matching; I've worked around it with an enum and map for now.
- Consolidated a bit of the logic around converting subgraph names to enum values, with a `TODO` around doing what the JS codebase does.
- Unrelated, but I've been told we had some usages of `.eq()` in the Rust code, so I've converted them to `==`.
…ation-next#80)

This PR:
- Updates the `federation-next` schema wrapper to handle reserved names better. Specifically, we now:
  - Error if we try to insert/remove elements containing fields/arguments/input fields/enum values that start with `__`.
    - Note that built-in shadowing is still TODO/isn't implemented here, so accordingly we still ignore built-in types/directives as before.
  - Allow fetching meta-fields for objects/interfaces/unions, via `apollo-rs`'s `Schema.type_field()` method.
    - We track their GraphQL references appropriately, similar to the JS code.
    - We also add some convenience functions to get child positions from parent positions, and update code to call them.
  - Rearrange GraphQL reference insertion to occur after `Schema` element insertion instead of before, as we need the type to already be in the schema to call `type_field()` during GraphQL reference insertion. This means doing map lookups post-element-insertion to get a Rust reference to the inserted element, though arguably inserting GraphQL references afterwards is saner behavior as we don't have to worry about the element not existing yet during GraphQL reference insertion.
- Unrelated to the above, we also add some convenience structs/methods used by query graph creation here, namely:
  - `CompositeTypeDefinitionPosition`, `AbstractTypeDefinitionPosition`, and `FieldDefinitionPosition` (mainly just Rust enum analogues to the corresponding TS union types).
  - Some convenience methods for `Referencers` to handle map lookup errors.
…raphql/federation-next#84)

This PR implements the intra-subgraph logic of federated query graph creation. That is, it implements the business logic that is performed for each individual subgraph when creating a federated query graph. The inter-subraph logic will be a separate PR, to keep PRs smaller. Tests will be added in follow-up PRs.

Some notes:
- Regarding porting, while the JS codebase creates a separate query graph for each subgraph and then copies its nodes/edges over to the federated one, the Rust code in this PR starts out with a single query graph (the federated one), and each builder adds its nodes/edges to that one. This allows us to avoid copying all the subgraph query graphs (and makes the porting/working with `petgraph` a bit easier).
- We introduce a few convenience functions for `FederationSchema`/positions in this PR. We use those in the `QueryGraph` logic, but I've also refactored `extract_subgraphs_from_supergraph()` logic to use them, which has simplified some functions/removed lifetimes (also some bugfixes).
- This PR is stacked on top of apollographql/federation-next#80 .
…deration-next#92)

Release notes:
https://github.com/apollographql/apollo-rs/releases/tag/apollo-compiler%401.0.0-beta.7

- Using the new `Type::parse` API in place of the workaround. it's still
wrapped inside `decode_type` to convert the error type.
- I didn't change `parse_keys` in composition yet even though
`FieldSet::parse` does the right thing--the current code is written to
only support a flat list of keys, not nested selection sets, so it needs
some work to support that.
)

This PR changes our integration test layout to generate a single binary,
instead of having multiple (auto-discovered) binaries that are run
serially. This mimics the
[layout](https://github.com/apollographql/apollo-rs/blob/main/crates/apollo-compiler/Cargo.toml)
of `apollo-compiler`. This is also the recommendation of [the
docs](https://doc.rust-lang.org/cargo/reference/cargo-targets.html#integration-tests),
to increase test parallelism when there are many tests/decrease how long
it takes to run tests.

For reviewers, use "Hide Whitespace" when reviewing (this PR only
changes a few lines really).
Copy link
Member

@abernix abernix left a comment

Choose a reason for hiding this comment

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

Couple of these changesets are hold-overs from the last release and already appear in the changelog and I don't yet know why. Investigate tomorrow.

.changesets/fix_tninesling_undo_auth_changes.md Outdated Show resolved Hide resolved
.changesets/fix_bryn_json_schema.md Outdated Show resolved Hide resolved
I have a theory for the Federation version bump changeset (it was renamed),
but I'm not sure why these existed in this PR.
@abernix abernix dismissed their stale review May 16, 2024 19:42

I resolved them, but don't fully understand their re-introduction 52bbe1a

Copy link
Contributor

@shorgi shorgi left a comment

Choose a reason for hiding this comment

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

changeset review

.changesets/feat_bnjjj_feat_chunk_resp_selector.md Outdated Show resolved Hide resolved
.changesets/feat_bnjjj_feat_chunk_resp_selector.md Outdated Show resolved Hide resolved
.changesets/feat_bnjjj_fix_5042.md Outdated Show resolved Hide resolved
.changesets/feat_bnjjj_fix_5042.md Outdated Show resolved Hide resolved
.changesets/feat_geal_open_busy_timer.md Outdated Show resolved Hide resolved
.changesets/fix_bryn_internal_server_error.md Outdated Show resolved Hide resolved
.changesets/fix_geal_input_enum_validation.md Outdated Show resolved Hide resolved
.changesets/fix_geal_cache_key_qp_options.md Outdated Show resolved Hide resolved
abernix and others added 5 commits May 20, 2024 09:54
Co-authored-by: Bryn Cooke <BrynCooke@gmail.com>
Co-authored-by: Edward Huang <edward.huang@apollographql.com>
Co-authored-by: Edward Huang <edward.huang@apollographql.com>
Co-authored-by: Edward Huang <edward.huang@apollographql.com>
Co-authored-by: Edward Huang <edward.huang@apollographql.com>
Co-authored-by: Coenen Benjamin <benjamin.coenen@hotmail.com>
@IvanGoncharov IvanGoncharov marked this pull request as ready for review May 21, 2024 09:30
@IvanGoncharov IvanGoncharov requested a review from a team as a code owner May 21, 2024 09:30
@garypen garypen requested a review from o0Ignition0o May 21, 2024 11:46
@IvanGoncharov IvanGoncharov assigned IvanGoncharov and unassigned bnjjj May 21, 2024
@IvanGoncharov IvanGoncharov merged commit 2bb67a0 into main May 21, 2024
12 checks passed
@IvanGoncharov IvanGoncharov deleted the 1.47.0 branch May 21, 2024 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

High increase of base memory usage by Router v1.46.0