Conversation
Signed-off-by: d-honeybadger <komsa.darya@gmail.com>
Signed-off-by: d-honeybadger <komsa.darya@gmail.com>
f45ef27 to
3a07e5c
Compare
Signed-off-by: d-honeybadger <komsa.darya@gmail.com>
5db00d3 to
8b2a2ff
Compare
| artifactsHistoryLimit = app.Flag("artifacts-history-limit", "Each attempt to run the playbook/role generates a set of artifacts on disk. This settings limits how many of these to keep.").Default("10").Int() | ||
| pollStateMetricInterval = app.Flag("poll-state-metric", "State metric recording interval").Default("5s").Duration() | ||
| replicasCount = app.Flag("replicas", "Amount of replicas configured for the provider. When using more than 1 replica, reconciles will be sharded across them based on a modular hash.").Default("1").Int() | ||
| replicasCount = app.Flag("replicas", "Amount of replicas configured for the provider. When using more than 1 replica, reconciles will be sharded across them based on a modular hash.").Default("1").Uint32() |
There was a problem hiding this comment.
golangci-lint was complaining about int-uint32 conversion later in the code, which has the potential to overflow. I
changed all intermediate and this one "source" var relevant to this case to be uint32 in the first place. They are all things like replaca counts, number of shards and shard indices and cannot be negative.
| "github.com/crossplane/crossplane-runtime/pkg/statemetrics" | ||
| "github.com/google/uuid" | ||
| "github.com/spf13/afero" | ||
| "gopkg.in/yaml.v2" |
There was a problem hiding this comment.
Replaced this one with "sigs.k8s.io/yaml":
Linter complained that the struct that was getting yaml.Marshaled didn't have yaml struct tags. It only had json tags.
I saw no reason to add yaml tags given that sigs.k8s.io/yaml package exists, which works with (only) json tags and is just better for working with simple yaml (specifically, the subset of yaml that is json-representable).
…ng settings, fix int -> uint32 potential overflow, fix yaml package requiring yaml struct tags rather than json Signed-off-by: dkomsa <dkomsa@digitalocean.com>
8b2a2ff to
58d4d24
Compare
| GO_VERSION: '1.21' | ||
| GOLANGCI_VERSION: 'v1.56.2' | ||
| GO_VERSION: '1.23' | ||
| GOLANGCI_VERSION: 'v1.64.2' |
There was a problem hiding this comment.
need to prepare the migration to v2, this can be in a follow-up PR
There was a problem hiding this comment.
Yeah, there seem to be so many changes that I dreaded updating to v2 in this PR, but needs to get done someday
| } | ||
|
|
||
| func (e *external) Disconnect(ctx context.Context) error { | ||
| // Unimplemented, required by newer versions of crossplane-runtime |
There was a problem hiding this comment.
need to reflect this in the doc schemes but this can be done in a follow up PR too!
There was a problem hiding this comment.
Umm by schemes do you mean the diagrams under the docs/ dir? Or something else? Do you have editable sources for those images?
|
thanks @d-honeybadger
you did some local tests ? |
|
Thanks for the review @fahedouch! So, merging this one |
|
thanks @d-honeybadger, So we are ready for a release ^^ |
Description of your changes
Updates crossplane-runtime as well as k8s packages and go (so that k8s + crossplane are compatible).
Used this PR as inspiration: crossplane-contrib/provider-aws#2165
I have:
make reviewableto ensure this PR is ready for review.backport release-x.ylabels to auto-backport this PR if necessary.How has this code been tested
TODO: run locally and verify major functionality end-to-end