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

Document watch and upcoming changes #436

Merged
merged 4 commits into from
Mar 11, 2020
Merged

Document watch and upcoming changes #436

merged 4 commits into from
Mar 11, 2020

Conversation

cben
Copy link
Collaborator

@cben cben commented Mar 11, 2020

Turns out watch was barely documented, while it very much needs documentation 😁
Preparation for 5.0 changes proposed in #275 (comment)

Also, the whole "Examples" section (which is really the main documentation) is messy, took a small step towards organizing it...

@grosser @qingling128 @mszabo @Stono please review

@cben
Copy link
Collaborator Author

cben commented Mar 11, 2020

  • In several places here, I neglected to say which exception / how exactly to detect 410 errors. I don't really want people to now write code catching HTTP errors and to check notice.code, I hope to fix them asap (and I intend to have a separate sub-exception for 410 because of its importance).

  • I didn't mention the new "BOOKMARK" type.
    Kubeclient doesn't know how to opt-in yet. Once we track last seen version, we could opt-in and honor these transparently without yielding them to the block. Will decide how to cross that bridge when we get there.
    I wondered if I should add generic advice to ignore unknown type for future compatibility? But if people did that now, we'd all be ignoring "type": "ERROR" 😆 And it seems k8s will make any new types opt-in.

@cben
Copy link
Collaborator Author

cben commented Mar 11, 2020

BTW, the terminology "watch notice" comes from Kubeclient::WatchNotice, which we dropped in #299. The k8s golang & opeapi type name is WatchEvent, so maybe should start using that?
https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#watchevent-v1-meta

Copy link

@mszabo mszabo left a comment

Choose a reason for hiding this comment

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

lgtm

@cben cben merged commit fae5cd9 into ManageIQ:master Mar 11, 2020
cben added a commit to cben/kubeclient that referenced this pull request Jun 14, 2020
Document watch and upcoming changes
@cben cben mentioned this pull request Jun 14, 2020
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.

3 participants