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

Standardize structured function results (ResourceList.results) #1390

Closed
3 tasks done
frankfarzan opened this issue Jan 25, 2021 · 6 comments
Closed
3 tasks done

Standardize structured function results (ResourceList.results) #1390

frankfarzan opened this issue Jan 25, 2021 · 6 comments
Assignees
Labels
area/fn-sdk Typescript SDK area/hydrate size/XL 8 day triaged Issue has been triaged by adding an `area/` label
Milestone

Comments

@frankfarzan
Copy link
Contributor

frankfarzan commented Jan 25, 2021

  • Finalize and publish ResourceList.Results as part of function Spec. A function should still be able to use coarse-grained exit codes to communicate failure.
  • Modify TS and Go clients to use the standard. See [1] [2]
  • Modify kpt CLI to output the aggregated results as a KRM resource (--results).

[1] https://pkg.go.dev/sigs.k8s.io/kustomize/kyaml/fn/framework/#Result
[2] https://github.com/GoogleContainerTools/kpt-functions-sdk/blob/3232610/ts/kpt-functions/src/types.ts#L375

@mikebz mikebz added the triaged Issue has been triaged by adding an `area/` label label Jan 29, 2021
@droot droot added this to the v1.0 alpha 2 milestone Mar 3, 2021
@droot droot added the size/XL 8 day label Mar 3, 2021
@droot droot added this to To do in kpt kanban board via automation Mar 3, 2021
@Shell32-Natsu Shell32-Natsu moved this from To do to In progress in kpt kanban board Mar 18, 2021
@Shell32-Natsu
Copy link
Contributor

Should we define the complete result schema in the spec or we just define a results field in the output list? The functionConfig is defined in latter way.

@frankfarzan
Copy link
Contributor Author

There are two different things:

  1. Wire format ResourceList.results, this is not a separate KRM.
  2. Output of the kpt CLI FunctionResults which is a KRM.

@droot
Copy link
Contributor

droot commented May 10, 2021

Linking a comment where we discuss confusion about two formats of results: #1923 (comment)

@mikebz mikebz modified the milestones: v1.0 m2, v1.0 m3 May 11, 2021
@mikebz mikebz moved this from In progress to To do in kpt kanban board May 11, 2021
@mikebz mikebz modified the milestones: v1.0 m3, v1.0 m4 Jun 9, 2021
@droot
Copy link
Contributor

droot commented Jun 10, 2021

@Shell32-Natsu Can you pl. audit both the SDKs and update the status on the second item in the checklist.

@Shell32-Natsu
Copy link
Contributor

@Shell32-Natsu Can you pl. audit both the SDKs and update the status on the second item in the checklist.

Both SDKs are not aligned with the spec.

  1. TS SDK
    1. FieldInfo.suggestedValue should be FieldInfo. proposedValue
    2. Result.file.path should be required
    3. Result.resourceRef.namespace should not be required.
    4. Result.severity should not be required.
    5. Severity warn should be warning.
  2. Go SDK
    1. Field.SuggestedValue should be Field.ProposedValue.
    2. ResultItem should have Tags.

@mikebz mikebz removed this from the v1.0 m4 milestone Jul 14, 2021
@droot droot assigned mengqiy and unassigned droot Aug 24, 2021
@droot droot added this to the Q3-2021 milestone Aug 24, 2021
@droot droot added this to ToDo in kpt kanban board Aug 25, 2021
@mengqiy mengqiy modified the milestones: Q3-2021, Q4-2021 Sep 22, 2021
@mengqiy mengqiy removed this from ToDo in kpt kanban board Sep 22, 2021
@mengqiy mengqiy added this to ToDo in kpt kanban board Jan 7, 2022
@droot droot removed this from ToDo in kpt kanban board May 18, 2022
@droot
Copy link
Contributor

droot commented May 28, 2022

This has been already addressed so closing this.

@droot droot closed this as completed May 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/fn-sdk Typescript SDK area/hydrate size/XL 8 day triaged Issue has been triaged by adding an `area/` label
Projects
None yet
Development

No branches or pull requests

6 participants