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

fix(cdevents-webhooks) : Adding support for Artifact Constraints and Parameters using CDEvents data #1732

Merged
merged 13 commits into from Dec 22, 2023

Conversation

rjalander
Copy link
Contributor

This PR has the changes to pass the CDEvents data to the Echo service, to validate the CDEvents data and run the pipeline executions with Artifact Constraints and Parameters.

Dependent PR : spinnaker/echo#1357

@spinnakerbot
Copy link
Contributor

The following commits need their title changed:

  • bbf335c: Adding Ce-Data to the request

Please format your commit title into the form:

<type>(<scope>): <subject>, e.g. fix(kubernetes): address NPE in status check

This allows us to easily generate changelogs & determine semantic version numbers when cutting releases. You can read more about commit conventions here.

@jasonmcintosh
Copy link
Member

Couple of concerns:

  • No tests - ideally a minimal test on this would be ideal
  • Headers... I understand that may be the way CDEvents stuff is coming in, but we KNOW headers can be MASSIVE in size so shoving what sounds like raw data in an HTTP Header seems... problematic. This seems like a problem WITH The CDEvents APIs/libraries off hand. Not sure if there's a better way to handle this?
  • Headers I THINK can be null so that "get(0)" could through an NPE. I could be wrong on this one...

@rjalander
Copy link
Contributor Author

rjalander commented Nov 13, 2023

Couple of concerns:

  • No tests - ideally a minimal test on this would be ideal
  • Headers... I understand that may be the way CDEvents stuff is coming in, but we KNOW headers can be MASSIVE in size so shoving what sounds like raw data in an HTTP Header seems... problematic. This seems like a problem WITH The CDEvents APIs/libraries off hand. Not sure if there's a better way to handle this?
  • Headers I THINK can be null so that "get(0)" could through an NPE. I could be wrong on this one...

There is an existing test for this endpoint to test with SUCCESS and BAD_REQUEST validations.

The headers are mandatory when sending CloudEvent as per required-attributes, but I can also get these from the cdevent object itself, like cdevent.getId(), cdevent.getSpecVersion(), cdevent.getType(), cdevent.getSource() to avoid get(0)

@rjalander
Copy link
Contributor Author

@jasonmcintosh Can you please merge this if there are no other comments. Thank you.

@jasonmcintosh jasonmcintosh added the ready to merge Approved and ready for merge label Dec 22, 2023
@mergify mergify bot added the auto merged label Dec 22, 2023
@mergify mergify bot merged commit 082e4d1 into spinnaker:master Dec 22, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants