Skip to content

refactor: move attestation initialization server side #2193

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

Merged
merged 6 commits into from
Jul 4, 2025

Conversation

migmartri
Copy link
Member

This PR moves the attestation initialization process to the server this includes:

If the workflow doesn't exist

  • Creation of the associated contract by providing some content
  • Connecting the new workflow to an existing contract referenced by its name
  • Creation of an empty default contract if needed

If the workflow exists

This changes is an improvement since it makes the process fully compatible with federated authentication as well a pre-requisite for #2190

migmartri added 2 commits July 3, 2025 22:39
Signed-off-by: Miguel Martinez <miguel@chainloop.dev>
Signed-off-by: Miguel Martinez <miguel@chainloop.dev>
@migmartri migmartri requested review from jiparis and javirln July 3, 2025 20:50
Signed-off-by: Miguel Martinez <miguel@chainloop.dev>
@migmartri migmartri changed the title feat: move attestation initialization server side refactor: move attestation initialization server side Jul 3, 2025
migmartri added 2 commits July 3, 2025 23:08
Signed-off-by: Miguel Martinez <miguel@chainloop.dev>
Signed-off-by: Miguel Martinez <miguel@chainloop.dev>
@@ -51,6 +51,11 @@ func newWorkflowCreateCmd() *cobra.Command {
// Try to find it by name
c, err := action.NewWorkflowContractDescribe(actionOpts).Run(contractRef, 0)
if err != nil || c == nil {
_, err := action.LoadFileOrURL(contractRef)
Copy link
Member Author

Choose a reason for hiding this comment

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

this is just to improve this other command error message, not specifically about this problem.

@migmartri migmartri marked this pull request as draft July 4, 2025 09:10
@migmartri
Copy link
Member Author

marked it as draft to enable server side contract validation

Signed-off-by: Miguel Martinez <miguel@chainloop.dev>
@migmartri migmartri marked this pull request as ready for review July 4, 2025 11:28
@migmartri migmartri merged commit 86ae009 into chainloop-dev:main Jul 4, 2025
13 checks passed
@migmartri migmartri deleted the update-tokens branch July 4, 2025 11:42
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.

confusing behavior att init --contract
2 participants