Skip to content

[Artifacts] Add artifact Twirp API definitions - #1481

Merged
bethanyj28 merged 7 commits into
mainfrom
bethanyj28/add-twirp-definitions
Aug 8, 2023
Merged

bethanyj28 merged 7 commits into
mainfrom
bethanyj28/add-twirp-definitions

Conversation

@bethanyj28

Copy link
Copy Markdown
Contributor

Tracking: https://github.com/github/c2c-actions-checks/issues/1699

As we continue to refactor the artifacts package for v4, we need to add our Twirp API types. To do this, we used hopin-team/twirp-ts. The generated file has an index.ts so accessing these entities can be done using:

import { ArtifactServiceClientJSON, CreateArtifactRequest, Timestamp } from 'src/generated'

PRs following to add the Twirp client.

@bethanyj28
bethanyj28 marked this pull request as ready for review August 3, 2023 19:54
@bethanyj28
bethanyj28 requested a review from a team as a code owner August 3, 2023 19:54
return target;
}
create(value?: PartialMessage<Timestamp>): Timestamp {
const message = { seconds: 0n, nanos: 0 };

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We may have to wait until we figure out what to do with the big int literals: https://github.com/actions/toolkit/actions/runs/5755118666/job/15601882272?pr=1481

Unsure if twirp-ts has compile options, but maybe we can chat with actions assignment team to see if we can bump the compile target.

Or the manual hacky approach 😅

Suggested change
const message = { seconds: 0n, nanos: 0 };
const message = { seconds: BigInt(0), nanos: 0 };

@bethanyj28
bethanyj28 requested a review from a team as a code owner August 7, 2023 15:55

@konradpabjan konradpabjan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

:shipit:

Comment thread .eslintignore
packages/*/lib/
packages/glob/__tests__/_temp No newline at end of file
packages/glob/__tests__/_temp
packages/*/src/generated/*/

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

When we get around to rewriting cache then I'm sure we'll also use twirp + this pattern so these wildcards seem fine 👍

@bethanyj28
bethanyj28 merged commit bc24adb into main Aug 8, 2023
@bethanyj28
bethanyj28 deleted the bethanyj28/add-twirp-definitions branch August 8, 2023 14:36
@bethanyj28 bethanyj28 mentioned this pull request Aug 8, 2023
Derrick-MUGISHA pushed a commit to Derrick-MUGISHA/toolkit that referenced this pull request Oct 12, 2026
…initions

[Artifacts] Add artifact Twirp API definitions
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