Skip to content

Conversation

@mogery
Copy link
Contributor

@mogery mogery commented Jan 28, 2024

Summary:
@cache directives are not serialized when calling config.to_sdl(). This PR adds logic to into_document.rs to fix this.

Build & Testing:

  • I ran cargo test successfully.
  • I have run ./lint.sh --mode=fix to fix all linting issues raised by ./lint.sh --mode=check.

Checklist:

  • I have added relevant unit & integration tests.
  • I have updated the documentation accordingly.
  • I have performed a self-review of my code.
  • PR follows the naming convention of <type>(<optional scope>): <title>

@github-actions github-actions bot added type: docs Related to documentation and information. type: fix Iterations on existing features or infrastructure. labels Jan 28, 2024
mogery added a commit to mogery/tailcall that referenced this pull request Jan 28, 2024
@codecov
Copy link

codecov bot commented Jan 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (eac8120) 88.39% compared to head (f3c40ab) 88.38%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1058      +/-   ##
==========================================
- Coverage   88.39%   88.38%   -0.01%     
==========================================
  Files          99       99              
  Lines       10721    10712       -9     
==========================================
- Hits         9477     9468       -9     
  Misses       1244     1244              

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

@mogery mogery changed the title fix(config/into_document): serialize @cache directives fix(document): serialize @cache directives Jan 29, 2024
@mogery
Copy link
Contributor Author

mogery commented Jan 29, 2024

This is all ready now. Should be a quick merge.

mogery and others added 2 commits January 29, 2024 15:19
the previous behaviour was to apply type-level cache directives to fields at import time. this means that identity checks fail when type-level cache directives are used. this commit moves the type-to-field propagation logic to blueprint logic instead of config logic.
@mogery
Copy link
Contributor Author

mogery commented Jan 29, 2024

Pushed a new commit that fixes the identity fail of type-level cache directives, and adds a test for it. Should be good to go 👍🏻

@meskill meskill merged commit bd4c628 into tailcallhq:main Jan 29, 2024
@meskill
Copy link
Contributor

meskill commented Jan 29, 2024

Great work, thanks for the fix!

@mogery mogery deleted the mog/cache-directive-sdl branch January 29, 2024 21:29
mogery added a commit to mogery/tailcall that referenced this pull request Jan 30, 2024
mogery added a commit to mogery/tailcall that referenced this pull request Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: docs Related to documentation and information. type: fix Iterations on existing features or infrastructure.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants