Skip to content

feat: extends mounted secret api - #5707

Merged
TomChv merged 8 commits into
dagger:mainfrom
TomChv:feat/extends-mounted-secret-api
Sep 12, 2023
Merged

TomChv merged 8 commits into
dagger:mainfrom
TomChv:feat/extends-mounted-secret-api

Conversation

@TomChv

@TomChv TomChv commented Aug 28, 2023

Copy link
Copy Markdown
Member

Resolves: #3323

@TomChv TomChv added the area/engine About dagger core engine label Aug 28, 2023
@TomChv
TomChv requested review from sipsma and vito August 28, 2023 21:48
@TomChv TomChv self-assigned this Aug 28, 2023
@TomChv
TomChv requested a review from a team as a code owner August 28, 2023 21:48
@TomChv

TomChv commented Aug 28, 2023

Copy link
Copy Markdown
Member Author

Only netlify failed, not related to the PR, I add the release note and we're good to merge

@TomChv
TomChv requested a review from a team as a code owner August 28, 2023 22:41
Comment thread sdk/elixir/lib/dagger/gen/container.ex Resolved
Comment thread core/schema/container.graphqls Resolved
Comment thread core/schema/container.graphqls Resolved
@helderco

Copy link
Copy Markdown
Contributor

@TomChv, don't create changie logs in SDKs if it's just the auto-generated code. This should just be an engine change. Each SDK release points to the engine release it's compatible with, and the change will be listed there.

@TomChv
TomChv force-pushed the feat/extends-mounted-secret-api branch from d5e763e to 187d879 Compare August 31, 2023 11:58
@TomChv

TomChv commented Aug 31, 2023

Copy link
Copy Markdown
Member Author

@wingyplus PR updated, I switched back to camelcase
@helderco changelogs removed

@wingyplus wingyplus 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.

Just a little change.

Comment thread core/schema/container.graphqls Resolved
@TomChv

TomChv commented Aug 31, 2023

Copy link
Copy Markdown
Member Author

Just a little change.

I regenerate all clients and we shall be good to merge

Comment thread core/integration/container_test.go Resolved
@TomChv
TomChv requested a review from wingyplus September 1, 2023 09:28
@wingyplus

Copy link
Copy Markdown
Contributor

LGTM. 🚀

Comment thread core/schema/container.graphqls Outdated

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.

Suggested change
Default: 0644.
Default: 0400.

@vito vito 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.

Implementation LGTM, just some issues with the GraphQL docs and test.

Comment thread core/integration/container_test.go Outdated

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.

As far as I can tell, this test doesn't actually check whether the secret was optional, or that the configured mode was respected. I think we need a test for each. You can run stat to see the mode, and test -z "$(cat /secret)" to test that it's empty.

@TomChv TomChv Sep 7, 2023 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I fixed the test and doc, but I'm not sure about optional? How can I mount an actual optional secret? @vito

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.

Yeah it seems like you can't, so I wouldn't bother including an API for it. In Buildkit this is a thing because secret names are configured in a Dockerfile and optionally provided by the user separately, but Dagger handles both together; an optional secret would probably just amount to passing an empty string to SetSecret.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Then should I remove the option?

@vito vito Sep 8, 2023 •

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.

Yeah, if we can't come up with a test for it, to me that proves that we don't need it.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixed in e833f5d

TomChv and others added 8 commits September 11, 2023 22:20
Resolves: dagger#3323
Signed-off-by: Vasek - Tom C <[email protected]>
Signed-off-by: Vasek - Tom C <[email protected]>
Signed-off-by: Vasek - Tom C <[email protected]>
Co-authored-by: Thanabodee Charoenpiriyakij <[email protected]>
Signed-off-by: Vasek - Tom C <[email protected]>
Signed-off-by: Vasek - Tom C <[email protected]>
Signed-off-by: Vasek - Tom C <[email protected]>
@TomChv
TomChv force-pushed the feat/extends-mounted-secret-api branch from 49f2752 to e833f5d Compare September 11, 2023 20:40

@vito vito 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.

lgtm!

@TomChv
TomChv merged commit 1ddf4ea into dagger:main Sep 12, 2023
@gerhard gerhard added this to the v0.8.5 milestone Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/engine About dagger core engine

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support configuring additional options for secrets

5 participants