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

Add JobSink documentation #6005

Merged
merged 4 commits into from
Jun 7, 2024
Merged

Add JobSink documentation #6005

merged 4 commits into from
Jun 7, 2024

Conversation

pierDipi
Copy link
Member

@pierDipi pierDipi commented Jun 4, 2024

Fixes knative/eventing#7732

Proposed Changes

  • Add JobSink documentation
    • Usage
    • Examples

Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
@knative-prow knative-prow bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jun 4, 2024
@pierDipi
Copy link
Member Author

pierDipi commented Jun 4, 2024

/cc @Cali0707

Copy link

netlify bot commented Jun 4, 2024

Deploy Preview for knative ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 7023718
🔍 Latest deploy log https://app.netlify.com/sites/knative/deploys/666042c218baea0008680d66
😎 Deploy Preview https://deploy-preview-6005--knative.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@pierDipi
Copy link
Member Author

pierDipi commented Jun 4, 2024

/cc @Leo6Leo

@knative-prow knative-prow bot requested a review from Leo6Leo June 4, 2024 18:24
backoffDelay: "2007-03-01T13:00:00Z/P1Y2M10DT2H30M"
backoffDelay: "PT1S"
Copy link
Member Author

@pierDipi pierDipi Jun 4, 2024

Choose a reason for hiding this comment

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

Unrelated fix but I couldn't resist as it's so wrong that time

@Cali0707
Copy link
Member

Cali0707 commented Jun 4, 2024

@pierDipi do you want to wait for reviews from the users who requested the feature or should we just merge this if it is good?

@pierDipi
Copy link
Member Author

pierDipi commented Jun 5, 2024

@Cali0707 we can wait for a few days and then merge if we don't hear any feedback, we can always iterate based on the feedback as we get it

Copy link
Member

@matzew matzew left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

pretty neat stuff and very useful documentation!

@knative-prow knative-prow bot added the lgtm Indicates that a PR is ready to be merged. label Jun 5, 2024
Comment on lines +13 to +15
`JobSink` supports the full
Kubernetes [batch/v1 Job resource and features](https://kubernetes.io/docs/concepts/workloads/controllers/job/)
and Kubernetes Job queuing systems like [Kueue](https://kueue.sigs.k8s.io/).
Copy link
Member

Choose a reason for hiding this comment

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

Maybe mention something along the lines of except the .metadata.name field? As far as I know, we set the name ourselves

Copy link
Member Author

@pierDipi pierDipi Jun 6, 2024

Choose a reason for hiding this comment

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

I don't think this is a detail we can add here at the introduction (and also is kinda intuitive, if jobs are created dynamically "to create long-running asynchronous jobs and tasks" then a name can't be fixated)

Comment on lines +90 to +95
### Reading the event file

You can read the file and deserialize it using any [CloudEvents](https://github.com/cloudevents)
JSON deserializer.

For example, the following snippet reads an event using the CloudEvents Go SDK and processes it.
Copy link
Member

Choose a reason for hiding this comment

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

I think this section is a little confusing without some more context, because as far as I can tell we don't mention before this that the event is mounted as a file into the job

Copy link
Member Author

@pierDipi pierDipi Jun 6, 2024

Choose a reason for hiding this comment

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

It's in the first sentence after # Usage at line 24 ?

Copy link
Member

Choose a reason for hiding this comment

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

Ah, I guess I missed that - my bad!

@pierDipi
Copy link
Member Author

pierDipi commented Jun 7, 2024

/unhold

Copy link
Member

@Cali0707 Cali0707 left a comment

Choose a reason for hiding this comment

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

/approve

Copy link

knative-prow bot commented Jun 7, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Cali0707, matzew, pierDipi

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow knative-prow bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 7, 2024
@knative-prow knative-prow bot merged commit 25150d6 into knative:main Jun 7, 2024
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Triggering long running background jobs when events occurs
3 participants