Skip to content

reconciler: append name to job names#158

Merged
joamaki merged 1 commit into
mainfrom
pr/giorio94/reconciler-job-names
May 8, 2026
Merged

reconciler: append name to job names#158
joamaki merged 1 commit into
mainfrom
pr/giorio94/reconciler-job-names

Conversation

@giorio94
Copy link
Copy Markdown
Member

@giorio94 giorio94 commented May 5, 2026

Respect the reconciler name configured through the [WithName] option when constructing the name of the jobs, to prevent them from conflicting (and consequently have the health scopes conflict) in case of multiple reconcilers inside the same module.

Respect the reconciler name configured through the [WithName] option
when constructing the name of the jobs, to prevent them from conflicting
(and consequently have the health scopes conflict) in case of multiple
reconcilers inside the same module.

Signed-off-by: Marco Iorio <marco.iorio@isovalent.com>
@giorio94 giorio94 requested a review from joamaki May 5, 2026 17:02
@giorio94 giorio94 requested a review from a team as a code owner May 5, 2026 17:02
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 5, 2026

$ make
go build ./...
go: downloading go.yaml.in/yaml/v3 v3.0.3
go: downloading github.com/cilium/hive v1.0.0
go: downloading golang.org/x/time v0.5.0
go: downloading github.com/spf13/cobra v1.8.0
go: downloading github.com/spf13/pflag v1.0.5
go: downloading github.com/cilium/stream v0.0.0-20240209152734-a0792b51812d
go: downloading github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de
go: downloading github.com/spf13/viper v1.18.2
go: downloading go.uber.org/dig v1.17.1
go: downloading golang.org/x/term v0.16.0
go: downloading github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc
go: downloading github.com/mitchellh/mapstructure v1.5.0
go: downloading golang.org/x/sys v0.17.0
go: downloading golang.org/x/tools v0.17.0
go: downloading github.com/spf13/cast v1.6.0
go: downloading github.com/fsnotify/fsnotify v1.7.0
go: downloading github.com/sagikazarmark/slog-shim v0.1.0
go: downloading github.com/spf13/afero v1.11.0
go: downloading github.com/subosito/gotenv v1.6.0
go: downloading github.com/hashicorp/hcl v1.0.0
go: downloading gopkg.in/ini.v1 v1.67.0
go: downloading github.com/magiconair/properties v1.8.7
go: downloading github.com/pelletier/go-toml/v2 v2.1.0
go: downloading gopkg.in/yaml.v3 v3.0.1
go: downloading golang.org/x/text v0.14.0
STATEDB_VALIDATE=1 go test ./... -cover -vet=all -test.count 1
go: downloading github.com/stretchr/testify v1.8.4
go: downloading go.uber.org/goleak v1.3.0
go: downloading golang.org/x/exp v0.0.0-20240119083558-1b970713d09a
go: downloading github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2
ok  	github.com/cilium/statedb	435.276s	coverage: 78.5% of statements
ok  	github.com/cilium/statedb/index	0.005s	coverage: 33.7% of statements
ok  	github.com/cilium/statedb/internal	0.021s	coverage: 42.9% of statements
ok  	github.com/cilium/statedb/lpm	4.849s	coverage: 77.3% of statements
ok  	github.com/cilium/statedb/part	75.341s	coverage: 87.7% of statements
ok  	github.com/cilium/statedb/reconciler	0.291s	coverage: 92.5% of statements
	github.com/cilium/statedb/reconciler/benchmark		coverage: 0.0% of statements
	github.com/cilium/statedb/reconciler/example		coverage: 0.0% of statements
go test -race ./... -test.count 1
ok  	github.com/cilium/statedb	39.899s
ok  	github.com/cilium/statedb/index	1.013s
ok  	github.com/cilium/statedb/internal	1.037s
ok  	github.com/cilium/statedb/lpm	2.864s
ok  	github.com/cilium/statedb/part	38.525s
ok  	github.com/cilium/statedb/reconciler	1.361s
?   	github.com/cilium/statedb/reconciler/benchmark	[no test files]
?   	github.com/cilium/statedb/reconciler/example	[no test files]
go test ./... -bench . -benchmem -test.run xxx
goos: linux
goarch: amd64
pkg: github.com/cilium/statedb
cpu: AMD EPYC 7763 64-Core Processor                
BenchmarkDB_WriteTxn_1-4                      	  670310	      1715 ns/op	    583223 objects/sec	    1000 B/op	      16 allocs/op
BenchmarkDB_WriteTxn_10-4                     	 1684821	       713.8 ns/op	   1400979 objects/sec	     520 B/op	       8 allocs/op
BenchmarkDB_WriteTxn_100-4                    	 1818735	       615.4 ns/op	   1625001 objects/sec	     536 B/op	       7 allocs/op
BenchmarkDB_WriteTxn_1000-4                   	 1731532	       688.0 ns/op	   1453536 objects/sec	     522 B/op	       7 allocs/op
BenchmarkDB_WriteTxn_100_SecondaryIndex-4     	  778950	      1419 ns/op	    704631 objects/sec	    1100 B/op	      20 allocs/op
BenchmarkDB_WriteTxn_CommitOnly_100Tables-4   	 1000000	      1149 ns/op	    1112 B/op	       5 allocs/op
BenchmarkDB_WriteTxn_CommitOnly_1Table-4      	 1608442	       745.8 ns/op	     224 B/op	       5 allocs/op
BenchmarkDB_NewWriteTxn-4                     	 1766156	       679.6 ns/op	     200 B/op	       4 allocs/op
BenchmarkDB_WriteTxnCommit100-4               	 1000000	      1180 ns/op	    1096 B/op	       5 allocs/op
BenchmarkDB_NewReadTxn-4                      	543132416	         2.191 ns/op	       0 B/op	       0 allocs/op
BenchmarkDB_Modify-4                          	    1580	    744202 ns/op	   1343721 objects/sec	  546075 B/op	    8094 allocs/op
BenchmarkDB_GetInsert-4                       	    1446	    829354 ns/op	   1205757 objects/sec	  530071 B/op	    8094 allocs/op
BenchmarkDB_RandomInsert-4                    	    1722	    703031 ns/op	   1422412 objects/sec	  522021 B/op	    7094 allocs/op
BenchmarkDB_RandomReplace-4                   	     428	   2806189 ns/op	    356355 objects/sec	 2073395 B/op	   29146 allocs/op
BenchmarkDB_SequentialInsert-4                	    1723	    689405 ns/op	   1450526 objects/sec	  522024 B/op	    7094 allocs/op
BenchmarkDB_SequentialInsert_Prefix-4         	     471	   2538384 ns/op	    393951 objects/sec	 3562635 B/op	   45541 allocs/op
BenchmarkDB_Changes_Baseline-4                	    1477	    818391 ns/op	   1221910 objects/sec	  582202 B/op	    9185 allocs/op
BenchmarkDB_Changes-4                         	     901	   1334227 ns/op	    749498 objects/sec	  783809 B/op	   12336 allocs/op
BenchmarkDB_RandomLookup-4                    	   21918	     54841 ns/op	  18234554 objects/sec	       0 B/op	       0 allocs/op
BenchmarkDB_SequentialLookup-4                	   26624	     45077 ns/op	  22184115 objects/sec	       0 B/op	       0 allocs/op
BenchmarkDB_Prefix_SecondaryIndex-4           	    6904	    163594 ns/op	   6112681 objects/sec	  124920 B/op	    1025 allocs/op
BenchmarkDB_FullIteration_All-4               	     982	   1084906 ns/op	  92173859 objects/sec	     104 B/op	       4 allocs/op
BenchmarkDB_FullIteration_Prefix-4            	     937	   1231177 ns/op	  81223063 objects/sec	     136 B/op	       5 allocs/op
BenchmarkDB_FullIteration_Get-4               	     213	   5574617 ns/op	  17938451 objects/sec	       0 B/op	       0 allocs/op
BenchmarkDB_FullIteration_Get_Secondary-4     	      98	  10240953 ns/op	   9764716 objects/sec	       0 B/op	       0 allocs/op
BenchmarkDB_FullIteration_ReadTxnGet-4        	     207	   5720242 ns/op	  17481779 objects/sec	       0 B/op	       0 allocs/op
BenchmarkDB_PropagationDelay-4                	  646743	      1782 ns/op	        14.00 50th_µs	        19.00 90th_µs	        58.00 99th_µs	    1120 B/op	      19 allocs/op
BenchmarkDB_WriteTxn_100_LPMIndex-4           	  489303	      2391 ns/op	    418171 objects/sec	    1825 B/op	      37 allocs/op
BenchmarkDB_WriteTxn_1_LPMIndex-4             	  135063	     14506 ns/op	     68936 objects/sec	   15797 B/op	      81 allocs/op
BenchmarkDB_LPMIndex_Get-4                    	     411	   2902340 ns/op	   3445495 objects/sec	       0 B/op	       0 allocs/op
BenchmarkWatchSet_4-4                         	 2227473	       532.8 ns/op	     296 B/op	       4 allocs/op
BenchmarkWatchSet_16-4                        	  732913	      1591 ns/op	    1096 B/op	       5 allocs/op
BenchmarkWatchSet_128-4                       	   86988	     13890 ns/op	    8904 B/op	       5 allocs/op
BenchmarkWatchSet_1024-4                      	    8715	    136083 ns/op	   73743 B/op	       5 allocs/op
PASS
ok  	github.com/cilium/statedb	43.656s
PASS
ok  	github.com/cilium/statedb/index	0.004s
goos: linux
goarch: amd64
pkg: github.com/cilium/statedb/internal
cpu: AMD EPYC 7763 64-Core Processor                
Benchmark_SortableMutex-4   	 6132904	       195.5 ns/op	       0 B/op	       0 allocs/op
PASS
ok  	github.com/cilium/statedb/internal	1.203s
goos: linux
goarch: amd64
pkg: github.com/cilium/statedb/lpm
cpu: AMD EPYC 7763 64-Core Processor                
Benchmark_txn_insert/batchSize=1-4         	    1850	    643911 ns/op	   1553009 objects/sec	  838408 B/op	   13975 allocs/op
Benchmark_txn_insert/batchSize=10-4        	    3026	    395155 ns/op	   2530654 objects/sec	  385195 B/op	    6668 allocs/op
Benchmark_txn_insert/batchSize=100-4       	    3297	    372508 ns/op	   2684504 objects/sec	  345613 B/op	    6027 allocs/op
Benchmark_txn_delete/batchSize=1-4         	    1554	    772001 ns/op	   1295335 objects/sec	 1286470 B/op	   13976 allocs/op
Benchmark_txn_delete/batchSize=10-4        	    3099	    382437 ns/op	   2614813 objects/sec	  372418 B/op	    5769 allocs/op
Benchmark_txn_delete/batchSize=100-4       	    3436	    344591 ns/op	   2901993 objects/sec	  286753 B/op	    5038 allocs/op
Benchmark_LPM_Lookup-4                     	    7885	    151459 ns/op	   6602466 objects/sec	       0 B/op	       0 allocs/op
Benchmark_LPM_All-4                        	  132868	      9038 ns/op	 110638663 objects/sec	      32 B/op	       1 allocs/op
Benchmark_LPM_Prefix-4                     	  132346	      9061 ns/op	 110362403 objects/sec	      32 B/op	       1 allocs/op
Benchmark_LPM_LowerBound-4                 	  251685	      4864 ns/op	 102794653 objects/sec	     288 B/op	       2 allocs/op
PASS
ok  	github.com/cilium/statedb/lpm	12.017s
goos: linux
goarch: amd64
pkg: github.com/cilium/statedb/part
cpu: AMD EPYC 7763 64-Core Processor                
Benchmark_Uint64Map_Random-4                  	    1536	    754635 ns/op	   1325144 items/sec	 2525066 B/op	    6053 allocs/op
Benchmark_Uint64Map_Sequential-4              	    1868	    642272 ns/op	   1556972 items/sec	 2216724 B/op	    5754 allocs/op
Benchmark_Uint64Map_Sequential_Insert-4       	    2055	    586298 ns/op	   1705616 items/sec	 2208720 B/op	    4753 allocs/op
Benchmark_Uint64Map_Sequential_Txn_Insert-4   	   10000	    102404 ns/op	   9765218 items/sec	   86352 B/op	    2028 allocs/op
Benchmark_Uint64Map_Random_Insert-4           	    1766	    677742 ns/op	   1475487 items/sec	 2519218 B/op	    5041 allocs/op
Benchmark_Uint64Map_Random_Txn_Insert-4       	    7429	    162628 ns/op	   6149005 items/sec	  117218 B/op	    2397 allocs/op
Benchmark_Insert_RootOnlyWatch-4              	   10000	    115902 ns/op	   8627952 objects/sec	   71504 B/op	    2033 allocs/op
Benchmark_Insert-4                            	    7836	    152958 ns/op	   6537727 objects/sec	  186937 B/op	    3060 allocs/op
Benchmark_Modify-4                            	   12206	     97960 ns/op	  10208230 objects/sec	   58224 B/op	    1007 allocs/op
Benchmark_GetInsert-4                         	    9204	    127417 ns/op	   7848260 objects/sec	   58224 B/op	    1007 allocs/op
Benchmark_Replace-4                           	31918297	        37.74 ns/op	  26499518 objects/sec	       0 B/op	       0 allocs/op
Benchmark_Replace_RootOnlyWatch-4             	31923716	        37.50 ns/op	  26665873 objects/sec	       0 B/op	       0 allocs/op
Benchmark_txn_1-4                             	 6153834	       192.6 ns/op	   5192207 objects/sec	     168 B/op	       3 allocs/op
Benchmark_txn_10-4                            	 9924856	       120.7 ns/op	   8288431 objects/sec	      86 B/op	       2 allocs/op
Benchmark_txn_100-4                           	11697288	       101.7 ns/op	   9831111 objects/sec	      80 B/op	       2 allocs/op
Benchmark_txn_1000-4                          	10302255	       116.0 ns/op	   8617410 objects/sec	      65 B/op	       2 allocs/op
Benchmark_txn_delete_1-4                      	 4817355	       246.6 ns/op	   4054840 objects/sec	     664 B/op	       4 allocs/op
Benchmark_txn_delete_10-4                     	11211040	       105.7 ns/op	   9463922 objects/sec	     106 B/op	       1 allocs/op
Benchmark_txn_delete_100-4                    	12558663	        93.85 ns/op	  10655344 objects/sec	      47 B/op	       1 allocs/op
Benchmark_txn_delete_1000-4                   	14894389	        79.49 ns/op	  12580254 objects/sec	      24 B/op	       1 allocs/op
Benchmark_Get-4                               	   44716	     26788 ns/op	  37329850 objects/sec	       0 B/op	       0 allocs/op
Benchmark_All-4                               	  120564	     10323 ns/op	  96870359 objects/sec	       0 B/op	       0 allocs/op
Benchmark_Iterator_All-4                      	  152938	      9962 ns/op	 100385543 objects/sec	       0 B/op	       0 allocs/op
Benchmark_Iterator_Next-4                     	  160466	      7438 ns/op	 134448297 objects/sec	     896 B/op	       1 allocs/op
Benchmark_Hashmap_Insert-4                    	   14744	     81329 ns/op	  12295769 objects/sec	   74264 B/op	      20 allocs/op
Benchmark_Hashmap_Get_Uint64-4                	  139606	      8575 ns/op	 116614344 objects/sec	       0 B/op	       0 allocs/op
Benchmark_Hashmap_Get_Bytes-4                 	  109917	     10838 ns/op	  92270560 objects/sec	       0 B/op	       0 allocs/op
Benchmark_Delete_Random-4                     	      87	  13694939 ns/op	   7301968 objects/sec	 2111848 B/op	  102364 allocs/op
Benchmark_find16-4                            	202146028	         5.935 ns/op	       0 B/op	       0 allocs/op
Benchmark_findIndex16-4                       	100000000	        10.44 ns/op	       0 B/op	       0 allocs/op
Benchmark_find48-4                            	383025223	         3.121 ns/op	       0 B/op	       0 allocs/op
Benchmark_findIndex48_hit-4                   	427271288	         2.806 ns/op	       0 B/op	       0 allocs/op
Benchmark_findIndex48_miss-4                  	383728729	         3.120 ns/op	       0 B/op	       0 allocs/op
Benchmark_find4-4                             	423795529	         2.829 ns/op	       0 B/op	       0 allocs/op
Benchmark_findIndex4-4                        	320568628	         3.745 ns/op	       0 B/op	       0 allocs/op
PASS
ok  	github.com/cilium/statedb/part	43.148s
PASS
ok  	github.com/cilium/statedb/reconciler	0.004s
?   	github.com/cilium/statedb/reconciler/benchmark	[no test files]
?   	github.com/cilium/statedb/reconciler/example	[no test files]
go run ./reconciler/benchmark -quiet
1000000 objects reconciled in 1.93 seconds (batch size 1000)
Throughput 518473.37 objects per second
888MB total allocated, 6015243 in-use objects, 338MB bytes in use

Copy link
Copy Markdown
Contributor

@joamaki joamaki left a comment

Choose a reason for hiding this comment

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

Thanks!

@joamaki joamaki merged commit e52f9d4 into main May 8, 2026
1 check passed
@joamaki joamaki deleted the pr/giorio94/reconciler-job-names branch May 8, 2026 08:56
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