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

[COST-5544] Make leader election duration options configurable #459

Merged
merged 9 commits into from
Oct 11, 2024

Conversation

djnakabaale
Copy link
Contributor

No description provided.

Copy link

codecov bot commented Oct 7, 2024

Codecov Report

Attention: Patch coverage is 80.48780% with 8 lines in your changes missing coverage. Please review.

Project coverage is 80.78%. Comparing base (330f527) to head (d7a1d85).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
cmd/main.go 80.48% 8 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #459      +/-   ##
==========================================
+ Coverage   80.35%   80.78%   +0.42%     
==========================================
  Files          22       22              
  Lines        2729     2769      +40     
==========================================
+ Hits         2193     2237      +44     
+ Misses        434      430       -4     
  Partials      102      102              
Flag Coverage Δ
unittests 80.78% <80.48%> (+0.42%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
cmd/main.go 41.12% <80.48%> (+41.12%) ⬆️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 330f527...d7a1d85. Read the comment docs.

Copy link
Member

@maskarb maskarb left a comment

Choose a reason for hiding this comment

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

This is looking good! Tho I'm not sure we need those get-env functions in a separate file. I would just put them in main.go as internal functions for the time being and then move them out if there is a plan to use them elsewhere.

internal/utils/misc_utils.go Outdated Show resolved Hide resolved
internal/utils/misc_utils.go Outdated Show resolved Hide resolved
internal/utils/misc_utils.go Outdated Show resolved Hide resolved
internal/utils/misc_utils.go Outdated Show resolved Hide resolved
cmd/main.go Outdated Show resolved Hide resolved
djnakabaale and others added 3 commits October 10, 2024 16:08
- move getEnv functions to main.go
- drop enableLeaderElection var
@djnakabaale djnakabaale marked this pull request as ready for review October 11, 2024 16:27
maskarb
maskarb previously approved these changes Oct 11, 2024
Copy link
Member

@maskarb maskarb left a comment

Choose a reason for hiding this comment

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

This looks good to me. We can skip patch coverage for the rest of this PR. Thanks for making those other changes.

cmd/main.go Outdated Show resolved Hide resolved
@djnakabaale djnakabaale merged commit 78344ff into main Oct 11, 2024
10 of 11 checks passed
@djnakabaale djnakabaale deleted the cost-5544-leader-elect-config branch October 11, 2024 17:58
djnakabaale added a commit that referenced this pull request Nov 8, 2024
* [COST-5544] Make leader election duration options configurable

* move utils to internal dir

* move utils to internal dir

* define leader-elect flag

* Address feedback
- move getEnv functions to main.go
- drop enableLeaderElection var

* add unit tests

* include overriden values in log message
djnakabaale added a commit that referenced this pull request Nov 12, 2024
* update whats new in 3.3.0 (#360)

* update docs (#363)

* fix make downstream (#365)

* v3.3.0 bundle (#362)

* Bump library/golang from 1.22.3 to 1.22.5 (#372)

* Bump github.com/prometheus/common (#369)

* Bump docker/build-push-action from 5 to 6 in the ci-dependencies group (#368)

* [COST-5183] dont use csvReader.ReadAll to improve memory usage (#370)

* update go in go.mod to 1.22 (#373)

* Bump the testing-framework group with 2 updates (#374)

* Bump github.com/onsi/gomega in the testing-framework group (#375)

* Update badges (#384)

* update license badge

* clean up badges

* remove license badge

* Bump library/golang from 1.22.5 to 1.22.6 (#385)

* update whats new in 3.3.1 (#388)

* [COST-5377] update whats new in 3.3.1

* fix typo

* make bundle for v3.3.1 (#389)

* [COST-5409] Specify correct toolchain version number in go.mod (#394)

* [COST-5409] Specify correct toolchain version number in go.mod

* use mirco version

* definitely use toolchain and not micro version

* address non-constant format string in call to fmt.Errorf

* Red Hat Konflux update koku-metrics-operator (#402)

Signed-off-by: red-hat-konflux <konflux@no-reply.konflux-ci.dev>

Co-authored-by: red-hat-konflux <konflux@no-reply.konflux-ci.dev>

* [COST-1418] Report fields description (#192)

* initial thoughts on report fields description

* add link to queries and clean up

* add note on label required for ros queries

* clean up

* add a lil organization

* Update docs/report-fields-description.md

---------

Co-authored-by: David <davidjnthn@gmail.com>
Co-authored-by: Luke Couzens <lcouzens@redhat.com>

* Red Hat Konflux purge koku-metrics-operator (#407)

Signed-off-by: red-hat-konflux <konflux@no-reply.konflux-ci.dev>

Co-authored-by: red-hat-konflux <konflux@no-reply.konflux-ci.dev>

* Red Hat Konflux update koku-metrics-operator (#408)

Signed-off-by: red-hat-konflux <konflux@no-reply.konflux-ci.dev>

Co-authored-by: red-hat-konflux <konflux@no-reply.konflux-ci.dev>

* Update Konflux references (#410)

Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com>
Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com>

* Update Konflux references (#411)

* Update Konflux references

Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com>

* Remove deprecated sbom-json-check

---------

Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com>
Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com>
Co-authored-by: Sam Doran <github@samdoran.com>

* Red Hat Konflux purge koku-metrics-operator (#412)

Signed-off-by: red-hat-konflux <konflux@no-reply.konflux-ci.dev>

Co-authored-by: red-hat-konflux <konflux@no-reply.konflux-ci.dev>

* Red Hat Konflux update koku-metrics-operator (#422)

Signed-off-by: red-hat-konflux <konflux@no-reply.konflux-ci.dev>

Co-authored-by: red-hat-konflux <konflux@no-reply.konflux-ci.dev>

* [COST-5381] Konflux: Enable multi-arch builds (#426)

* enable multi-arch builds

* initially trigger for when all changes

* Update Konflux references (#427)

Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com>
Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com>

* Bump the testing-framework group across 1 directory with 2 updates (#416)

* Bump the prometheus group across 1 directory with 2 updates (#423)

* Update Konflux references (#428)

Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com>
Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com>

* [COST-5382] Konflux - prepare to add operator bundle component (#429)

* [COST-5382] Konflux - prepare to add operator bundle component

* wait to use konflux built images

* update paths to bundle assets in dockerfile
remove koku-metrics-operator older bundle copies

* Red Hat Konflux update koku-metrics-operator-bundle (#431)

Signed-off-by: red-hat-konflux <konflux@no-reply.konflux-ci.dev>

Co-authored-by: red-hat-konflux <konflux@no-reply.konflux-ci.dev>

* Update Konflux references (#430)

Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com>
Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com>

* Update Konflux references (#435)

Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com>
Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com>

* Update Konflux references (#438)

Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com>
Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com>

* Update pre-commit hook golangci/golangci-lint to v1.61.0 (#437)

Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com>
Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com>
Co-authored-by: David Nakabaale <devotee_rulers.0e@icloud.com>

* Update Konflux references (#440)

Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com>
Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com>

* Update Konflux references to e487185 (#441)

Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com>
Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com>

* [COST-5382] konflux: update bundle pipeline and use brew registry (#434)

* [COST-5534] Add renovate config (#443)

* add renovate config to reduce konflux reference updates
* fix typo

* Update Konflux references (#442)

Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com>
Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com>

* Update Konflux references (#445)

Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com>
Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com>

* Bump github.com/prometheus/client_golang in the prometheus group (#444)

* Update docker.io/library/golang Docker tag to v1.23.2 (#455)

Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com>
Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com>

* Update Konflux references (#454)

Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com>
Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com>

* Bump appleboy/ssh-action in the ci-dependencies group (#457)

Bumps the ci-dependencies group with 1 update: [appleboy/ssh-action](https://github.com/appleboy/ssh-action).


Updates `appleboy/ssh-action` from 1.0.3 to 1.1.0
- [Release notes](https://github.com/appleboy/ssh-action/releases)
- [Changelog](https://github.com/appleboy/ssh-action/blob/master/.goreleaser.yaml)
- [Commits](appleboy/ssh-action@v1.0.3...v1.1.0)

---
updated-dependencies:
- dependency-name: appleboy/ssh-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: ci-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump github.com/prometheus/common in the prometheus group (#458)

* Update Konflux references to 37b9187 (#461)

Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com>
Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com>

* [COST-5544] Make leader election duration options configurable (#459)

* [COST-5544] Make leader election duration options configurable

* move utils to internal dir

* move utils to internal dir

* define leader-elect flag

* Address feedback
- move getEnv functions to main.go
- drop enableLeaderElection var

* add unit tests

* include overriden values in log message

* Update Konflux references (#464)

Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com>
Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com>

* Update Konflux references (#468)

Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com>
Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com>

* Bump github.com/prometheus/client_golang in the prometheus group (#466)

* Bump github.com/prometheus/common in the prometheus group (#470)

* Update Konflux references (#472)

Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com>
Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com>

* update go toolchain version (#465)

* update go toolchain version

* add version label to dockerfile

* fix version  dockerfile

* undo adding version label in this pr

* [COST-5607] update whats new in 3.3.2 (#473)

* update whats new in 3.3.2

* text update

* add guidance on updating env variables

* clean up

* apply suggestion and add expected value format for leader election vars

* text update - modify expected format and include default values

* Update Konflux references (#475)

Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com>
Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com>

* update  features annotations (#476)

* [COST-5631] bundle for v3.3.2 (#477)

* [COST-5631] bundle for version koku-metrics-operator v3.3.2

* clean up make cmd

* update docs

* make downstream v3.3.2

* fix typo

* cleanup
- drop test scorecard from bundle

* undo some make cmd changes

* remove bundle updates to follow in separate pr

* fix filename

---------

Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Michael Skarbek <mskarbek@redhat.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com>
Co-authored-by: red-hat-konflux <konflux@no-reply.konflux-ci.dev>
Co-authored-by: David <davidjnthn@gmail.com>
Co-authored-by: Luke Couzens <lcouzens@redhat.com>
Co-authored-by: Sam Doran <github@samdoran.com>
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.

2 participants