Skip to content

Conversation

@Foxite
Copy link

@Foxite Foxite commented Apr 13, 2025

Adapted work from containrrr#2054.

To be able to do finegrained updates to container running a specific tag of an image i added this.

If an API update includes a tag in its image filter, it will not be ignored, but it's still possible to provide a tagless image name.

@nicholas-fedor nicholas-fedor self-assigned this Apr 14, 2025
@nicholas-fedor nicholas-fedor self-requested a review April 14, 2025 08:47
@codecov
Copy link

codecov bot commented Apr 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #205      +/-   ##
==========================================
+ Coverage   69.26%   69.49%   +0.22%     
==========================================
  Files          45       45              
  Lines        5030     5041      +11     
==========================================
+ Hits         3484     3503      +19     
+ Misses       1424     1416       -8     
  Partials      122      122              
Files with missing lines Coverage Δ
pkg/filters/filters.go 95.04% <100.00%> (+0.28%) ⬆️

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@nicholas-fedor nicholas-fedor added enhancement New feature or request type/minor labels Apr 14, 2025
@nicholas-fedor
Copy link
Owner

Reviewing now.
Upstream references (for documentation purposes):
containrrr#1932
containrrr#2054

@Foxite
Copy link
Author

Foxite commented Apr 14, 2025

Oddly enough, if I run go fmt locally, it does not have anything to change.

- Refactor `FilterByImage` to support optional tag matching with helper function `matchImageAndTag`
- Add tests for malformed image inputs in `filters_test.go`
- Update `http-api-mode.md` to document tag support in /v1/update endpoint
- Add reference in `arguments.md` for tag filtering discoverability
@nicholas-fedor
Copy link
Owner

I'm using Golangci-lint to provide more thorough linting requirements, which is why go fmt might have missed it.

@nicholas-fedor nicholas-fedor enabled auto-merge (squash) April 14, 2025 09:48
@nicholas-fedor nicholas-fedor disabled auto-merge April 14, 2025 09:52
nicholas-fedor
nicholas-fedor previously approved these changes Apr 14, 2025
@nicholas-fedor nicholas-fedor enabled auto-merge (squash) April 14, 2025 09:52
@nicholas-fedor nicholas-fedor disabled auto-merge April 14, 2025 09:53
- Add test for insecure HTTP URL warning in gotify notifier initialization
@nicholas-fedor nicholas-fedor enabled auto-merge (squash) April 14, 2025 10:48
@nicholas-fedor nicholas-fedor disabled auto-merge April 14, 2025 10:48
@nicholas-fedor nicholas-fedor enabled auto-merge (squash) April 14, 2025 10:49
nicholas-fedor
nicholas-fedor previously approved these changes Apr 14, 2025
@Foxite
Copy link
Author

Foxite commented Apr 14, 2025

Is that commit related to this feature?

@nicholas-fedor nicholas-fedor disabled auto-merge April 14, 2025 11:06
@nicholas-fedor nicholas-fedor merged commit 09cef3d into nicholas-fedor:main Apr 14, 2025
7 checks passed
@nicholas-fedor
Copy link
Owner

The addition of the Gotify test case was a Codacy issue.
Adding the test case was dual purposed to resolve the CI issue and added some coverage.

The CI features and settings that I'm using are still in need of fine-tuning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request type/minor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants