-
Notifications
You must be signed in to change notification settings - Fork 8.6k
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
fix: v2 event-types versioning #15549
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 3 Ignored Deployments
|
Graphite Automations"Add consumer team as reviewer" took an action on this PR • (06/24/24)1 reviewer was added to this PR based on Keith Williams's automation. "Add platform team as reviewer" took an action on this PR • (06/24/24)1 reviewer was added to this PR based on Keith Williams's automation. |
@@ -375,13 +405,17 @@ describe("Event types Endpoints", () => { | |||
it(`/GET/:id not existing`, async () => { | |||
await request(app.getHttpServer()) | |||
.get(`/api/v2/event-types/1000`) | |||
.set(CAL_API_VERSION_HEADER, VERSION_2024_04_15) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it needed to add this header to all these calls since it's the default and fallback when the header isn't supplied?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Technically no, but I added it because the modified controller now has version array version: []
instead of string version: string
and I just make sure that it works as expected.
📦 Next.js Bundle Analysis for @calcom/webThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
@supalarry I temporarily changed the target branch of this to |
* Added a log for pull_request * Added labels logging * Using labels straight from event PR object * Converting to JSON * Switching to use payload * Fixed issue with undefined pr * Fixed non-mapping issue * Removed the types * Added another cache key segment using the head commit sha * Added separate workflow for labeled action * Fixed syntax error * Fixing payload issue * Added log * logging full object * Put e2e back in the names to help find them * Limited logging * fix: v2 even-types versioning * test: old v2 even-types request with VERSION_2024_06_11 * test: old v2 even-types request with VERSION_2024_04_15 --------- Co-authored-by: Keith Williams <[email protected]>
Problem
Was testing platform starter kit and noticed that event-types can't be fetched:
Reason
I refactored event-types in PR #15457 and versioned old event-types endpoints at version
VERSION_2024_04_15
while the new event-types atVERSION_2024_06_14
, but forgot that there are people using versionVERSION_2024_06_11
that is between, which is version that platform starter kit is using.Solution
Add version
VERSION_2024_06_11
to the old event-types controller aka make it process all event-types before latestVERSION_2024_06_14
in event-types.controller.ts.Then, change old event-types tests to add
VERSION_2024_04_15
headers to requests, and then a new test with api version header atVERSION_2024_06_11
. To run event-types tests run: