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

feat(sdk): introduce a Manifest type #60

Merged
merged 1 commit into from
Feb 13, 2025

Conversation

EtienneM
Copy link
Member

@EtienneM EtienneM commented Feb 13, 2025

Currently we need to pass a string and I find this ugly. For example:

const manifest = `{"Implements": ["NetworkDriver", "IpamDriver"]}`
dockerPluginHandler := dockerpluginssdk.NewHandler(log, manifest)

This is too error-prone in my opinion.

Introduction of this PR would lead to a new major version (v2). This lib is only used in SAND and SWAN. If we don't upgrade to v2 in SAND, then there is no impact there. And we just need to use this version in SWAN.

Related to STORY-270

@EtienneM EtienneM self-assigned this Feb 13, 2025
Copy link

Endpoint creation

@EtienneM EtienneM force-pushed the feat/STORY-270/manifest_implements branch 2 times, most recently from f23d50e to df8da5d Compare February 13, 2025 08:49
@Scalingo Scalingo deleted a comment from notion-workspace bot Feb 13, 2025
@EtienneM EtienneM marked this pull request as ready for review February 13, 2025 09:27
@EtienneM EtienneM requested a review from sc-zenokerr February 13, 2025 09:27
@EtienneM EtienneM force-pushed the feat/STORY-270/manifest_implements branch from df8da5d to ea1196a Compare February 13, 2025 09:41
Copy link

@sc-zenokerr sc-zenokerr left a comment

Choose a reason for hiding this comment

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

Presuming that this works, the changes LGTM.

@@ -2,6 +2,8 @@

## To Be Released

* feat(sdk): introduce a `Manifest` type

Choose a reason for hiding this comment

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

Would it make sense add a note here, highlighting that this would require a major version bump?

Copy link
Member Author

Choose a reason for hiding this comment

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

I will handle the major version now, so I don't think it's required. I will remember to do it :)


manifest = `{"Implements": ["` + AuthZApiImplements + `"]}`

Choose a reason for hiding this comment

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

+1 for getting rid of this.

@EtienneM
Copy link
Member Author

Presuming that this works, the changes LGTM.

Yes they have been tested in https://github.com/Scalingo/swan-agent/pull/293/commits/bce7b817405d8a21949195a6d4e01892be15dd25

@EtienneM EtienneM merged commit c945bca into master Feb 13, 2025
1 check passed
@EtienneM EtienneM deleted the feat/STORY-270/manifest_implements branch February 13, 2025 09:57
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.

2 participants