diff --git a/.final_builds/jobs/eventgenerator/index.yml b/.final_builds/jobs/eventgenerator/index.yml index 8e7bab7378..18598cfdae 100644 --- a/.final_builds/jobs/eventgenerator/index.yml +++ b/.final_builds/jobs/eventgenerator/index.yml @@ -51,6 +51,10 @@ builds: version: e3ae55e29b673dac69700ef4d34595230ff67b020ba0a117ad39dc008318de68 blobstore_id: a421ef5f-5e2d-4482-4c0b-c8bef2428236 sha1: sha256:75c478917be942e8374a6ff7df8335f62ac6ea48ba3be80bd8efa46ad7c81eec + e951e5c78ceaf71f740bf125c92cb36c0954dc6e0088fc30587912fb362b0eb8: + version: e951e5c78ceaf71f740bf125c92cb36c0954dc6e0088fc30587912fb362b0eb8 + blobstore_id: 6831a6fc-4dfe-4f0a-6027-6e00c49c58d2 + sha1: sha256:c58fe1baccfa047d186289f63835cf1343ae64eaa6d4bbc0aa86f22edcfdd09b e9d1ddcd5dea3426a399bea07f63ca697b58e7afbbfac9ed3855de80ec38b8f3: version: e9d1ddcd5dea3426a399bea07f63ca697b58e7afbbfac9ed3855de80ec38b8f3 blobstore_id: 8601dd92-ec95-49f7-5efc-4bfdf75d64ed diff --git a/.final_builds/jobs/golangapiserver/index.yml b/.final_builds/jobs/golangapiserver/index.yml index 9423b271c0..f4ecaae8ed 100644 --- a/.final_builds/jobs/golangapiserver/index.yml +++ b/.final_builds/jobs/golangapiserver/index.yml @@ -11,10 +11,18 @@ builds: version: 0a32007a77e3af37b7b3458de11e197b5952eb3ff44d479bcba31462ecf8f2e4 blobstore_id: af973020-b2c0-4383-4f31-2da472fefdfe sha1: sha256:1559751186577281ddfea816d1bc32c28901032ec04b2135fb86eb8ad6a18d38 + 0a63a1ff0f4c1d40e2a832bb49e87cb2b3670ebb30b3efc3b5f30869ba7a2842: + version: 0a63a1ff0f4c1d40e2a832bb49e87cb2b3670ebb30b3efc3b5f30869ba7a2842 + blobstore_id: fac9f059-b1d8-4da2-73a9-0bcd016606ac + sha1: sha256:8f33781e309a47eebb768a53b8c4ccf0fda8ff1b2c604787a2c43c3046dfb2b2 0b30d180a2d7c30c6975485965da14db7792c6cc2aa2dbef4e5896619b316c08: version: 0b30d180a2d7c30c6975485965da14db7792c6cc2aa2dbef4e5896619b316c08 blobstore_id: f03adedd-d0cb-4472-4cde-656595570674 sha1: sha256:7e9ffc1533d3caa0354a08c0c291e77237a5539f651488a78ed8ef96cd66a1c6 + 1036b9da383abe282a90545920d75115471f66334e5f012ff9dd3d26730033e3: + version: 1036b9da383abe282a90545920d75115471f66334e5f012ff9dd3d26730033e3 + blobstore_id: 8f379321-291a-43f3-7a2f-c064c5d976b6 + sha1: sha256:fee48db9ed6c3f82cffa022052a48cfe7c10a45ed668b5a50474f35dddcdba6e 143e430b78a525f355eb585c75db666cae1ea108c0b3f5010e409ec3e9c8d30c: version: 143e430b78a525f355eb585c75db666cae1ea108c0b3f5010e409ec3e9c8d30c blobstore_id: 4cc7947c-2296-4d71-4800-33c332d7dc71 diff --git a/.final_builds/jobs/metricsforwarder/index.yml b/.final_builds/jobs/metricsforwarder/index.yml index 73d6d01f17..190d891177 100644 --- a/.final_builds/jobs/metricsforwarder/index.yml +++ b/.final_builds/jobs/metricsforwarder/index.yml @@ -3,6 +3,10 @@ builds: version: 0cd1da87f0f2fb95415efaa2d38eb02a4603c7d3722ff764efec7d1dfb95f136 blobstore_id: 55549d92-2b05-4b83-7d46-7479de1dee4d sha1: sha256:5b09dbe523a3f9dacefcf191c8334b9d636d010491df972f9959bf64c86d7a72 + 87d5d26c6370313877c2f14a4e08b769da16629c221a42fdda5b1a6f309f19c8: + version: 87d5d26c6370313877c2f14a4e08b769da16629c221a42fdda5b1a6f309f19c8 + blobstore_id: 98836409-6296-4984-61df-af3e47fa9c3a + sha1: sha256:18a5a9827c8d8c2aa0c51879e62b98f3ab86775f71b95b124b3140df072e685e 8ec2a304ce88d6b18d65cb68ebfae935f7e07a32d3c99bc396bada47ac278e3d: version: 8ec2a304ce88d6b18d65cb68ebfae935f7e07a32d3c99bc396bada47ac278e3d blobstore_id: afa32046-18f4-4783-4b63-6fd305cfabf8 diff --git a/.final_builds/jobs/metricsgateway/index.yml b/.final_builds/jobs/metricsgateway/index.yml index e697b0a958..00932a7623 100644 --- a/.final_builds/jobs/metricsgateway/index.yml +++ b/.final_builds/jobs/metricsgateway/index.yml @@ -23,6 +23,10 @@ builds: version: 7f1dc084e224a0dbcfac879938fff581cebcd35b96bed77f3914c60ff7064a42 blobstore_id: cfeb9b79-6bfc-4e25-6053-4ed3e4aa7523 sha1: sha256:88a6a6561688163ef657b8d48009949f5a48a8aaf88424eebbf9ff2d5fb13a2b + 91ed05735d79d7c7b3c520e25f06006b0ce435d36c8ab1135c0515b147f5c5fb: + version: 91ed05735d79d7c7b3c520e25f06006b0ce435d36c8ab1135c0515b147f5c5fb + blobstore_id: a3d3686c-61bd-4541-56e0-2872829fe9c3 + sha1: sha256:7cb21f4bf99c743cab9285c4526300d0f29f4363acb890ea737a8cd0ddb99d6e a059d38b6598b9ccddeb32dfd17501c0c3662d89c2bd613269a02cc91a440a01: version: a059d38b6598b9ccddeb32dfd17501c0c3662d89c2bd613269a02cc91a440a01 blobstore_id: ffff7371-806a-4910-4131-09112846cd0d diff --git a/.final_builds/jobs/metricsserver/index.yml b/.final_builds/jobs/metricsserver/index.yml index 78e4ccf84c..215d81a16f 100644 --- a/.final_builds/jobs/metricsserver/index.yml +++ b/.final_builds/jobs/metricsserver/index.yml @@ -1,4 +1,8 @@ builds: + 015b4c35cbada507e1755bc7d47357e13a080e76c210eef076f498c6fd8e104a: + version: 015b4c35cbada507e1755bc7d47357e13a080e76c210eef076f498c6fd8e104a + blobstore_id: 819c2155-da2b-4682-5f44-3bf9045e783a + sha1: sha256:a509c937cb61c9b5e3c4721c37cb27269e044d5eabc8c4c1baf4cebdbb1d713e 1d34832df8d6c96227fb2d3471351d01671020b0c734c32f66df1c6f355bd21c: version: 1d34832df8d6c96227fb2d3471351d01671020b0c734c32f66df1c6f355bd21c blobstore_id: ce411aa6-2613-42a6-4771-3b403cd3d38d diff --git a/.final_builds/jobs/operator/index.yml b/.final_builds/jobs/operator/index.yml index 0c7d4b9333..9a199978f2 100644 --- a/.final_builds/jobs/operator/index.yml +++ b/.final_builds/jobs/operator/index.yml @@ -31,6 +31,10 @@ builds: version: ae82e233077ab71abe3f9c17d5885505607695d4870606269466a2c941365d0c blobstore_id: 6cb01518-064c-476e-4a08-13d713a53e81 sha1: sha256:ba4f4581946ee7edb05b687e159dee7a23cf8d7b165a70a651e13dbca716a7e6 + bf11ee9215842fc7de55d6bc1e29dc23d1d947cad25a1af219c58299d2e2500a: + version: bf11ee9215842fc7de55d6bc1e29dc23d1d947cad25a1af219c58299d2e2500a + blobstore_id: f306d7d0-eaec-4e2b-4fd6-523d0c6b66cc + sha1: sha256:22fcaef786d2e68539318f44a5c2a0c37ed6057b6fc1dcffb8c219f152fbcee0 bf31d90bd3c67bb08d775ad4e9fd558a558e4895ffcca1c330b742d0a884ca14: version: bf31d90bd3c67bb08d775ad4e9fd558a558e4895ffcca1c330b742d0a884ca14 blobstore_id: 63775e42-e76b-4a59-6d4c-a3a82e6decd5 diff --git a/.final_builds/jobs/scalingengine/index.yml b/.final_builds/jobs/scalingengine/index.yml index e53538acf1..ddf64f7882 100644 --- a/.final_builds/jobs/scalingengine/index.yml +++ b/.final_builds/jobs/scalingengine/index.yml @@ -7,6 +7,10 @@ builds: version: 19a907d263b75e6f5be8515f2da5c14d2b487b30b305f2ebf75834a408d935d0 blobstore_id: 5d326f8b-34ab-4824-6eb9-e3b6ca1edd50 sha1: sha256:71d4a7094228abde7ffb08bc7ed0ac0fdd462ed3787c22196896abcdf035f0b4 + 3ebad910b309eb7127f9a2fe3f5bfa63d9ab7640274c06ee973b51a9cb21fb8d: + version: 3ebad910b309eb7127f9a2fe3f5bfa63d9ab7640274c06ee973b51a9cb21fb8d + blobstore_id: d2d426a3-d125-4d5a-4a2c-01c0176926d3 + sha1: sha256:f0356489569fcd80e4ee5e7d7d099b88578be12ff2db7c81b28755f99fdd162b 4126849a849819ad6b6e0aa605c0765d1c9241a6d9d2ff9d231008ef010ee462: version: 4126849a849819ad6b6e0aa605c0765d1c9241a6d9d2ff9d231008ef010ee462 blobstore_id: fb53a38c-a8d7-4615-5449-9424f453db5a diff --git a/.final_builds/jobs/scheduler/index.yml b/.final_builds/jobs/scheduler/index.yml index 603b051ce0..0a0c42e4c2 100644 --- a/.final_builds/jobs/scheduler/index.yml +++ b/.final_builds/jobs/scheduler/index.yml @@ -35,6 +35,10 @@ builds: version: 96284fc271b871ecb496fff4a2b7674bddf07e2c62acc3c853954d4259b7ec17 blobstore_id: f1c67149-ee39-4549-71ec-70b6f06cb78c sha1: sha256:13757c46cd45cd96b0848600c3034a6c30afac34a4467b5ce2cd9e532731663e + b83c28b3cdd6ceb40c8774a091862b19778b9211b25f0a0059f701f06f8ca2f6: + version: b83c28b3cdd6ceb40c8774a091862b19778b9211b25f0a0059f701f06f8ca2f6 + blobstore_id: 0a5e4e0a-acd2-406d-67d1-24bbbfd807ef + sha1: sha256:015e68ad82986eedc6ba403ebeb0c598c00b36b146ca3317a0be1e1be684fbb4 bf1de54cec481c311642179f87b5c0bf85c372ada7a72f2fb49e16c44e811aac: version: bf1de54cec481c311642179f87b5c0bf85c372ada7a72f2fb49e16c44e811aac blobstore_id: 8341bab4-bdcc-4fdc-72a7-ee4a9eaab8fe diff --git a/.final_builds/packages/changeloglockcleaner/index.yml b/.final_builds/packages/changeloglockcleaner/index.yml index 42647bc67b..c13de72c33 100644 --- a/.final_builds/packages/changeloglockcleaner/index.yml +++ b/.final_builds/packages/changeloglockcleaner/index.yml @@ -47,6 +47,10 @@ builds: version: 7f5f761a64b3fee5a56524704277a931bf85656579be207561695377672d6363 blobstore_id: cb5cd2b7-ad67-4886-4352-47e9f99a1e3a sha1: sha256:37fe9a32d956f7b4e29330a7ddc92bde40c48d4786fbe77e16fba41c6a4af932 + 81942e65f02ac92358ee1470cadd74270d931d18353f093c349519f70c0e0daa: + version: 81942e65f02ac92358ee1470cadd74270d931d18353f093c349519f70c0e0daa + blobstore_id: d29b0dea-70e9-4b46-4019-3be0d5b15712 + sha1: sha256:e2bf13079d34afbb230ec0eb88c72b91566c5ab4222b3cceb053941745db4626 83f6987ac5c5cced4a665a5b66dc535e15d3cc69b2564cf29ff69ac39a82704f: version: 83f6987ac5c5cced4a665a5b66dc535e15d3cc69b2564cf29ff69ac39a82704f blobstore_id: b7ad1533-7f7d-49fa-6496-90c6ee4cb8da @@ -99,6 +103,10 @@ builds: version: bb453cdfc605a0ede1b141b05efd05149e9fe56b892ee851d7805f078061a7f3 blobstore_id: addb9414-c72f-4d61-5597-d81d876f317d sha1: sha256:ff6196f388a4845498cac6ebf128580b71b6c07dd22a11bf109ae2bcf8586945 + bbd6b1bc309c9aee0cb7276885b7465bbf6009bc4c31bfcbf3eb882e6ec96783: + version: bbd6b1bc309c9aee0cb7276885b7465bbf6009bc4c31bfcbf3eb882e6ec96783 + blobstore_id: 52632ede-a58a-4e41-6b18-f8dd06e9e260 + sha1: sha256:ed67f19a318df287ec938ea3d5a18c43f838cad33fe1c23bdfc724c153333bb5 cfbc3e5733735c5c8220f649bca20a79e937edc99178078efb11b6dcd5c1e670: version: cfbc3e5733735c5c8220f649bca20a79e937edc99178078efb11b6dcd5c1e670 blobstore_id: 14d4b82f-81db-420a-7b87-3e8696f85ce4 diff --git a/.final_builds/packages/db/index.yml b/.final_builds/packages/db/index.yml index 8335a48b86..e52ccddcde 100644 --- a/.final_builds/packages/db/index.yml +++ b/.final_builds/packages/db/index.yml @@ -35,6 +35,10 @@ builds: version: 20c234a564b850e5bca0c4047f41151191e420f52f7169903fba4545e496d016 blobstore_id: cf99998b-3e5b-4f2d-702e-ddb7ac7204e1 sha1: sha256:bb53afeef28b4b1f2814b3504ac7cdea9a5809364431b651136cff4f78ccad2f + 215b5a2432adc26c8df0ccbaabdd43d477f157b67a1c183860d2406d4a179f28: + version: 215b5a2432adc26c8df0ccbaabdd43d477f157b67a1c183860d2406d4a179f28 + blobstore_id: b22a503a-9dee-47aa-7557-c10515c9b5cc + sha1: sha256:bc90fec7ba4f497813d4de3d719b365d008b23f15e2384e4d069adcc0d1345d3 26aec38d8aac24e6b83d3ab782975eff0b68fc883f60452dd198668bed77f081: version: 26aec38d8aac24e6b83d3ab782975eff0b68fc883f60452dd198668bed77f081 blobstore_id: 6c709146-39fc-4edf-69f9-8ad64d892490 @@ -91,6 +95,10 @@ builds: version: 77f74be7718ee64ab4c469bf8b691c8577b98a9556c0c6754c68fd105c198954 blobstore_id: 68f988bd-63f5-463b-4a7b-cc3b01eef39c sha1: sha256:cd21713c5daa2260722850e209f9c19da2a1e020c5a35e77a0eaee4b9b66cc62 + 78dc6ee98aba1e2b7ab50071b132601cbccae7897c44af5d7c9e7b0af37ce112: + version: 78dc6ee98aba1e2b7ab50071b132601cbccae7897c44af5d7c9e7b0af37ce112 + blobstore_id: 13d142df-9577-4fe9-5f51-5ac9445cd5ed + sha1: sha256:8ae98002bdd166a266e282ad93c3a443d5f6518d6ee0d48770c7143fcabf0702 887e8b0609ffb6ce8b34b153acd131792b86683a754aa1a4cf4d17ca1e898300: version: 887e8b0609ffb6ce8b34b153acd131792b86683a754aa1a4cf4d17ca1e898300 blobstore_id: 12bdb02d-eca9-4a1c-6b75-cc20348f31ed diff --git a/.final_builds/packages/eventgenerator/index.yml b/.final_builds/packages/eventgenerator/index.yml index e51b02bb27..18710adc6b 100644 --- a/.final_builds/packages/eventgenerator/index.yml +++ b/.final_builds/packages/eventgenerator/index.yml @@ -127,6 +127,10 @@ builds: version: b632e0a65199e3189c255efbd520866153f64d986620eebc3b599c7f1f28f05a blobstore_id: d851ecc2-c624-4378-5680-c24e0617affd sha1: sha256:656f1dd39a3bf2799b15c091dacff4a25ea0df570e1c82b83f5326edf8342c95 + c4fd65c24e956df31a0d8ceabe50632da288c1b0a0ae2e898ca3626e8ee804ad: + version: c4fd65c24e956df31a0d8ceabe50632da288c1b0a0ae2e898ca3626e8ee804ad + blobstore_id: 1f02e813-6fa8-4bcb-74b2-6dae33bd2b91 + sha1: sha256:3409af4a9eeb31b345fef4f3d14a0bc4cdc347cc803d8c7105a12f086a68544f c6800c8b79da99afab00effa688fbf4625fb0be0f906bfaa1a7fc728118ca81b: version: c6800c8b79da99afab00effa688fbf4625fb0be0f906bfaa1a7fc728118ca81b blobstore_id: d82d9cf8-519b-42b0-6405-78963f8138b2 @@ -171,6 +175,10 @@ builds: version: ee0d49e32400c8d84a5500e483aabb5ebf5d1efa7b83e72aa0b83f843c4c65ef blobstore_id: a460ae9b-06fc-43ac-52d6-2448b3f38b18 sha1: sha256:345d68567195b5d7fb8a0d1b7be79017f9c8ef82d049550783ebc24f7f542c5b + f556306b400b47708e8e9267d1a5282669b911827e8600122d2fc99a36ca4fe2: + version: f556306b400b47708e8e9267d1a5282669b911827e8600122d2fc99a36ca4fe2 + blobstore_id: 14e117ba-5103-4a87-493c-f5251b6ba7b9 + sha1: sha256:a948ba87c7bf003e919c74eefedb5b5b213a0e569612ac8d907ee90e055b22a9 f8d1cd635a7f90f58e594e5b0c704a7b8499c54d07d587d6fa53df635258015d: version: f8d1cd635a7f90f58e594e5b0c704a7b8499c54d07d587d6fa53df635258015d blobstore_id: 9c80ccee-8420-4785-6fde-e45e85d214cb diff --git a/.final_builds/packages/golang-1-linux/index.yml b/.final_builds/packages/golang-1-linux/index.yml index c20d3d65de..569ac2db3b 100644 --- a/.final_builds/packages/golang-1-linux/index.yml +++ b/.final_builds/packages/golang-1-linux/index.yml @@ -31,6 +31,10 @@ builds: version: 6f86822e163425375f3a1b9d781b678f30fd4b6ee619b033fcf5e7e18563e74e blobstore_id: 0a69914c-05f2-4397-4cc1-390d8b2b6640 sha1: sha256:33b1f2a465c2f163e5ef31e072b2c7692ae0758ca2b7866b61d98663a6ba6329 + 8c04109541f4d504f5be559da433998bd459b0f45cd3654557cc3642cc4d2f60: + version: 8c04109541f4d504f5be559da433998bd459b0f45cd3654557cc3642cc4d2f60 + blobstore_id: d2723887-4744-43c2-64e3-289fe6483132 + sha1: sha256:efdf65bca81264d9110ec764be7edea1de341781a1ffe59c219db064d71d9fc3 a54b33c812a8cfc39ba82782a23d74bf33f5a0a92012b41a101cc9d9d48d345c: version: a54b33c812a8cfc39ba82782a23d74bf33f5a0a92012b41a101cc9d9d48d345c blobstore_id: 5a8680dd-9f44-40ac-400b-52753e7c9b25 diff --git a/.final_builds/packages/golangapiserver/index.yml b/.final_builds/packages/golangapiserver/index.yml index 767e01abec..bd5e2b4009 100644 --- a/.final_builds/packages/golangapiserver/index.yml +++ b/.final_builds/packages/golangapiserver/index.yml @@ -15,6 +15,10 @@ builds: version: 21f79e24c45a25726b8a89a55436668a3bc12d914c8df271e345522e7fae83b1 blobstore_id: a123852b-7c36-49e8-7254-4d1d125a62c8 sha1: sha256:408aeb02d5c4adb90a30cf29175dddece9f0d59aa9286a3df5042d1a1433d6b8 + 255c3f6571c88b6f7701478400b9f9ab9efa574d256ff4a4ea38f35a6535ef27: + version: 255c3f6571c88b6f7701478400b9f9ab9efa574d256ff4a4ea38f35a6535ef27 + blobstore_id: add5e5e5-03b9-41f0-7629-dd41e0378b60 + sha1: sha256:fe8343260b81a0323c685f9c8b05fa98145b1ea3d5bd4cda9523819b8b22d9af 2d5cbd6b874010adb5ed983cc8ad084fedea8c6a75c5ae78524e149960c54de0: version: 2d5cbd6b874010adb5ed983cc8ad084fedea8c6a75c5ae78524e149960c54de0 blobstore_id: cd12d871-e8ed-4402-796b-cbfaddcdf7da @@ -39,6 +43,10 @@ builds: version: 38ba191fec6c93f427b27ea74ca4997fcf484a8a04e0c43f0b8d56d73294cf48 blobstore_id: abcb78f3-e6ca-4f1b-7be1-30da46ce34a6 sha1: sha256:9447cbeadcaf0025fc1f961056a596dad7680870117b13572ca46f7fa42cad45 + 421cbd1f220ade05a9f1b2c2c87b73ebf1b7a54f027410791cbf20093657556e: + version: 421cbd1f220ade05a9f1b2c2c87b73ebf1b7a54f027410791cbf20093657556e + blobstore_id: fba0fc7f-acfd-4cfb-6da9-a5a0faf03305 + sha1: sha256:13f34ca11cd08d52c551905c93c848e05826f622e9fe5e0d3e90eed872abc41f 42cb38456b771661f24564f8e210c43a0e27b8696aa756e6ba3952b8a2a7201e: version: 42cb38456b771661f24564f8e210c43a0e27b8696aa756e6ba3952b8a2a7201e blobstore_id: d00363eb-b6eb-4610-4605-c701c29ad6b7 diff --git a/.final_builds/packages/metricsforwarder/index.yml b/.final_builds/packages/metricsforwarder/index.yml index a2b879f034..e6d4906d2e 100644 --- a/.final_builds/packages/metricsforwarder/index.yml +++ b/.final_builds/packages/metricsforwarder/index.yml @@ -3,6 +3,10 @@ builds: version: 0542dc3eba60381c948b11c9febff5f704760d028592e9531b7cea746dd72d8c blobstore_id: 202f1fc2-3dd8-422b-5a3e-34c9fe9529fc sha1: sha256:5c7eb38fc0776ec61705aabafce789fee497d80e5b6308ed5460b65e72dcf7f6 + 0b7ea6c06556a84c5f1fbdc655a3735d1e1b7f22cb9b498d4e1e3cb7d12c07c7: + version: 0b7ea6c06556a84c5f1fbdc655a3735d1e1b7f22cb9b498d4e1e3cb7d12c07c7 + blobstore_id: 96b28ad0-4997-4a3d-569e-d44aa731651f + sha1: sha256:7213361a59b913600e0ed52bd4b3ef61db6a5e36e6d1d16de316e255399bf60b 0ddc7d7ee623fa39871f08bcebeca0ba1e6d49744b5918d49426584f7d24b17a: version: 0ddc7d7ee623fa39871f08bcebeca0ba1e6d49744b5918d49426584f7d24b17a blobstore_id: 4b186876-84b2-4547-4881-9bbee05fd4c6 @@ -135,6 +139,10 @@ builds: version: ca8b506fcea10dff481b130da2069a0a450608c0a3547ceef91f9d5e7abed0cb blobstore_id: fdd74477-e7ee-40fe-7b5c-19b537c2a32e sha1: sha256:1bbf48d6d4d047b28af31cc5c134359d2c3377cabcfa64b323a14377c36c2e50 + cf9db3934a2e988eacc7e99ba9840e153cc8ba5aa2f40fb1f289b6d80ce98327: + version: cf9db3934a2e988eacc7e99ba9840e153cc8ba5aa2f40fb1f289b6d80ce98327 + blobstore_id: e43bb31d-aed2-450e-5037-bd48c9559d67 + sha1: sha256:f536f8cf7ae9a3d70599ecc3b07ece82d19b36166adf7c8d21736d07ba7ac378 d0c69a01bb952802dfaebc67afde96d1a647cc037e052e50acecbb5a136e497d: version: d0c69a01bb952802dfaebc67afde96d1a647cc037e052e50acecbb5a136e497d blobstore_id: 1a750e8a-819d-4ea3-745c-087175d18330 diff --git a/.final_builds/packages/metricsgateway/index.yml b/.final_builds/packages/metricsgateway/index.yml index 8f83add6a3..53096363bf 100644 --- a/.final_builds/packages/metricsgateway/index.yml +++ b/.final_builds/packages/metricsgateway/index.yml @@ -175,8 +175,16 @@ builds: version: e3a0f04cb59606553559099eee46e56d13d1777eb53e64f7f3ea79eb1c55bc9a blobstore_id: 34fad434-e9f3-4694-410f-e4b0c6955a06 sha1: sha256:59ac15964532fd69e4d99490d3f42805d56397448292ec4c3f744ee28106edf7 + e3fa5fc434b93d0073573cf5ee961f99b06738fba6a1db2dd9666f4d14f7f9b7: + version: e3fa5fc434b93d0073573cf5ee961f99b06738fba6a1db2dd9666f4d14f7f9b7 + blobstore_id: a2debf8f-cc8d-44b7-576d-6654493024d0 + sha1: sha256:0476fcc8800c679479622f58d79d28a077f6f3da11d794bc4989843421c90c88 f913b8fa007f95480c339c1789bc4d09efcc02de0fee93234a1db28e5fa87e2d: version: f913b8fa007f95480c339c1789bc4d09efcc02de0fee93234a1db28e5fa87e2d blobstore_id: 3408cad5-7d22-4f84-493d-e809cca5d644 sha1: sha256:89534a69d49b588f6444f962235704947701cb2986e8793bbe51222f75a73986 + fe2fb17ee816b1b15106c38a308e7ebffa4961e9ffceb425de48f226a89c3832: + version: fe2fb17ee816b1b15106c38a308e7ebffa4961e9ffceb425de48f226a89c3832 + blobstore_id: 99a51645-aabb-4479-6672-aa12d273b115 + sha1: sha256:77d934bed7af4e22ff6b29b310a8b6330fd1882c803f6566517d5cb01e2b2964 format-version: "2" diff --git a/.final_builds/packages/metricsserver/index.yml b/.final_builds/packages/metricsserver/index.yml index 37d229f3e6..8329476dfb 100644 --- a/.final_builds/packages/metricsserver/index.yml +++ b/.final_builds/packages/metricsserver/index.yml @@ -43,6 +43,10 @@ builds: version: 2f398322f63c81e5c70112aac72c019ae3c3fd49e5925a496fb145d512ec46a8 blobstore_id: 53f1d45d-166c-4a22-581a-4fca75701c7f sha1: sha256:5c64644804e87aa7d05737b4498838aa44c3f1a3a7203965b29edd41206a5350 + 3049b380b5f477830b021d4c6dec064ed24e4d201fb054536a09446e7211c0b1: + version: 3049b380b5f477830b021d4c6dec064ed24e4d201fb054536a09446e7211c0b1 + blobstore_id: f770ef68-8213-4eaa-7224-d3992d7d0fb7 + sha1: sha256:155ffcc0697cae622474d3a4136067b2613db922a98def86d1f3daff795a1c9a 33ea5cfc40af50efd7f141531a7391efa682f0d306583510a5a5a42fade92375: version: 33ea5cfc40af50efd7f141531a7391efa682f0d306583510a5a5a42fade92375 blobstore_id: c253746c-de6c-4bac-6045-5470528d350e @@ -51,6 +55,10 @@ builds: version: 3953aec19748087e8bf1e5177c17346c18f61f704b624222c09789f8513e7af8 blobstore_id: 44e85bbe-2f58-4ac2-490b-c1f6ea00c381 sha1: sha256:58f0ed8579d6371a3e1b24a720f7e72076bfe36b42d732034461edbc65374b53 + 3a51dcf9ad0eb5cc7496f29721d9fa6b13e6e2a718f4e0735b32d422cf4311cc: + version: 3a51dcf9ad0eb5cc7496f29721d9fa6b13e6e2a718f4e0735b32d422cf4311cc + blobstore_id: 3abb5a5f-8c3c-416e-4bbe-a59884beebbc + sha1: sha256:b7f5d23434929585166121cc68127c37bebaa49002237969d3ece47510975e79 3d75143509df6b8b1108da4ecc2f308b37d78991d1f00a3d5873dccdfa24e90a: version: 3d75143509df6b8b1108da4ecc2f308b37d78991d1f00a3d5873dccdfa24e90a blobstore_id: 75f72f6b-274e-4edc-7aa7-5d4c7d4803ea diff --git a/.final_builds/packages/openjdk-17/index.yml b/.final_builds/packages/openjdk-17/index.yml index 6ac93fe9bd..d8ebe83239 100644 --- a/.final_builds/packages/openjdk-17/index.yml +++ b/.final_builds/packages/openjdk-17/index.yml @@ -15,4 +15,12 @@ builds: version: a1170a67f8927cb1861ceafbd406c8bd3ec2494f97fa9248c07e818ef7a016f2 blobstore_id: d7cc5f49-b426-4874-5eb6-654d9ef52f9b sha1: sha256:79c73943cffbcaf0ec06678ea4ec0d6301954a895cbe9579b15810942b79ac4f + be13f95495365f8879a75d9237320cd587774f6cbc087020bd6508fb8a82184a: + version: be13f95495365f8879a75d9237320cd587774f6cbc087020bd6508fb8a82184a + blobstore_id: 3313a7d9-e0ad-4370-638b-734956ddeb98 + sha1: sha256:99e2ef396973d7bbbfddffad6968b419627c20bb426117f8c3115cad5b206227 + c3119e0fe852da44c771e907a1c79d80103ac1e0a127ec4c30c90aa9c11459e0: + version: c3119e0fe852da44c771e907a1c79d80103ac1e0a127ec4c30c90aa9c11459e0 + blobstore_id: 68d1befc-806d-486a-4bc6-1d046ee71a30 + sha1: sha256:ad449f24f5a9e6971b8c9e3bb8e9500bbd5115a6872d3b95d8e0d96a60e896ed format-version: "2" diff --git a/.final_builds/packages/operator/index.yml b/.final_builds/packages/operator/index.yml index 70da2e772c..4533d15ba2 100644 --- a/.final_builds/packages/operator/index.yml +++ b/.final_builds/packages/operator/index.yml @@ -11,6 +11,10 @@ builds: version: 1362543cde6f1d898f821bd443ab32bb946ab56e3d2331d99bc313ad5a0cbb46 blobstore_id: 65cc1424-43cc-4b49-7f78-2e5283eddfb3 sha1: sha256:745d536d5486ba3a24452beb62d3f9288d3241299fe556cb1c5096fee3304696 + 13f8ba9aa586b607bca958f263417b2a702082532868787bedfb2d5b4ea54ca3: + version: 13f8ba9aa586b607bca958f263417b2a702082532868787bedfb2d5b4ea54ca3 + blobstore_id: 0a4fb740-59c1-4063-7536-edf9a3d6ba6b + sha1: sha256:80526139696238f0deebf61d8ce902f1523ad19e50fd3eb0a5899c9f637ae969 1723e343cd87855f87a0c117f13adeb0bb0d3a7c89ba461b4aff504f4f8977b9: version: 1723e343cd87855f87a0c117f13adeb0bb0d3a7c89ba461b4aff504f4f8977b9 blobstore_id: b38b9226-6751-4da8-6aae-346ef4f8d323 @@ -95,6 +99,10 @@ builds: version: 84f1473f55a3b9806847d387dfdc1a3423aaa36f9be09c85ea07e842da9e7528 blobstore_id: 2b150d31-d354-411a-7d9f-e17771426aab sha1: sha256:ae1ab4a028655097c337f9386a1a3a4aa9b27a72d5371cfa9b13c5e8f8c27b4d + 85910a843919e5874c030ec35bf99410934869d47968378235d098ea2671cd17: + version: 85910a843919e5874c030ec35bf99410934869d47968378235d098ea2671cd17 + blobstore_id: fa47866d-9cb3-402b-7f05-0e24fda45015 + sha1: sha256:baeed1093406aef9a9684089d74324b8c10a5c15b947f00d651f57ce02567e57 8734bcd68c0196f7dbaca79bfb5ec5fedd1fab4ad3e4637c95bd3671090e91a8: version: 8734bcd68c0196f7dbaca79bfb5ec5fedd1fab4ad3e4637c95bd3671090e91a8 blobstore_id: c6df52de-9fc0-4621-60da-aba63ffefca9 diff --git a/.final_builds/packages/scalingengine/index.yml b/.final_builds/packages/scalingengine/index.yml index eea458112d..5b969aa29f 100644 --- a/.final_builds/packages/scalingengine/index.yml +++ b/.final_builds/packages/scalingengine/index.yml @@ -15,6 +15,10 @@ builds: version: 0f3633d67a7947d14d40c70e7807a5625b67cb2e9bc92056aa67b9480b63959c blobstore_id: 625906ba-afa7-41b0-695c-8fab221070a9 sha1: sha256:aad60c4767b7d67a3d4eb5a104dc78617f9462f648551ec958ae6647af48af10 + 11d5c5962c9910e5bf5633d5c2c850d529d09a6ede0971812524f9a0031a944a: + version: 11d5c5962c9910e5bf5633d5c2c850d529d09a6ede0971812524f9a0031a944a + blobstore_id: 8928ae91-f841-42b2-4040-739806f7fd42 + sha1: sha256:b3e118ba8894dfc25eeef072498829df8ef62db34521ebcd77e4ef224dc9eb68 1b2554fc3dad89a314c70df92e68fbf92616ce765ab40e18b9fcf581ee584918: version: 1b2554fc3dad89a314c70df92e68fbf92616ce765ab40e18b9fcf581ee584918 blobstore_id: 795bb092-79ac-4f6b-4f94-959b5627f731 @@ -123,6 +127,10 @@ builds: version: 9e35f85bff3548a1c47ec74984ba757ec62bfed507c919152a022b790fbbc121 blobstore_id: 0e691e83-0fe0-4feb-768f-aa2666a345e3 sha1: sha256:46bf1043ba28adce816eed83f10eb63b1cc69eaac2f09f53ac0c28c109526c3a + a636487890b8bd44929dfdd6f8fa22b302b62c8849f0aac26197168594c50a86: + version: a636487890b8bd44929dfdd6f8fa22b302b62c8849f0aac26197168594c50a86 + blobstore_id: 7d19fa44-ed70-4f85-57f2-81b414480a17 + sha1: sha256:20d99c316a934cdd77bb276f41928ca4de76b0820cbce59032f7bba5ae0d44ae b2b648fc4ccde3fb57a369af46711518b0280dff4870280c40eff2846f0aeca6: version: b2b648fc4ccde3fb57a369af46711518b0280dff4870280c40eff2846f0aeca6 blobstore_id: 03047112-a0d7-4530-673b-f077313489b4 diff --git a/.final_builds/packages/scheduler/index.yml b/.final_builds/packages/scheduler/index.yml index 6624bde46e..b75f6644a5 100644 --- a/.final_builds/packages/scheduler/index.yml +++ b/.final_builds/packages/scheduler/index.yml @@ -19,6 +19,10 @@ builds: version: 1a9da3230df85b94280b32030864a7b1e49abb0318d936d172ecd6ac7775d984 blobstore_id: f00bc216-37fe-4a31-78cc-7275a4eb7705 sha1: sha256:6c70b8ae78d1d63bf51f114a6e75ae9336efc287ab02ae2e10d1e6d2700517b5 + 266a91165b8402333d2d4e3eb07fe00ae37f7b2a9c83c1c19502d390e66656db: + version: 266a91165b8402333d2d4e3eb07fe00ae37f7b2a9c83c1c19502d390e66656db + blobstore_id: f981c6a9-7671-4d39-7749-f989c7b3fa31 + sha1: sha256:d7b7e8aa80ac88eb5f151305099088231956e4bd827200aedd09bd79bf0297a5 2822fa6cdea9b724918c4ab953f61831a4428c29449c7f968c678573ddb201ba: version: 2822fa6cdea9b724918c4ab953f61831a4428c29449c7f968c678573ddb201ba blobstore_id: 2dfb40c5-9dcc-43b8-7d8d-902ba779516a @@ -195,6 +199,10 @@ builds: version: a9d9716f069279b349904f186bf73662fc50ecd5a8811bfec5d605ba5c769715 blobstore_id: 87f06c25-411c-41df-5835-82037089f2e2 sha1: sha256:878c5a530ca5ad8ad70dbb0f6efa8dba8a2b639ab45638f25c61c697210304f1 + b32421fef6ca7258f020038972176f991283d23c9a82a63d382711c518fed005: + version: b32421fef6ca7258f020038972176f991283d23c9a82a63d382711c518fed005 + blobstore_id: b5cd6ba7-3a9d-4647-43d0-1e5cf743c6a0 + sha1: sha256:ac630bac90afac3a86d03bcacf9e960894d6ebf20944b858841050f68bd41c55 b34fb76386febee5580db12369b25105fb980ff01e16f7e29ef39feb1aa5cc19: version: b34fb76386febee5580db12369b25105fb980ff01e16f7e29ef39feb1aa5cc19 blobstore_id: 32b42ad0-5e8f-4241-417a-30f1e952cfee diff --git a/.github/actions/setup-environment/action.yaml b/.github/actions/setup-environment/action.yaml index 7c63b99dcb..d9da3100da 100644 --- a/.github/actions/setup-environment/action.yaml +++ b/.github/actions/setup-environment/action.yaml @@ -8,7 +8,7 @@ runs: using: "composite" steps: - name: clone BBL repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: cloudfoundry/app-autoscaler-env-bbl-state ssh-key: ${{ inputs.ssh-key }} diff --git a/.github/workflows/acceptance_tests_broker_close.yaml b/.github/workflows/acceptance_tests_broker_close.yaml index b2e8c18607..f86fc51c28 100644 --- a/.github/workflows/acceptance_tests_broker_close.yaml +++ b/.github/workflows/acceptance_tests_broker_close.yaml @@ -16,7 +16,7 @@ jobs: container: image: ghcr.io/cloudfoundry/app-autoscaler-release-tools:main steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: path: app-autoscaler-release ref: main diff --git a/.github/workflows/acceptance_tests_buildin_close.yaml b/.github/workflows/acceptance_tests_buildin_close.yaml index 2cc7f8760e..67c08bd952 100644 --- a/.github/workflows/acceptance_tests_buildin_close.yaml +++ b/.github/workflows/acceptance_tests_buildin_close.yaml @@ -21,7 +21,7 @@ jobs: container: image: ghcr.io/cloudfoundry/app-autoscaler-release-tools:main steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: path: app-autoscaler-release ref: main diff --git a/.github/workflows/acceptance_tests_reusable.yaml b/.github/workflows/acceptance_tests_reusable.yaml index 43111a9cb0..9d84659522 100644 --- a/.github/workflows/acceptance_tests_reusable.yaml +++ b/.github/workflows/acceptance_tests_reusable.yaml @@ -62,7 +62,7 @@ jobs: checks: write steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: app-autoscaler-release - name: Create pending check @@ -79,7 +79,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: app-autoscaler-release - name: Setup environment for deployment @@ -87,9 +87,8 @@ jobs: with: ssh-key: ${{ secrets.bbl_ssh_key}} - name: Deploy autoscaler - run: | - cd "${AUTOSCALER_DIR}" - make deploy-autoscaler + shell: bash + run: make --directory="${AUTOSCALER_DIR}" deploy-autoscaler acceptance_tests: needs: [ deploy_autoscaler ] @@ -103,7 +102,7 @@ jobs: name: "[ ${{ matrix.suite }} ] ${{ github.workflow }}" steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: app-autoscaler-release - name: Setup environment for acceptance tests @@ -113,10 +112,15 @@ jobs: - name: Run acceptance test - ${{ matrix.suite }} env: MATRIX_SUITE: ${{ matrix.suite }} + shell: bash run: | - cd "${AUTOSCALER_DIR}" - make acceptance-tests SUITES="${MATRIX_SUITE,,}" + #! /usr/bin/env bash + set -eu -o pipefail + + make --directory="${AUTOSCALER_DIR}/src/acceptance/assets/app/go_app" generate-fakes + make --directory="${AUTOSCALER_DIR}/src/autoscaler" generate-fakes + make --directory="${AUTOSCALER_DIR}" acceptance-tests SUITES="${MATRIX_SUITE,,}" acceptance_tests_verify: name: "${{ github.workflow }} Result" @@ -130,7 +134,7 @@ jobs: checks: write steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: app-autoscaler-release - name: Verify jobs execution @@ -148,7 +152,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: app-autoscaler-release - name: Setup environment for deployment cleanup diff --git a/.github/workflows/bosh-release-checks.yaml b/.github/workflows/bosh-release-checks.yaml index c7332c9871..c30957fe4a 100644 --- a/.github/workflows/bosh-release-checks.yaml +++ b/.github/workflows/bosh-release-checks.yaml @@ -13,15 +13,19 @@ jobs: runs-on: ubuntu-latest container: image: ghcr.io/cloudfoundry/app-autoscaler-release-tools:main - steps: - name: Trust my checkout run: git config --global --add safe.directory "${GITHUB_WORKSPACE}" - - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: sync-package-specs - run: make package-specs + shell: bash + run: | + #! /usr/bin/env bash + set -eu -o pipefail + make --directory='./src/acceptance/assets/app/go_app' generate-fakes + make --directory='./src/autoscaler' generate-fakes + make package-specs - name: Check if there is any change run: | [ $(git status --porcelain | wc -l) -eq 0 ] || \ @@ -30,7 +34,6 @@ jobs: echo "::error::Specs are out of date, run \"make package-specs\" to update";\ exit 1;\ } - bosh-release: needs: generate-gosub name: Create Bosh Release @@ -41,16 +44,22 @@ jobs: - name: Trust my checkout run: git config --global --add safe.directory "${GITHUB_WORKSPACE}" - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Run Update + shell: bash run: | - set -e - export PATH=$PATH:/usr/local/maven/bin - make mod-tidy vendor db scheduler + #! /usr/bin/env bash + set -eu -o pipefail + + make --directory='./src/acceptance/assets/app/go_app' generate-fakes + make --directory='./src/autoscaler' generate-fakes + + export PATH="${PATH}:/usr/local/maven/bin" + make go-mod-tidy go-mod-vendor db scheduler - name: Build Dev Release id: build - uses: orange-cloudfoundry/bosh-release-action@v2.0.0 + uses: orange-cloudfoundry/bosh-release-action@v2.1.0 - name: Compile Dev Release uses: cloudfoundry/bosh-compile-action@main diff --git a/.github/workflows/bosh-templates.yaml b/.github/workflows/bosh-templates.yaml index a507baf787..811e1ec5d4 100644 --- a/.github/workflows/bosh-templates.yaml +++ b/.github/workflows/bosh-templates.yaml @@ -15,7 +15,7 @@ jobs: image: ghcr.io/cloudfoundry/app-autoscaler-release-tools:main steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Ruby uses: ruby/setup-ruby@v1 diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 918474a53f..59c1fc7388 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -44,7 +44,7 @@ jobs: # Learn more about CodeQL language support at https://git.io/codeql-language-support steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL diff --git a/.github/workflows/dependency-spec-updates.yaml b/.github/workflows/dependency-spec-updates.yaml index d867510745..d79e5191cb 100644 --- a/.github/workflows/dependency-spec-updates.yaml +++ b/.github/workflows/dependency-spec-updates.yaml @@ -8,10 +8,16 @@ jobs: image: ghcr.io/cloudfoundry/app-autoscaler-release-tools:main if: contains(fromJson('["dependabot[bot]", "renovate[bot]"]'), github.event.pull_request.user.login) && contains(github.event.pull_request.labels.*.name, 'dependencies') steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: package-specs + shell: bash run: | + #! /usr/bin/env bash + set -eu -o pipefail + + make --directory='./src/acceptance/assets/app/go_app' generate-fakes + make --directory='./src/autoscaler' generate-fakes make package-specs - name: Check if there are changes id: changes @@ -23,5 +29,3 @@ jobs: add: './packages/**/spec' message: 'Updating spec files from `dependabot[bot]` changes' push: true - - diff --git a/.github/workflows/dependency-update.go-mod-tidy_and_make-package-specs.yaml b/.github/workflows/dependency-update.go-mod-tidy_and_make-package-specs.yaml new file mode 100644 index 0000000000..9d9401a253 --- /dev/null +++ b/.github/workflows/dependency-update.go-mod-tidy_and_make-package-specs.yaml @@ -0,0 +1,99 @@ +name: "renovate-/ospo-bot: go mod tidy and make package-specs" +on: + pull_request: + branches: + - "renovate/**" + - "dependabot/**" + paths: + - ".github/workflows/dependency-update-go-mod-tidy.yaml" + - "src/**/go.mod" + - "src/**/go.sum" + push: + # TODO: As soon as Github solves issue + # and this event-configuration remains identical to the one for `pull_request`, + # anchors and aliases may be used, see the official + # [yaml-documentation](). + branches: + - "renovate/**" + - "dependabot/**" + paths: + - ".github/workflows/dependency-update-go-mod-tidy.yaml" + - "src/**/go.mod" + - "src/**/go.sum" + workflow_dispatch: {} +jobs: + pkgs-specs_and_go-mod-tidy: + name: "go mod tidy && make package-specs" + runs-on: ubuntu-latest + permissions: + pull-requests: write + contents: write + steps: + # We potentially want to add at the end a commit by the author of the most recent + # commit in this branch. However github has some protection which prevents workflows + # to run in case a commit has been pushed with the default job-specific github-token. + # For this case we need to use another one here. + # + # For more information, see: + # + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + submodules: true + token: ${{ secrets.APP_AUTOSCALER_CI_TOKEN }} # With push token that can trigger new PR jobs + - name: Configure git + shell: bash + run: | + #! /usr/bin/env bash + set -eu -o pipefail + + declare -r commit_author_name="${{github.event.head_commit.author.name}}" + declare -r commit_author_email="${{github.event.head_commit.author.email}}" + + git config --global --add safe.directory "${GITHUB_WORKSPACE}" + git config user.name "${commit_author_name}" + git config user.email "${commit_author_email}" + - name: go-mod-tidy and make package-specs + shell: bash + run: | + #! /usr/bin/env bash + set -eu -o pipefail + + # We need the subsequent standard-message to determine if the last commit + # has already cleaned up everything. In this case this workflow should not + # change anything and we exit early. + # An alternative would be to use a tag for this. But this does affect the whole + # PR instead of just the latest commit. + declare -r tidy_message='🤖🦾🛠️ go mod tidy & make package-specs' + + declare -r commit_author_name="${{github.event.head_commit.author.name}}" + declare -r commit_message="${{github.event.head_commit.message}}" + + if [[ ! "${commit_author_name}" =~ ('dependabot'|'renovate')'[bot]' ]] \ + || [[ "${commit_message}" == "${tidy_message}" ]] + then + echo 'This commit was not by a known bot or already an automatic `go mod tidy`! Exiting …' + exit 0 + fi + + # Generated files are needed for `go mod tidy` which is a dependency of the + # target `package-specs`. However the generation of them itself already + # requires go-modules to be tidied up. So we need to generate the files + # before changing `go.mod` and `go.sum`. + declare -r current_branch="$(git branch --show-current)" + git checkout 'HEAD~1' + make --directory='./src/acceptance/assets/app/go_app' generate-fakes + make --directory='./src/autoscaler' generate-fakes + git checkout "${current_branch}" + + # ⚠️ For this workflow to be successful, the subsequent line must not + # trigger again the creation of the generated files. + make package-specs + + declare -i -r changed_files=$(git status --porcelain | wc --lines) + if ((changed_files >= 0)) + then + git add . + git commit --message="${tidy_message}" + git push + fi diff --git a/.github/workflows/generate.yaml b/.github/workflows/generate.yaml deleted file mode 100644 index 829bd0ae5e..0000000000 --- a/.github/workflows/generate.yaml +++ /dev/null @@ -1,40 +0,0 @@ -name: generate -on: - pull_request: - -defaults: - run: - shell: bash - -concurrency: - group: "${{ github.workflow }}/${{ github.ref }}" - cancel-in-progress: true - -jobs: - generate: - name: ensure fakes are up to date - runs-on: ubuntu-latest - container: - image: ghcr.io/cloudfoundry/app-autoscaler-release-tools:main - steps: - - uses: actions/checkout@v3 - - name: Go Build - run: | - git config --global --add safe.directory ${GITHUB_WORKSPACE} - - pushd src/autoscaler - make buildtools - make generate - git diff - git status - popd - - - name: Check if there is any change - id: get_changes - run: echo "changed=$(git status --porcelain | wc -l)" >> "${GITHUB_OUTPUT}" - - name: Process changes - if: steps.get_changes.outputs.changed != 0 - run: | - git status - echo "::error::Fakes are out of date, run make generate to update" - exit 1 diff --git a/.github/workflows/golangci-lint.yaml b/.github/workflows/golangci-lint.yaml deleted file mode 100644 index 152cb40ad6..0000000000 --- a/.github/workflows/golangci-lint.yaml +++ /dev/null @@ -1,61 +0,0 @@ -name: golangci-lint -on: - pull_request: - -concurrency: - group: "${{ github.workflow }}/${{ github.ref }}" - cancel-in-progress: true - -jobs: - golangci: - name: lint - # DO NOT PIN THIS TO A GO VERSION! - # We automatically use the go minor version in the mod file and will miss golang updates and issues relate to new go versions. - # Yes there is one linter rowserrcheck automatically turned off because of generics - # - unless we are doing DB development it does not matter, and it should be fixed soon. - runs-on: ubuntu-latest - container: - image: ghcr.io/cloudfoundry/app-autoscaler-release-tools:main - steps: - - name: Trust my checkout - run: git config --global --add safe.directory "${GITHUB_WORKSPACE}" - - uses: actions/checkout@v3 - - - name: get golangci-lint version - id: lint - run: | - version=$(cat src/autoscaler/go.mod | grep golangci-lint | cut -d " " -f 2 | sed -E 's/(v[0-9]+\.[0-9]+.[0-9]+).*/\1/') - echo "golangci-lint version: '${version}'" - echo "version=${version}" >> $GITHUB_OUTPUT; - - - name: lint acceptance - uses: golangci/golangci-lint-action@v3.6.0 - with: - working-directory: src/acceptance - args: --config='../../.golangci.yaml' -v --timeout='2m' - version: ${{ steps.lint.outputs.version }} - skip-cache: true - - - name: lint autoscaler - uses: golangci/golangci-lint-action@v3.6.0 - with: - working-directory: src/autoscaler - args: --config='../../.golangci.yaml' --timeout='2m' - version: ${{ steps.lint.outputs.version }} - skip-cache: true - - - name: lint changelog - uses: golangci/golangci-lint-action@v3.6.0 - with: - working-directory: src/changelog - args: --config ../../.golangci.yaml - version: ${{ steps.lint.outputs.version }} - skip-cache: true - - - name: lint changeloglockcleaner - uses: golangci/golangci-lint-action@v3.6.0 - with: - working-directory: src/changeloglockcleaner - args: --config ../../.golangci.yaml - version: ${{ steps.lint.outputs.version }} - skip-cache: true diff --git a/.github/workflows/image.yaml b/.github/workflows/image.yaml index 1ccddb20f2..fa0e56bf66 100644 --- a/.github/workflows/image.yaml +++ b/.github/workflows/image.yaml @@ -32,10 +32,10 @@ jobs: name: Build and Push app-autoscaler-ci-${{ matrix.image_suffix }} steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Log in to the Container registry - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} @@ -43,7 +43,7 @@ jobs: - name: Extract metadata (tags, labels) for Docker id: meta - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v5 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-${{ matrix.image_suffix }} @@ -63,7 +63,7 @@ jobs: - name: Build and push id: build-and-push - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: ci/dockerfiles/autoscaler-${{ matrix.image_suffix }} push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} diff --git a/.github/workflows/java-ci-lint.yaml b/.github/workflows/java-ci-lint.yaml index b3a49f2197..53ddb0cc7e 100644 --- a/.github/workflows/java-ci-lint.yaml +++ b/.github/workflows/java-ci-lint.yaml @@ -19,7 +19,7 @@ jobs: container: image: ghcr.io/cloudfoundry/app-autoscaler-release-tools:main steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Check Code Formatting run: | diff --git a/.github/workflows/linters.yaml b/.github/workflows/linters.yaml index 3f9164c8d4..1996c0edff 100644 --- a/.github/workflows/linters.yaml +++ b/.github/workflows/linters.yaml @@ -10,7 +10,28 @@ jobs: image: ghcr.io/cloudfoundry/app-autoscaler-release-tools:main steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 + + - name: Trust my checkout + run: git config --global --add safe.directory "${GITHUB_WORKSPACE}" + - name: make build-all + run: | + make build-all + + - name: get golangci-lint version + id: get-golangci-lint-version + run: | + version=v$(grep golangci-lint .tool-versions | cut -d " " -f 2 ) + echo "golangci-lint version from .tool-versions: '${version}'" + echo "version=${version}" >> "$GITHUB_OUTPUT"; + + - name: get go version + id: get-golang-version + run: | + version="$(grep "golang " .tool-versions| cut -f 2 -d " ")" + echo "Go version from .tool-versions: '${version}'" + echo "version=${version}" >> "$GITHUB_OUTPUT"; + - name: Set up Ruby uses: ruby/setup-ruby@v1 with: @@ -18,7 +39,8 @@ jobs: bundler-cache: true env: # Needed for self-hosted runner - ImageOS: "ubuntu22" + ImageOS: ubuntu22 + - name: shellcheck uses: reviewdog/action-shellcheck@v1 with: @@ -41,3 +63,53 @@ jobs: uses: reviewdog/action-markdownlint@v0 with: reporter: github-pr-review + + - name: lint acceptance + uses: reviewdog/action-golangci-lint@v2 + with: + workdir: src/acceptance + go_version: ${{ steps.get-golang-version.outputs.version }} + golangci_lint_version: ${{ steps.get-golangci-lint-version.outputs.version }} + reporter: github-pr-review + filter_mode: nofilter + fail_on_error: true + + - name: lint go test app + uses: reviewdog/action-golangci-lint@v2 + with: + workdir: src/acceptance/assets/app/go_app + go_version: ${{ steps.get-golang-version.outputs.version }} + golangci_lint_version: ${{ steps.get-golangci-lint-version.outputs.version }} + reporter: github-pr-review + filter_mode: nofilter + fail_on_error: true + + - name: lint autoscaler + uses: reviewdog/action-golangci-lint@v2 + with: + workdir: src/autoscaler + go_version: ${{ steps.get-golang-version.outputs.version }} + golangci_lint_version: ${{ steps.get-golangci-lint-version.outputs.version }} + reporter: github-pr-review + filter_mode: nofilter + fail_on_error: true + + - name: lint changelog + uses: reviewdog/action-golangci-lint@v2 + with: + workdir: src/changelog + go_version: ${{ steps.get-golang-version.outputs.version }} + golangci_lint_version: ${{ steps.get-golangci-lint-version.outputs.version }} + reporter: github-pr-review + filter_mode: nofilter + fail_on_error: true + + - name: lint changeloglockcleaner + uses: reviewdog/action-golangci-lint@v2 + with: + workdir: src/changeloglockcleaner + go_version: ${{ steps.get-golang-version.outputs.version }} + golangci_lint_version: ${{ steps.get-golangci-lint-version.outputs.version }} + reporter: github-pr-review + filter_mode: nofilter + fail_on_error: true diff --git a/.github/workflows/manifest.yaml b/.github/workflows/manifest.yaml index cb9173a456..7a5e325683 100644 --- a/.github/workflows/manifest.yaml +++ b/.github/workflows/manifest.yaml @@ -22,7 +22,7 @@ jobs: image: ghcr.io/cloudfoundry/app-autoscaler-release-tools:main steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Run Tests - Manifest run: | diff --git a/.github/workflows/mysql.yaml b/.github/workflows/mysql.yaml index 1168937c0b..f19bb7766e 100644 --- a/.github/workflows/mysql.yaml +++ b/.github/workflows/mysql.yaml @@ -39,7 +39,7 @@ jobs: - name: Trust my checkout run: git config --global --add safe.directory "${GITHUB_WORKSPACE}" - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: make build run: | make build db_type=mysql diff --git a/.github/workflows/openapi-specs-check.yaml b/.github/workflows/openapi-specs-check.yaml new file mode 100644 index 0000000000..8a8044176d --- /dev/null +++ b/.github/workflows/openapi-specs-check.yaml @@ -0,0 +1,18 @@ +name: "Validate OpenAPI-Specifications" +on: + pull_request: +jobs: + validate: + runs-on: ubuntu-latest + container: + image: ghcr.io/cloudfoundry/app-autoscaler-release-tools:main + steps: + - name: Get Repository content + uses: actions/checkout@v4 + - name: Validating OpenAPI Specifications + shell: bash + run: | + #! /usr/bin/env bash + + set -eu -o pipefail + make validate-openapi-specs \ No newline at end of file diff --git a/.github/workflows/postgres.yaml b/.github/workflows/postgres.yaml index f2227b2650..bc8947fe87 100644 --- a/.github/workflows/postgres.yaml +++ b/.github/workflows/postgres.yaml @@ -42,7 +42,7 @@ jobs: - name: Trust my checkout run: git config --global --add safe.directory "${GITHUB_WORKSPACE}" - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: make build env: POSTGRES_HOST: postgres diff --git a/.github/workflows/tidy-go-mod.yaml b/.github/workflows/tidy-go-mod.yaml index 45b865adbd..98730efd18 100644 --- a/.github/workflows/tidy-go-mod.yaml +++ b/.github/workflows/tidy-go-mod.yaml @@ -13,13 +13,20 @@ jobs: container: image: ghcr.io/cloudfoundry/app-autoscaler-release-tools:main steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Trust my checkout run: git config --global --add safe.directory "${GITHUB_WORKSPACE}" - name: run go mod tidy on all .mod's - run: make mod-tidy + shell: bash + run: | + #! /usr/bin/env bash + set -eu -o pipefail + + make --directory='./src/acceptance/assets/app/go_app' generate-fakes + make --directory='./src/autoscaler' generate-fakes + make go-mod-tidy - name: Check if there is any change id: get_changes diff --git a/.gitignore b/.gitignore index 416357470d..5e92bf6bfb 100644 --- a/.gitignore +++ b/.gitignore @@ -6,7 +6,6 @@ dev_releases .blobs blobs .dev_builds -.DS_Store .final_builds/jobs/**/*.tgz .final_builds/packages/**/*.tgz *.swp @@ -35,3 +34,21 @@ privkey.pem app-autoscaler-release docs/*.bkp build/* + +# Generated, intermediate openapi-specs: +src/acceptance/assets/app/go_app/internal/openapi-specs.bundled + +# Generated api-clients: +src/acceptance/assets/app/go_app/internal/applicationmetric/oas*gen.go +src/acceptance/assets/app/go_app/internal/custommetrics/oas*gen.go +src/acceptance/assets/app/go_app/internal/policy/oas*gen.go +src/acceptance/assets/app/go_app/internal/scalinghistory/oas*gen.go + +# Autogenerated files +go.work.sum + +# Plugins that the editor needs to work well with the code within this +# repository. Recommended, to put it under version-control for +# easy sharing, see: +# +!.vscode/extensions.json diff --git a/.golangci.yaml b/.golangci.yaml index 8505d36869..20fc310fcf 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -70,7 +70,7 @@ linters-settings: staticcheck: checks: ["all"] stylecheck: - go: "1.15" + go: "1.20" # https://staticcheck.io/docs/options#checks checks: ["all", "-ST1003", "-ST1005"] dot-import-whitelist: @@ -101,7 +101,7 @@ linters: - goprintffuncname - gosec - gosimple - # - gomoddirectives - commented out to allow replace directives + - gomoddirectives - gomodguard - ineffassign - misspell diff --git a/.tool-versions b/.tool-versions index 6c01cec9b8..b5f937c74c 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,16 +1,16 @@ -act 0.2.48 -actionlint 1.6.25 -bosh 7.2.4 -cf 8.7.1 -concourse 7.9.1 +act 0.2.52 +actionlint 1.6.26 +bosh 7.4.0 +cf 8.7.3 +concourse 7.10.0 direnv 2.32.3 -gcloud 437.0.1 -ginkgo 2.11.0 +gcloud 447.0.0 +ginkgo 2.12.1 golang 1.20.6 -golangci-lint 1.53.3 -java temurin-17.0.7+7 +golangci-lint 1.54.2 +java temurin-17.0.8+101 make 4.4 maven 3.8.6 ruby 3.2.1 shellcheck 0.9.0 -yq 4.34.1 +yq 4.35.2 diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000000..cde2285970 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,12 @@ +{ + "recommendations": [ + "sonarsource.sonarlint-vscode", + "joselitofilho.ginkgotestexplorer", + "onsi.vscode-ginkgo", + "vmware.vscode-boot-dev-pack", + "vscjava.vscode-java-pack", + "pinage404.nix-extension-pack", + "golang.go", + "trunk.io" + ] +} \ No newline at end of file diff --git a/Gemfile b/Gemfile index 7496261caf..40b6edc590 100644 --- a/Gemfile +++ b/Gemfile @@ -5,5 +5,5 @@ group :development, :test do gem "rspec" gem "rspec-its" gem "standard" - gem "rspec-file_fixtures", "0.1.7" + gem "rspec-file_fixtures", "0.1.8" end diff --git a/Gemfile.lock b/Gemfile.lock index c219269b68..1fa5f8b980 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -2,12 +2,13 @@ GEM remote: https://rubygems.org/ specs: ast (2.4.2) + base64 (0.1.1) bosh-template (2.4.0) semi_semantic (~> 1.2.0) diff-lcs (1.5.0) json (2.6.3) language_server-protocol (3.17.0.3) - lint_roller (1.0.0) + lint_roller (1.1.0) parallel (1.23.0) parser (3.2.2.3) ast (~> 2.4.1) @@ -15,7 +16,7 @@ GEM racc (1.7.1) rainbow (3.1.1) regexp_parser (2.8.1) - rexml (3.2.5) + rexml (3.2.6) rspec (3.12.0) rspec-core (~> 3.12.0) rspec-expectations (~> 3.12.0) @@ -25,44 +26,47 @@ GEM rspec-expectations (3.12.3) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.12.0) - rspec-file_fixtures (0.1.7) + rspec-file_fixtures (0.1.8) rspec (~> 3.12) rspec-its (1.3.0) rspec-core (>= 3.0.0) rspec-expectations (>= 3.0.0) - rspec-mocks (3.12.5) + rspec-mocks (3.12.6) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.12.0) rspec-support (3.12.1) - rubocop (1.52.1) + rubocop (1.56.4) + base64 (~> 0.1.1) json (~> 2.3) + language_server-protocol (>= 3.17.0) parallel (~> 1.10) parser (>= 3.2.2.3) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.28.0, < 2.0) + rubocop-ast (>= 1.28.1, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) rubocop-ast (1.29.0) parser (>= 3.2.1.0) - rubocop-performance (1.18.0) + rubocop-performance (1.19.1) rubocop (>= 1.7.0, < 2.0) rubocop-ast (>= 0.4.0) ruby-progressbar (1.13.0) semi_semantic (1.2.0) - standard (1.29.0) + standard (1.31.1) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.0) - rubocop (~> 1.52.0) + rubocop (~> 1.56.2) standard-custom (~> 1.0.0) - standard-performance (~> 1.1.0) - standard-custom (1.0.1) + standard-performance (~> 1.2) + standard-custom (1.0.2) lint_roller (~> 1.0) - standard-performance (1.1.0) - lint_roller (~> 1.0) - rubocop-performance (~> 1.18.0) - unicode-display_width (2.4.2) + rubocop (~> 1.50) + standard-performance (1.2.0) + lint_roller (~> 1.1) + rubocop-performance (~> 1.19.0) + unicode-display_width (2.5.0) PLATFORMS ruby @@ -70,7 +74,7 @@ PLATFORMS DEPENDENCIES bosh-template rspec - rspec-file_fixtures (= 0.1.7) + rspec-file_fixtures (= 0.1.8) rspec-its standard diff --git a/Makefile b/Makefile index d8d4379918..c102a5c0dc 100644 --- a/Makefile +++ b/Makefile @@ -1,30 +1,41 @@ SHELL := /bin/bash -.SHELLFLAGS = -euo pipefail -c -MAKEFLAGS = -s -go_modules:= $(shell find . -maxdepth 3 -name "*.mod" -exec dirname {} \; | sed 's|\./src/||' | sort) -all_modules:= $(go_modules) db scheduler .SHELLFLAGS := -eu -o pipefail -c ${SHELLFLAGS} -MVN_OPTS="-Dmaven.test.skip=true" -OS:=$(shell . /etc/lsb-release &>/dev/null && echo $${DISTRIB_ID} || uname ) -db_type:=postgres -DB_HOST:=localhost +MAKEFLAGS = -s + +go-acceptance-dir := ./src/acceptance +go-autoscaler-dir := ./src/autoscaler +go-changelog-dir := ./src/changelog +go-changeloglockcleander-dir := ./src/changeloglockcleaner +go-test-app-dir := ./src/acceptance/assets/app/go_app + +go_modules := $(shell find . -maxdepth 3 -name "*.mod" -exec dirname {} \; | sed 's|\./src/||' | sort) +all_modules := $(go_modules) db scheduler + +MVN_OPTS = "-Dmaven.test.skip=true" +OS := $(shell . /etc/lsb-release &>/dev/null && echo $${DISTRIB_ID} || uname) +db_type := postgres +DB_HOST := localhost DBURL := $(shell case "${db_type}" in\ (postgres) printf "postgres://postgres:postgres@${DB_HOST}/autoscaler?sslmode=disable"; ;; \ - (mysql) printf "root@tcp(${DB_HOST})/autoscaler?tls=false"; ;; esac) + (mysql) printf "root@tcp(${DB_HOST})/autoscaler?tls=false"; ;; esac) DEBUG := false MYSQL_TAG := 8 POSTGRES_TAG := 12 -SUITES?=broker api app -AUTOSCALER_DIR?=$(shell pwd) -lint_config:=${AUTOSCALER_DIR}/.golangci.yaml -CI_DIR?=${AUTOSCALER_DIR}/ci -CI?=false -VERSION?=0.0.testing -DEST?=build - -export BUILDIN_MODE?=false -export DEBUG?=false -export ACCEPTANCE_TESTS_FILE?=${DEST}/app-autoscaler-acceptance-tests-v${VERSION}.tgz +SUITES ?= broker api app +AUTOSCALER_DIR ?= $(shell pwd) +lint_config := ${AUTOSCALER_DIR}/.golangci.yaml +CI_DIR ?= ${AUTOSCALER_DIR}/ci +CI ?= false +VERSION ?= 0.0.testing +DEST ?= build + +GOLANGCI_LINT_VERSION = v$(shell cat .tool-versions | grep golangci-lint \ + | cut --delimiter=' ' --fields='2') + +export BUILDIN_MODE ?= false +export DEBUG ?= false +export ACCEPTANCE_TESTS_FILE ?= ${DEST}/app-autoscaler-acceptance-tests-v${VERSION}.tgz +export GOWORK = off $(shell mkdir -p target) $(shell mkdir -p build) @@ -45,12 +56,6 @@ target/init-db-${db_type}: @./scripts/initialise_db.sh ${db_type} @touch $@ -.PHONY: init -init: target/init -target/init: - @make -C src/autoscaler buildtools - @touch $@ - .PHONY: clean-autoscaler clean-java clean-vendor clean-acceptance clean: clean-vendor clean-autoscaler clean-java clean-targets clean-scheduler clean-certs clean-bosh-release clean-build clean-acceptance @make stop-db db_type=mysql @@ -62,12 +67,12 @@ clean-java: @cd src && mvn clean > /dev/null && cd .. clean-targets: @echo " - cleaning build target files" - @rm target/* &> /dev/null || echo " . Already clean" + @rm --recursive --force target/* &> /dev/null || echo " . Already clean" clean-vendor: @echo " - cleaning vendored go" @find . -depth -name "vendor" -type d -exec rm -rf {} \; clean-autoscaler: - @make -C src/autoscaler clean + @make --directory='./src/autoscaler' clean clean-scheduler: @echo " - cleaning scheduler test resources" @rm -rf src/scheduler/src/test/resources/certs @@ -85,27 +90,27 @@ clean-acceptance: @rm -rf src/acceptance/results &> /dev/null || true .PHONY: build build-test build-tests build-all $(all_modules) -build: init $(all_modules) +build: $(all_modules) build-tests: build-test -build-test: init $(addprefix test_,$(go_modules)) -build-all: build build-test +build-test: $(addprefix test_,$(go_modules)) +build-all: build build-test build-test-app db: target/db target/db: @echo "# building $@" @cd src && mvn --no-transfer-progress package -pl db ${MVN_OPTS} && cd .. @touch $@ -scheduler: init +scheduler: @echo "# building $@" @cd src && mvn --no-transfer-progress package -pl scheduler ${MVN_OPTS} && cd .. -autoscaler: init - @make -C src/autoscaler build -changeloglockcleaner: init - @make -C src/changeloglockcleaner build -changelog: init - @make -C src/changelog build +autoscaler: + @make --directory='./src/autoscaler' build +changeloglockcleaner: + @make --directory='./src/changeloglockcleaner' build +changelog: + @make --directory='./src/changelog' build $(addprefix test_,$(go_modules)): @echo "# Compiling '$(patsubst test_%,%,$@)' tests" - @make -C src/$(patsubst test_%,%,$@) build_tests + @make --directory='./src/$(patsubst test_%,%,$@)' build_tests .PHONY: test-certs @@ -120,22 +125,22 @@ target/scheduler_test_certs: .PHONY: test test-autoscaler test-scheduler test-changelog test-changeloglockcleaner test: test-autoscaler test-scheduler test-changelog test-changeloglockcleaner test-acceptance-unit -test-autoscaler: check-db_type init init-db test-certs +test-autoscaler: check-db_type init-db test-certs @echo " - using DBURL=${DBURL} OPTS=${OPTS}" - @make -C src/autoscaler test DBURL="${DBURL}" OPTS="${OPTS}" -test-autoscaler-suite: check-db_type init init-db test-certs + @make --directory='./src/autoscaler' test DBURL="${DBURL}" OPTS="${OPTS}" +test-autoscaler-suite: check-db_type init-db test-certs @echo " - using DBURL=${DBURL} TEST=${TEST} OPTS=${OPTS}" - @make -C src/autoscaler testsuite TEST=${TEST} DBURL="${DBURL}" OPTS="${OPTS}" -test-scheduler: check-db_type init init-db test-certs + @make --directory='./src/autoscaler' testsuite TEST=${TEST} DBURL="${DBURL}" OPTS="${OPTS}" +test-scheduler: check-db_type init-db test-certs @export DB_HOST=${DB_HOST}; \ cd src && mvn test --no-transfer-progress -Dspring.profiles.include=${db_type} && cd .. -test-changelog: init - @make -C src/changelog test -test-changeloglockcleaner: init init-db test-certs - @make -C src/changeloglockcleaner test DBURL="${DBURL}" +test-changelog: + @make --directory='./src/changelog' test +test-changeloglockcleaner: init-db test-certs + @make --directory='./src/changeloglockcleaner' test DBURL="${DBURL}" test-acceptance-unit: - @make -C src/acceptance test-unit - @make -C src/acceptance/assets/app/go_app test + @make --directory='./src/acceptance' test-unit + @make --directory='./src/acceptance/assets/app/go_app' test .PHONY: start-db @@ -166,7 +171,7 @@ target/start-db-postgres_CI_true: waitfor_postgres_CI_false: @echo -n " - waiting for ${db_type} ." @COUNTER=0; until $$(docker exec postgres pg_isready &>/dev/null) || [ $$COUNTER -gt 10 ]; do echo -n "."; sleep 1; let COUNTER+=1; done;\ - if [ $$COUNTER -gt 10 ]; then echo; echo "Error: timed out waiting for postgres. Try \"make clean\" first." >&2 ; exit 1; fi + if [ $$COUNTER -gt 10 ]; then echo; echo "Error: timed out waiting for postgres. Try \"make clean\" first." >&2 ; exit 1; fi waitfor_postgres_CI_true: @echo " - no ci postgres checks" @@ -197,14 +202,14 @@ waitfor_mysql_CI_false: waitfor_mysql_CI_true: @echo -n " - Waiting for table creation" @which mysql >/dev/null &&\ - {\ - T=0;\ - until [[ ! -z "$(shell mysql -u "root" -h "${DB_HOST}" --port=3306 -qfsBe "SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME='autoscaler'" 2> /dev/null)" ]]\ - || [[ $${T} -gt 30 ]];\ - do echo -n "."; sleep 1; T=$$((T+1)); done;\ - } + {\ + T=0;\ + until [[ ! -z "$(shell mysql -u "root" -h "${DB_HOST}" --port=3306 -qfsBe "SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME='autoscaler'" 2> /dev/null)" ]]\ + || [[ $${T} -gt 30 ]];\ + do echo -n "."; sleep 1; T=$$((T+1)); done;\ + } @[ ! -z "$(shell mysql -u "root" -h "${DB_HOST}" --port=3306 -qfsBe "SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME='autoscaler'" 2> /dev/null)" ]\ - || { echo "ERROR: Mysql timed out creating database"; exit 1; } + || { echo "ERROR: Mysql timed out creating database"; exit 1; } .PHONY: stop-db @@ -216,20 +221,11 @@ stop-db: check-db_type .PHONY: integration integration: build init-db test-certs @echo " - using DBURL=${DBURL} OPTS=${OPTS}" - make -C src/autoscaler integration DBURL="${DBURL}" OPTS="${OPTS}" + make --directory='./src/autoscaler' integration DBURL="${DBURL}" OPTS="${OPTS}" .PHONY:lint $(addprefix lint_,$(go_modules)) -lint: golangci-lint_check $(addprefix lint_,$(go_modules)) rubocop - -golangci-lint_check: - @current_version=$(shell golangci-lint version | cut -d " " -f 4);\ - current_major_version=$(shell golangci-lint version | cut -d " " -f 4| sed -E 's/v*([0-9]+\.[0-9]+)\..*/\1/');\ - expected_version=$(shell cat src/autoscaler/go.mod | grep golangci-lint | cut -d " " -f 2 | sed -E 's/v([0-9]+\.[0-9]+)\..*/\1/');\ - if [ "$${current_major_version}" != "$${expected_version}" ]; then \ - echo "ERROR: Expected to have golangci-lint version '$${expected_version}.x' but we have $${current_version}";\ - exit 1;\ - fi +lint: $(addprefix lint_,$(go_modules)) rubocop rubocop: @echo " - ruby scripts" @@ -248,7 +244,7 @@ lint-actions: $(addprefix lint_,$(go_modules)): lint_%: @echo " - linting: $(patsubst lint_%,%,$@)" - @pushd src/$(patsubst lint_%,%,$@) >/dev/null && golangci-lint run --config ${lint_config} ${OPTS} + @pushd src/$(patsubst lint_%,%,$@) >/dev/null && go run github.com/golangci/golangci-lint/cmd/golangci-lint@${GOLANGCI_LINT_VERSION} run --config ${lint_config} ${OPTS} .PHONY: spec-test spec-test: @@ -256,41 +252,65 @@ spec-test: bundle exec rspec .PHONY: release -bosh-release: mod-tidy vendor scheduler db build/autoscaler-test.tgz +bosh-release: go-mod-tidy vendor scheduler db build/autoscaler-test.tgz build/autoscaler-test.tgz: @echo " - building bosh release into build/autoscaler-test.tgz" @mkdir -p build @bosh create-release --force --timestamp-version --tarball=build/autoscaler-test.tgz .PHONY: acceptance-release -acceptance-release: clean-acceptance mod-tidy vendor build-test-app +acceptance-release: clean-acceptance go-mod-tidy vendor build-test-app @echo " - building acceptance test release '${VERSION}' to dir: '${DEST}' " @mkdir -p ${DEST} @tar --create --auto-compress --directory="src" --file="${ACCEPTANCE_TESTS_FILE}" 'acceptance' -.PHONY: mod-tidy -mod-tidy: - @for folder in $$(find . -maxdepth 3 -name "go.mod" -exec dirname {} \;);\ - do\ - cd $${folder}; echo " - go mod tidying '$${folder}'"; go mod tidy; cd - >/dev/null;\ - done + +.PHONY: generate-fakes autoscaler.generate-fakes test-app.generate-fakes +generate-fakes: autoscaler.generate-fakes test-app.generate-fakes +autoscaler.generate-fakes: + make --directory='${go-autoscaler-dir}' generate-fakes +test-app.generate-fakes: + make --directory='${go-test-app-dir}' generate-fakes + +.PHONY: go-mod-tidy +go-mod-tidy: acceptance.go-mod-tidy autoscaler.go-mod-tidy changelog.go-mod-tidy \ + changeloglockcleander.go-mod-tidy test-app.go-mod-tidy + +.PHONY: acceptance.go-mod-tidy autoscaler.go-mod-tidy changelog.go-mod-tidy \ + changeloglockcleander.go-mod-tidy test-app.go-mod-tidy +acceptance.go-mod-tidy: + make --directory='${go-acceptance-dir}' go-mod-tidy +autoscaler.go-mod-tidy: + make --directory='${go-autoscaler-dir}' go-mod-tidy +changelog.go-mod-tidy: + make --directory='${go-changelog-dir}' go-mod-tidy +changeloglockcleander.go-mod-tidy: + make --directory='${go-changeloglockcleander-dir}' go-mod-tidy +test-app.go-mod-tidy: + make --directory='${go-test-app-dir}' go-mod-tidy + + .PHONY: mod-download mod-download: @for folder in $$(find . -maxdepth 3 -name "go.mod" -exec dirname {} \;);\ do\ - cd $${folder}; echo " - go mod download '$${folder}'"; go mod download; cd - >/dev/null;\ + cd $${folder}; echo " - go mod download '$${folder}'"; go mod download; cd - >/dev/null;\ done -.PHONY: vendor -vendor: - @for folder in $$(find . -maxdepth 3 -name "go.mod" -exec dirname {} \;);\ - do\ - cd $${folder}; echo " - go mod vendor '$${folder}'"; go mod vendor; cd - >/dev/null;\ - done +.PHONY: vendor acceptance.go-mod-vendor autoscaler.go-mod-vendor changelog.go-mod-vendor \ + changeloglockcleander.go-mod-vendor +go-mod-vendor: acceptance.go-mod-vendor autoscaler.go-mod-vendor changelog.go-mod-vendor \ + changeloglockcleander.go-mod-vendor +acceptance.go-mod-vendor: + make --directory='${go-acceptance-dir}' go-mod-vendor +autoscaler.go-mod-vendor: + make --directory='${go-autoscaler-dir}' go-mod-vendor +changelog.go-mod-vendor: + make --directory='${go-changelog-dir}' go-mod-vendor +changeloglockcleander.go-mod-vendor: + make --directory='${go-changeloglockcleander-dir}' go-mod-vendor + -.PHONY: fakes -fakes: - @make -C src/autoscaler fakes # https://github.com/golang/tools/blob/master/gopls/doc/workspace.md .PHONY: workspace @@ -306,9 +326,8 @@ uaac: markdownlint-cli: which markdownlint || npm install -g --omit=dev markdownlint-cli -.PHONY: deploy deploy-autoscaler deploy-register-cf deploy-autoscaler-bosh deploy-cleanup -deploy-autoscaler: deploy -deploy: mod-tidy vendor uaac db scheduler deploy-autoscaler-bosh deploy-register-cf +.PHONY: deploy-autoscaler deploy-register-cf deploy-autoscaler-bosh deploy-cleanup +deploy-autoscaler: go-mod-vendor uaac db scheduler deploy-autoscaler-bosh deploy-register-cf deploy-register-cf: echo " - registering broker with cf" [ "$${BUILDIN_MODE}" == "false" ] && { ${CI_DIR}/autoscaler/scripts/register-broker.sh; } || echo " - Not registering broker due to buildin mode enabled" @@ -319,15 +338,33 @@ deploy-cleanup: ${CI_DIR}/autoscaler/scripts/cleanup-autoscaler.sh; -deploy-prometheus: - @export DEPLOYMENT_NAME=prometheus;\ - export BBL_STATE_PATH=$${BBL_STATE_PATH:-$(shell realpath "../app-autoscaler-env-bbl-state/bbl-state/")};\ + +bosh-release-path := ./target/bosh-releases +prometheus-bosh-release-path := ${bosh-release-path}/prometheus +$(shell mkdir -p ${prometheus-bosh-release-path}) + +download-prometheus-release: ${prometheus-bosh-release-path}/manifests +${prometheus-bosh-release-path}/manifests &: + pushd '${prometheus-bosh-release-path}' > /dev/null ;\ + git clone --recurse-submodules 'https://github.com/bosh-prometheus/prometheus-boshrelease' . ;\ + popd > /dev/null + + + +deploy-prometheus: ${prometheus-bosh-release-path}/manifests + export DEPLOYMENT_NAME='prometheus' ;\ + export PROMETHEUS_DIR='${prometheus-bosh-release-path}' ;\ + export BBL_GCP_REGION="$$(yq eval '.jobs.[] | select(.name == "deploy-prometheus") | .plan.[] | select(.task == "deploy-prometheus") | .params.BBL_GCP_REGION' './ci/infrastructure/pipeline.yml')" ;\ + export BBL_GCP_ZONE="$$(yq eval '.jobs.[] | select(.name == "deploy-prometheus") | .plan.[] | select(.task == "deploy-prometheus") | .params.BBL_GCP_ZONE' './ci/infrastructure/pipeline.yml')" ;\ + export SLACK_WEBHOOK="$$(credhub get --name='/bosh-autoscaler/prometheus/alertmanager_slack_api_url' --quiet)" ;\ ${CI_DIR}/infrastructure/scripts/deploy-prometheus.sh; + + .PHONY: build-test-app build-test-app: - @make -C src/acceptance/assets/app/go_app build + @make --directory='./src/acceptance/assets/app/go_app' build .PHONY: acceptance-tests acceptance-tests: build-test-app @@ -362,7 +399,7 @@ run-performance: run-act: ${AUTOSCALER_DIR}/scripts/run_act.sh;\ -package-specs: mod-tidy vendor +package-specs: go-mod-tidy vendor @echo " - Updating the package specs" @./scripts/sync-package-specs @@ -388,8 +425,7 @@ target/docker-login: docker-image: docker-login docker build -t ghcr.io/cloudfoundry/app-autoscaler-release-tools:latest ci/dockerfiles/autoscaler-tools docker push ghcr.io/cloudfoundry/app-autoscaler-release-tools:latest - -.PHONY: build-tools -build-tools: - make -C src/autoscaler buildtools - +validate-openapi-specs: $(wildcard ./api/*.openapi.yaml) + for file in $^ ; do \ + swagger-cli validate "$${file}" ; \ + done diff --git a/README.md b/README.md index 31ce351bab..df3ad68cb6 100644 --- a/README.md +++ b/README.md @@ -216,7 +216,7 @@ The purpose of this bosh release is to deploy and setup the [app-autoscaler](htt ```sh git clone https://github.com/cloudfoundry/app-autoscaler-release cd app-autoscaler-release - make mod-tidy vendor db scheduler + make go-mod-tidy vendor db scheduler bosh create-release bosh -e YOUR_ENV upload-release ``` diff --git a/api/application-metric-api.openapi.yaml b/api/application-metric-api.openapi.yaml new file mode 100644 index 0000000000..14d1e395fa --- /dev/null +++ b/api/application-metric-api.openapi.yaml @@ -0,0 +1,157 @@ +openapi: 3.0.0 +info: + title: Application Metric API + description: | + List aggregated metrics of an application. AutoScaler collects the instances' metrics of an + application, and aggregate the raw data into an accumulated value for evaluation. + + This API is used to return the aggregated metric result of an application. + version: 1.0.0 +tags: +- name: Application Metric API V1 + description: List aggregated metrics of an application. + +paths: + /v1/apps/{guid}/aggregated_metric_histories/{metric_type}: + parameters: + - name: guid + in: path + required: true + description: | + The GUID identifying the application for which the scaling history is fetched. + + It can be found in the `application_id` property of the JSON object stored in the + `VCAP_APPLICATION` environment variable. + schema: + $ref: "./shared_definitions.yaml#/schemas/GUID" + - name: metric_type + in: path + required: true + description: The metric type + schema: + $ref: "./shared_definitions.yaml#/schemas/metric_type" + - name: start-time + in: query + description: | + The start time in the number of nanoseconds elapsed since January 1, 1970 UTC. + schema: + type: integer + default: 0 + example: start-time=1494989539138350432 + - name: end-time + in: query + description: | + The end time in the number of nanoseconds elapsed since January 1, 1970 UTC. + schema: + type: integer + default: 0 + example: end-time=1494989549117047288 + - name: order-direction + in: query + description: | + The sorting order. The scaling history will be order by timestamp ascending or descending. + schema: + type: string + enum: ["asc", "desc"] + default: desc + example: order-direction=desc + - name: page + in: query + description: The page number to query. + schema: + type: integer + minimum: 1 # Or Should it be "1"? + default: 1 + example: page=1 + - name: results-per-page + in: query + description: Number of entries shown per page. + schema: + type: integer + minimum: 0 # Or Should it be "1"? + default: 50 + example: results-per-page=10 + get: + summary: Retrieves the instance metrics of an application. + description: | + Use to retrieve instance metrics of an application. + tags: + - Application Metric API V1 + responses: + "200": + description: "OK" + content: + application/json: + schema: + $ref: "#/components/schemas/Application_Metrics" + default: + $ref: "./shared_definitions.yaml#/responses/Error" + security: + - bearerAuth: [] + x-codegen-request-body-name: body +components: + schemas: + Application_Metrics: + description: Object containing Application Metrics + type: object + properties: + total_results: + type: integer + format: int64 + description: Number of history entries found for the given query + example: 2 + total_pages: + type: integer + format: int64 + description: Number of Pages from the query + example: 1 + page: + type: integer + format: int64 + description: Number of the current page + example: 1 + prev_url: + type: string + format: uri + next_url: + type: string + format: uri + resources: + type: array + items: + $ref: '#/components/schemas/ApplicationMetric' + ApplicationMetric: + description: Object containing metric history + type: object + properties: + app_guid: + $ref: "./shared_definitions.yaml#/schemas/GUID" + instanceIndex: + type: integer + description: Application Metric #TODO + example: 0 + timestamp: + type: integer + description: | + The scaling time in the number of nanoseconds elapsed since January 1, 1970 UTC. + example: 1494989539138350432 + collected_at: + type: integer + description: | + The time at which the metrics were collected in the number of nanoseconds + example: 1494989539138350000 + metric_type: + $ref: "./shared_definitions.yaml#/schemas/metric_type" + value: + type: integer + description: | + The value of metric type to be returned as the aggregated metric result of an application + example: 400 + unit: + type: string + example: megabytes + securitySchemes: + bearerAuth: + type: http + scheme: bearer + bearerFormat: JWT \ No newline at end of file diff --git a/api/custom-metrics-api.yaml b/api/custom-metrics-api.openapi.yaml similarity index 72% rename from api/custom-metrics-api.yaml rename to api/custom-metrics-api.openapi.yaml index 76a017af35..4eedf5b11a 100644 --- a/api/custom-metrics-api.yaml +++ b/api/custom-metrics-api.openapi.yaml @@ -4,9 +4,6 @@ info: description: | app-autoscaler lets you automatically increase or decrease the number of your application instances based on the policies you have defined. Your applications can call the app-autoscaler custom metrics API to submit custom metrics defined and used in a dynamic scaling policy to enable automatic scaling based on application-specific metrics. version: 1.0.0 -security: -- mtls: [] -- basicAuthentication: [] tags: - name: Custom Metrics API V1 description: Work with application-specific custom metrics to scale your application. @@ -16,15 +13,22 @@ paths: parameters: - in: path name: appGuid - description: The GUID identifying the application the custom metrics are submitted for. Can be found in the `application_id` property of the JSON object stored in the `VCAP_APPLICATION` environment variable. + description: | + The GUID identifying the application for which the metrics are fetched. + + It can be found in the `application_id` property of the JSON object stored in the + `VCAP_APPLICATION` environment variable. example: 58d162ad-87d5-4f52-8abf-e56a63a67292 required: true schema: - type: string + $ref: "./shared_definitions.yaml#/schemas/GUID" post: summary: Submits application-specific custom metrics to app-autoscaler. description: | - Use to submit custom metrics to app-autoscaler which are defined and used in a dynamic scaling policy to enable automatic scaling based on application-specific metrics. We recommend submitting the custom metrics every 40 seconds from every application instance. + Use to submit custom metrics to app-autoscaler which are defined and used in a dynamic + scaling policy to enable automatic scaling based on application-specific metrics. + + We recommend submitting the custom metrics every 40 seconds from every application instance. tags: - Custom Metrics API V1 requestBody: @@ -38,19 +42,12 @@ paths: '200': description: Metrics were successfully submitted. default: - $ref: '#/components/responses/Error' + $ref: "./shared_definitions.yaml#/responses/Error" security: + - basicAuthentication: [] - mtls: [] x-codegen-request-body-name: body components: - responses: - Error: - description: | - Error, the response body may contain further information. - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' schemas: Metrics: required: @@ -86,19 +83,10 @@ components: type: string description: An optional unit for the metric, for display purposes only. example: jobs - ErrorResponse: - type: object - properties: - code: - type: string - description: The textual error code. - message: - type: string - description: The message describing the cause of the error. securitySchemes: mtls: type: mutualTLS description: Use the Instance Identity Credentials provided by the Cloud Foundry runtime basicAuthentication: type: http - scheme: basic + scheme: basic \ No newline at end of file diff --git a/api/policy-api.openapi.yaml b/api/policy-api.openapi.yaml new file mode 100644 index 0000000000..52ad543d5c --- /dev/null +++ b/api/policy-api.openapi.yaml @@ -0,0 +1,246 @@ +openapi: 3.0.0 +info: + title: Policy API + description: This API is used to create, delete, retrieve the policy + version: 1.0.0 +security: +- bearerAuth: [] +tags: +- name: Policy API V1 + description: This API is used to create, delete, retrieve the policy + +paths: + /v1/apps/{guid}/policy: + parameters: + - name: guid + in: path + required: true + description: | + The GUID identifying the application for which the scaling history is fetched. + + It can be found in the `application_id` property of the JSON object stored in the + `VCAP_APPLICATION` environment variable. + schema: + $ref: "./shared_definitions.yaml#/schemas/GUID" + put: + summary: Retrieves the Policy + description: This API is used to create the policy + tags: + - Create Policy API V1 + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/Policy" + responses: + "200": + description: "OK" + content: + application/json: + schema: + $ref: "#/components/schemas/Policy" + default: + $ref: "./shared_definitions.yaml#/responses/Error" + x-codegen-request-body-name: body + delete: + summary: Deletes the policy + description: This API is used to delete the policy + tags: + - Delete Policy API V1 + responses: + "200": + description: "OK" + content: + application/json: + schema: + $ref: "#/components/schemas/Policy" + default: + $ref: "./shared_definitions.yaml#/responses/Error" + x-codegen-request-body-name: body + get: + summary: Retrieves the Policy + description: This API is used to retrieve the policy + tags: + - Get Policy API V1 + responses: + "200": + description: "OK" + content: + application/json: + schema: + $ref: "#/components/schemas/Policy" + default: + $ref: "./shared_definitions.yaml#/responses/Error" +components: + schemas: + Policy: + description: Object containing Policy + type: object + properties: + instance_min_count: + type: integer + format: int64 + description: minimal number of instance count + example: 2 + instance_max_count: + type: integer + format: int64 + description: maximal number of instance count + example: 4 + scaling_rules: + type: array + items: + $ref: '#/components/schemas/ScalingRule' + ScalingRule: + type: object + required: + - threshold + - operator + - adjustment + properties: + metric_type: + $ref: "./shared_definitions.yaml#/schemas/metric_type" + threshold: + description: | + The boundary when metric value exceeds is considered as a breach + type: integer + format: int64 + example: 30 + operator: + description: Used for standard operting signs - ">", "<", ">=", "<=" + #required: true + type: string + enum: [">", "<", ">=", "<="] + example: < + adjustment: + description: | + The adjustment approach for instance count with each scaling. + + +5 means adding 5 instances, -50% means shrinking to the half of current size. + # required: true + type: string + pattern: ^[-+][1-9]+[0-9]*[%]?$ + example: -1 + breach_duration_secs: + description: | + Time duration(in seconds) to fire scaling event if it keeps breaching + type: integer + format: int64 + example: 600 + cool_down_secs: + description: | + The time duration (in seconds) to wait before the next scaling kicks in + type: integer + format: int64 + example: 300 + schedules: + type: array + items: + $ref: '#/components/schemas/Schedules' + Schedules: + type: object + required: + - timezone + properties: + timezone: + description: Using timezone definition of Java + type: string + example: Asia/Shanghai + # TODO: Try to make use of + #- $ref: "../../src/autoscaler/api/policyvalidator/policy_json.schema.json#/" # TODO: + recurring_schedule: + type: array + items: + $ref: "#/components/schemas/RecurringSchedule" + RecurringSchedule: + type: object + required: + - start_time + - end_time + - instance_min_count + - instance_max_count + properties: + start_date: + description: the start date of the schedule. Must be a future time + type: string + format: date + example: 2016-06-27 + end_date: + description: the end date of the schedule. Must be a future time. + type: string + format: date + example: 2016-07-23 + start_time: + description: the start time of the schedule in HH:MM format + type: string + pattern: ^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$ + example: 11:00 + end_time: + description: the end time of the schedule in HH:MM format + type: string + pattern: ^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$ + example: 19:30 + end time of the schedule: + description: | + recurring days of a week or month. Use [1,2,..,7] or [1,2,...,31] to define it + type: array + items: + type: integer + example: [5, 15, 25] + instance_min_count: + description: minimal number of instance count for this schedule + type: integer + format: int64 + example: 3 + instance_max_count: + description: maximal number of instance count for this schedule + type: integer + format: int64 + example: 10 + instance_min_instance_count: + description: the initial minimal number of instance count for this schedule + type: integer + format: int64 + example: 5 + specific_date: + type: array + items: + $ref: '#/components/schemas/SpecificDate' + SpecificDate: + type: object + required: + - start_date_time + - end_date_time + - instance_min_count + - instance_max_count + properties: + start_date_time: + description: the start time of the schedule. Must be a future time + type: string + pattern: /[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1]) (2[0-3]|[01][0-9]):[0-5][0-9]/ + example: 2015-01-04T20:00 + end_date_time: + description: the start time of the schedule. Must be a future time + type: string + pattern: /[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1]) (2[0-3]|[01][0-9]):[0-5][0-9]/ + example: 2015-01-04T20:00 + instance_min_count: + description: minimal number of instance count for this schedule + type: integer + format: int64 + example: 2 + instance_max_count: + description: maximal number of instance count for this schedule + type: integer + format: int64 + example: 5 + instance_min_instance_count: + description: the initial minimal number of instance count for this schedule + type: integer + format: int64 + example: 3 + securitySchemes: + bearerAuth: + type: http + scheme: bearer + bearerFormat: JWT \ No newline at end of file diff --git a/api/scaling-history-api.openapi.yaml b/api/scaling-history-api.openapi.yaml new file mode 100644 index 0000000000..0a4537818b --- /dev/null +++ b/api/scaling-history-api.openapi.yaml @@ -0,0 +1,197 @@ +openapi: 3.0.0 +info: + title: Scaling History API + description: List scaling history of an application + version: 1.0.0 +tags: +- name: Scaling History API V1 + description: List the scaling history of an Application +paths: + /v1/apps/{guid}/scaling_histories: + parameters: + - name: guid + in: path + required: true + description: | + The GUID identifying the application for which the scaling history is fetched. + + It can be found in the `application_id` property of the JSON object stored in the + `VCAP_APPLICATION` environment variable. + schema: + $ref: "./shared_definitions.yaml#/schemas/GUID" + - name: start-time + in: query + description: | + The start time in the number of nanoseconds elapsed since January 1, 1970 UTC. + schema: + type: integer + default: 0 + example: start-time=1494989539138350432 + - name: end-time + in: query + description: | + The end time in the number of nanoseconds elapsed since January 1, 1970 UTC. + schema: + type: integer + default: 0 + example: end-time=1494989549117047288 + - name: order-direction + in: query + description: | + The sorting order. The scaling history will be order by timestamp ascending or descending. + schema: + type: string + enum: ["asc", "desc"] + default: desc + example: order-direction=desc + - name: page + in: query + description: The page number to query + schema: + type: integer + minimum: 1 + default: 1 + example: page=1 + - name: results-per-page + in: query + description: Number of entries shown per page. + schema: + type: integer + minimum: 0 + default: 50 + example: results-per-page=10 + get: + summary: Retrieves the scaling history of an application. + description: | + Use to retrieve scaling history for an app. + tags: + - Scaling History API V1 + responses: + "200": + description: "OK" + content: + application/json: + schema: + $ref: "#/components/schemas/History" + default: + $ref: "./shared_definitions.yaml#/responses/Error" + security: + - bearerAuth: [] + x-codegen-request-body-name: body +components: + schemas: + History: + description: Object containing scaling history. + type: object + properties: + total_results: + type: integer + format: int64 + description: Number of history entries found for the given query. + example: 2 + total_pages: + type: integer + format: int64 + description: Number of Pages from the query + example: 1 + page: + type: integer + format: int64 + description: Number of the current page. + example: 1 + prev_url: + type: string + format: uri + next_url: + type: string + format: uri + resources: + type: array + items: + $ref: '#/components/schemas/HistoryEntry' + HistoryEntry: + description: "Properties common for each entry in the scaling history." + type: object + oneOf: + - $ref: "#/components/schemas/HistoryErrorEntry" + - $ref: "#/components/schemas/HistoryIgnoreEntry" + - $ref: "#/components/schemas/HistorySuccessEntry" + discriminator: + propertyName: status + mapping: + 0: "#/components/schemas/HistorySuccessEntry" + 1: "#/components/schemas/HistoryErrorEntry" + 2: "#/components/schemas/HistoryIgnoreEntry" + properties: + status: + type: integer + format: int64 + enum: [0, 1, 2] + description: | + Following stati are possible: + + 0: The scaling was done successfully. + + 1: The scaling failed explicitly. + + 2: The scaling was ignored. + This field is as well a selector of which of the other ones are used and which not. + example: 0 + app_guid: + $ref: "./shared_definitions.yaml#/schemas/GUID" + timestamp: + type: integer + description: | + The scaling time in the number of nanoseconds elapsed since January 1, 1970 UTC. + example: 1494989539138350432 + scaling_type: + type: integer + format: int64 + enum: [0, 1] + description: | + There are two different scaling types: + + 0: This represents `ScalingTypeDynamic`. The scaling has been done due to a dynamic + scaling rule, reacting on metrics provided by the app. + + 1: This represents `ScalingTypeSchedule`. The scaling has been done due to a + scheduled period changing the default instance limits. + example: 0 + old_instances: + type: integer + format: int64 + minimum: 0 + description: The number of instances before the scaling. + example: 1 + new_instances: + type: integer + format: int64 + minimum: 0 + description: The number of instances after the scaling. + example: 2 + reason: + type: string + description: Textual information about what triggered the scaling event. + example: -1 instance(s) because cpu < 20% for 60 seconds + HistoryErrorEntry: + description: Description of a failed scaling even in history. + type: object + properties: + error: + type: string + description: | + In case the scaling failed, the reason is provided in this field. + example: failed to compute new app instances + HistoryIgnoreEntry: + description: Description of an ignored scaling event in history. + type: object + properties: + ignore_reason: + type: string + description: | + In case the scaling was ignored, the reason is provided in this field. + example: app in cooldown period + HistorySuccessEntry: + description: Description of a successful scaling event event in history. + type: object + properties: {} # No extra fields needed in this variant. + securitySchemes: + bearerAuth: + type: http + scheme: bearer + bearerFormat: JWT \ No newline at end of file diff --git a/api/shared_definitions.yaml b/api/shared_definitions.yaml new file mode 100644 index 0000000000..15dc3e60af --- /dev/null +++ b/api/shared_definitions.yaml @@ -0,0 +1,33 @@ +parameters: {} +responses: + Error: + description: | + Error, the response body may contain further information. + content: + application/json: + schema: + $ref: "#/schemas/ErrorResponse" +schemas: + ErrorResponse: + type: object + properties: + code: + type: string + description: The textual error code. + message: + type: string + description: The message describing the cause of the error. + GUID: + description: | + Identificator used by Cloud Foundry for entities. + + Anything is an entity. Apps, services, service-bindings, … + type: string + pattern: (\d|[a-f]){8}-(\d|[a-f]){4}-(\d|[a-f]){4}-(\d|[a-f]){4}-(\d|[a-f]){12} + example: 8d0cee08-23ad-4813-a779-ad8118ea0b91 + metric_type: + description: | + One user-defined custom metric type or one of the system-default metric types, which are: + "memoryused", "memoryutil", "responsetime", "throughput" and "cpu" + type: string + example: memoryused \ No newline at end of file diff --git a/ci/autoscaler/pipeline.yml b/ci/autoscaler/pipeline.yml index a72222ba2e..3102162071 100644 --- a/ci/autoscaler/pipeline.yml +++ b/ci/autoscaler/pipeline.yml @@ -26,7 +26,6 @@ anchors: operations/remove-metricsgateway.yml operations/enable-scheduler-logging.yml - app-autoscaler-ops-files-upgrade: &app-autoscaler-ops-files-upgrade OPS_FILES: | operations/add-releases.yml @@ -163,8 +162,8 @@ resources: icon: github check_every: 5m source: - uri: https://github.com/bosh-packages/golang-release.git - branch: master + uri: https://github.com/cloudfoundry/bosh-package-golang-release.git + branch: main version_depth: 20 tag_filter: v0.* @@ -173,8 +172,8 @@ resources: icon: github check_every: 5m source: - uri: https://github.com/bosh-packages/java-release.git - branch: master + uri: https://github.com/cloudfoundry/bosh-package-java-release.git + branch: main version_depth: 20 jobs: @@ -234,9 +233,10 @@ jobs: trigger: true - get: ci - task: make-prerelease - file: ci/ci/autoscaler/tasks/make/make.yml + file: ci/ci/autoscaler/tasks/make/make.yaml params: - TARGETS: mod-tidy vendor db scheduler + # ⚠️ Here it is used that make officially guarantees to reach the goals in the provided order. + TARGETS: generate-fakes go-mod-tidy go-mod-vendor db scheduler - task: deploy-autoscaler file: ci/ci/autoscaler/tasks/deploy-autoscaler.yml params: @@ -280,9 +280,10 @@ jobs: trigger: true - get: ci - task: make-prerelease - file: ci/ci/autoscaler/tasks/make/make.yml + file: ci/ci/autoscaler/tasks/make/make.yaml params: - TARGETS: mod-tidy vendor db scheduler + # ⚠️ Here it is used that make officially guarantees to reach the goals in the provided order. + TARGETS: generate-fakes go-mod-tidy go-mod-vendor db scheduler - task: deploy-autoscaler file: ci/ci/autoscaler/tasks/deploy-autoscaler.yml params: @@ -328,9 +329,10 @@ jobs: trigger: true - get: ci - task: make-prerelease - file: ci/ci/autoscaler/tasks/make/make.yml + file: ci/ci/autoscaler/tasks/make/make.yaml params: - TARGETS: mod-tidy vendor db scheduler + # ⚠️ Here it is used that make officially guarantees to reach the goals in the provided order. + TARGETS: generate-fakes go-mod-tidy go-mod-vendor db scheduler - task: deploy-autoscaler file: ci/ci/autoscaler/tasks/deploy-autoscaler.yml params: @@ -365,9 +367,10 @@ jobs: - get: bbl-state - get: app-autoscaler-release - task: make-prerelease - file: ci/ci/autoscaler/tasks/make/make.yml + file: ci/ci/autoscaler/tasks/make/make.yaml params: - TARGETS: mod-tidy vendor db scheduler + # ⚠️ Here it is used that make officially guarantees to reach the goals in the provided order. + TARGETS: generate-fakes go-mod-tidy go-mod-vendor db scheduler - task: deploy-autoscaler file: ci/ci/autoscaler/tasks/deploy-autoscaler.yml params: @@ -378,11 +381,11 @@ jobs: params: <<: *performance-env - task: setup-performance - file: ci/ci/autoscaler/tasks/make/make.yml + file: ci/ci/autoscaler/tasks/make/make.yaml params: TARGETS: setup-performance - task: run-performance - file: ci/ci/autoscaler/tasks/make/make.yml + file: ci/ci/autoscaler/tasks/make/make.yaml params: TARGETS: run-performance @@ -422,9 +425,10 @@ jobs: pre_upgrade NODES: 1 - task: make-prerelease - file: ci/ci/autoscaler/tasks/make/make.yml + file: ci/ci/autoscaler/tasks/make/make.yaml params: - TARGETS: mod-tidy vendor db scheduler + # ⚠️ Here it is used that make officially guarantees to reach the goals in the provided order. + TARGETS: generate-fakes go-mod-tidy go-mod-vendor db scheduler - task: deploy-autoscaler file: ci/ci/autoscaler/tasks/deploy-autoscaler.yml params: @@ -451,9 +455,10 @@ jobs: passed: [upgrade-test] - get: ci - task: make-prerelease - file: ci/ci/autoscaler/tasks/make/make.yml + file: ci/ci/autoscaler/tasks/make/make.yaml params: - TARGETS: mod-tidy vendor db scheduler + # ⚠️ Here it is used that make officially guarantees to reach the goals in the provided order. + TARGETS: generate-fakes go-mod-tidy go-mod-vendor db scheduler - task: release-autoscaler file: ci/ci/autoscaler/tasks/release-autoscaler.yml params: diff --git a/ci/autoscaler/scripts/deploy-autoscaler.sh b/ci/autoscaler/scripts/deploy-autoscaler.sh index 4ebe7528b3..595c9b16d0 100755 --- a/ci/autoscaler/scripts/deploy-autoscaler.sh +++ b/ci/autoscaler/scripts/deploy-autoscaler.sh @@ -9,19 +9,19 @@ bosh_deploy_opts="${BOSH_DEPLOY_OPTS:-""}" bosh_upload_release_opts="${BOSH_UPLOAD_RELEASE_OPTS:-""}" bosh_upload_stemcell_opts="${BOSH_UPLOAD_STEMCELL_OPTS:-""}" ops_files=${OPS_FILES:-"${autoscaler_dir}/operations/add-releases.yml\ - ${autoscaler_dir}/operations/instance-identity-cert-from-cf.yml\ - ${autoscaler_dir}/operations/add-postgres-variables.yml\ - ${autoscaler_dir}/operations/connect_to_postgres_with_certs.yml\ - ${autoscaler_dir}/operations/enable-nats-tls.yml\ - ${autoscaler_dir}/operations/loggregator-certs-from-cf.yml\ - ${autoscaler_dir}/operations/add-extra-plan.yml\ - ${autoscaler_dir}/operations/set-release-version.yml\ - ${autoscaler_dir}/operations/enable-log-cache.yml\ - ${autoscaler_dir}/operations/log-cache-syslog-server.yml\ - ${autoscaler_dir}/operations/remove-metricsserver.yml\ - ${autoscaler_dir}/operations/remove-metricsgateway.yml\ - ${autoscaler_dir}/operations/enable-log-cache-via-uaa.yml\ - ${autoscaler_dir}/operations/enable-scheduler-logging.yml"} + ${autoscaler_dir}/operations/instance-identity-cert-from-cf.yml\ + ${autoscaler_dir}/operations/add-postgres-variables.yml\ + ${autoscaler_dir}/operations/connect_to_postgres_with_certs.yml\ + ${autoscaler_dir}/operations/enable-nats-tls.yml\ + ${autoscaler_dir}/operations/loggregator-certs-from-cf.yml\ + ${autoscaler_dir}/operations/add-extra-plan.yml\ + ${autoscaler_dir}/operations/set-release-version.yml\ + ${autoscaler_dir}/operations/enable-log-cache.yml\ + ${autoscaler_dir}/operations/log-cache-syslog-server.yml\ + ${autoscaler_dir}/operations/remove-metricsserver.yml\ + ${autoscaler_dir}/operations/remove-metricsgateway.yml\ + ${autoscaler_dir}/operations/enable-log-cache-via-uaa.yml\ + ${autoscaler_dir}/operations/enable-scheduler-logging.yml"} if [[ "${buildin_mode}" == "true" ]]; then ops_files+=" ${autoscaler_dir}/operations/use_buildin_mode.yml"; fi; @@ -38,7 +38,7 @@ function setup_autoscaler_uaac(){ local autoscaler_secret="autoscaler_client_secret" local uaa_client_secret=$(credhub get -n /bosh-autoscaler/cf/uaa_admin_client_secret --quiet) uaac target "https://uaa.${system_domain}" --skip-ssl-validation > /dev/null - uaac token client get admin -s "$uaa_client_secret" > /dev/null + uaac token client get admin -s "${uaa_client_secret}" > /dev/null if uaac client get autoscaler_client_id >/dev/null; then step "updating autoscaler uaac client" @@ -127,7 +127,7 @@ function find_or_upload_stemcell() { if ! bosh stemcells | grep "${stemcell_name}" >/dev/null; then URL="https://bosh.io/d/stemcells/${stemcell_name}" if [ "${stemcell_version}" != "latest" ]; then - URL="${URL}?v=${stemcell_version}" + URL="${URL}?v=${stemcell_version}" fi wget "${URL}" -O stemcell.tgz bosh -n upload-stemcell $bosh_upload_stemcell_opts stemcell.tgz @@ -163,4 +163,4 @@ pushd "${autoscaler_dir}" > /dev/null find_or_upload_stemcell find_or_upload_release deploy -popd > /dev/null \ No newline at end of file +popd > /dev/null diff --git a/ci/autoscaler/scripts/run-integration-tests.sh b/ci/autoscaler/scripts/run-integration-tests.sh index e22173827e..3befe0c00a 100755 --- a/ci/autoscaler/scripts/run-integration-tests.sh +++ b/ci/autoscaler/scripts/run-integration-tests.sh @@ -12,7 +12,6 @@ pushd app-autoscaler-release POSTGRES_OPTS='--username=postgres --url=jdbc:postgresql://127.0.0.1/autoscaler --driver=org.postgresql.Driver' - make -C src/autoscaler buildtools ./src/scheduler/scripts/generate_unit_test_certs.sh ./scripts/generate_test_certs.sh diff --git a/ci/autoscaler/scripts/run-unit-tests.sh b/ci/autoscaler/scripts/run-unit-tests.sh index f810f3df99..0a09dd98f4 100755 --- a/ci/autoscaler/scripts/run-unit-tests.sh +++ b/ci/autoscaler/scripts/run-unit-tests.sh @@ -14,7 +14,6 @@ pushd app-autoscaler-release POSTGRES_OPTS='--username=postgres --url=jdbc:postgresql://127.0.0.1/autoscaler --driver=org.postgresql.Driver' - make -C src/autoscaler buildtools ./src/scheduler/scripts/generate_unit_test_certs.sh ./scripts/generate_test_certs.sh diff --git a/ci/autoscaler/tasks/make/make.sh b/ci/autoscaler/tasks/make/make.sh index c327bf968f..d2248da180 100755 --- a/ci/autoscaler/tasks/make/make.sh +++ b/ci/autoscaler/tasks/make/make.sh @@ -1,5 +1,5 @@ #!/bin/bash # shellcheck disable=SC2086 -set -euo pipefail +set -eu -o pipefail -make -C $1 ${TARGETS} +make --directory="${1}" ${TARGETS} diff --git a/ci/autoscaler/tasks/make/make.yml b/ci/autoscaler/tasks/make/make.yaml similarity index 100% rename from ci/autoscaler/tasks/make/make.yml rename to ci/autoscaler/tasks/make/make.yaml diff --git a/ci/dockerfiles/autoscaler-deploy/Dockerfile b/ci/dockerfiles/autoscaler-deploy/Dockerfile index b305ea3765..9e156601b4 100644 --- a/ci/dockerfiles/autoscaler-deploy/Dockerfile +++ b/ci/dockerfiles/autoscaler-deploy/Dockerfile @@ -1,5 +1,5 @@ -FROM ubuntu:jammy -MAINTAINER autoscaler-team +FROM ubuntu:jammy +LABEL org.opencontainers.image.authors="autoscaler-team" RUN apt-get update && \ apt-get -qqy install --fix-missing gnupg apt-transport-https wget && \ @@ -46,21 +46,21 @@ ENV PATH $PATH:$GOPATH/bin:/usr/local/go/bin # Install bosh_cli # renovate: datasource=github-releases depName=bosh-cli lookupName=cloudfoundry/bosh-cli -ENV BOSH_VERSION 7.2.4 +ENV BOSH_VERSION 7.4.0 RUN wget -q https://github.com/cloudfoundry/bosh-cli/releases/download/v${BOSH_VERSION}/bosh-cli-${BOSH_VERSION}-linux-amd64 && \ mv bosh-cli-* /usr/local/bin/bosh && \ chmod +x /usr/local/bin/bosh # Install bbl # renovate: datasource=github-releases depName=bosh-bootloader lookupName=cloudfoundry/bosh-bootloader -ENV BBL_VERSION v9.0.9 +ENV BBL_VERSION v9.0.12 RUN wget -q https://github.com/cloudfoundry/bosh-bootloader/releases/download/${BBL_VERSION}/bbl-${BBL_VERSION}_linux_amd64 && \ mv bbl-* /usr/local/bin/bbl && \ chmod +x /usr/local/bin/bbl # Install credhub # renovate: datasource=github-releases depName=credhub-cli lookupName=cloudfoundry/credhub-cli -ENV CREDHUB_VERSION 2.9.17 +ENV CREDHUB_VERSION 2.9.21 RUN wget -q https://github.com/cloudfoundry-incubator/credhub-cli/releases/download/${CREDHUB_VERSION}/credhub-linux-${CREDHUB_VERSION}.tgz && \ tar xvfz credhub-linux-${CREDHUB_VERSION}.tgz && \ mv credhub /usr/local/bin/credhub @@ -77,7 +77,7 @@ RUN wget -q https://github.com/stedolan/jq/releases/download/${JQ_VERSION}/jq-li # install yq # renovate: datasource=github-releases depName=yq lookupName=mikefarah/yq -ARG YQ_VERSION=v4.34.1 +ARG YQ_VERSION=v4.35.1 RUN wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_amd64 && \ chmod a+x /usr/local/bin/yq && \ yq --version @@ -91,7 +91,7 @@ RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.c gcloud version # renovate: datasource=github-releases depName=ginkgo lookupName=onsi/ginkgo -ARG GINKGO_VERSION=v2.11.0 +ARG GINKGO_VERSION=v2.12.1 RUN go install github.com/onsi/ginkgo/v2/ginkgo@${GINKGO_VERSION} &&\ ginkgo version diff --git a/ci/dockerfiles/autoscaler-test/Dockerfile b/ci/dockerfiles/autoscaler-test/Dockerfile index 78f96b6faf..47538c119d 100644 --- a/ci/dockerfiles/autoscaler-test/Dockerfile +++ b/ci/dockerfiles/autoscaler-test/Dockerfile @@ -36,7 +36,7 @@ RUN \ # get maven # renovate: datasource=maven depName=org.apache.maven:maven-core -ENV MAVEN_VERSION 3.9.3 +ENV MAVEN_VERSION 3.9.4 RUN wget --no-verbose -O /tmp/apache-maven-${MAVEN_VERSION}.tar.gz http://archive.apache.org/dist/maven/maven-3/${MAVEN_VERSION}/binaries/apache-maven-${MAVEN_VERSION}-bin.tar.gz && \ tar xzf /tmp/apache-maven-${MAVEN_VERSION}.tar.gz -C /opt/ && \ ln -s /opt/apache-maven-${MAVEN_VERSION} /opt/maven && \ @@ -57,7 +57,7 @@ RUN \ # Install bosh_cli # renovate: datasource=github-releases depName=bosh-cli lookupName=cloudfoundry/bosh-cli -ENV BOSH_VERSION 7.2.4 +ENV BOSH_VERSION 7.4.0 RUN wget -q https://github.com/cloudfoundry/bosh-cli/releases/download/v${BOSH_VERSION}/bosh-cli-${BOSH_VERSION}-linux-amd64 && \ mv bosh-cli-* /usr/local/bin/bosh && \ chmod +x /usr/local/bin/bosh diff --git a/ci/dockerfiles/autoscaler-tools/Dockerfile b/ci/dockerfiles/autoscaler-tools/Dockerfile index d9eb53774a..f9b237ea70 100644 --- a/ci/dockerfiles/autoscaler-tools/Dockerfile +++ b/ci/dockerfiles/autoscaler-tools/Dockerfile @@ -45,7 +45,7 @@ RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg m # install golang # renovate: datasource=golang-version depName=golang -ARG GO_VERSION=1.20.5 +ARG GO_VERSION=1.20.6 ENV GOPATH $HOME/go ENV PATH $HOME/go/bin:/usr/local/go/bin:$PATH RUN wget -q https://dl.google.com/go/go${GO_VERSION}.linux-amd64.tar.gz -P /tmp &&\ @@ -62,14 +62,14 @@ RUN apt-get update && \ # Install bosh_cli # renovate: datasource=github-releases depName=bosh-cli lookupName=cloudfoundry/bosh-cli -ARG BOSH_VERSION=7.2.4 +ARG BOSH_VERSION=7.4.0 RUN wget -q https://github.com/cloudfoundry/bosh-cli/releases/download/v${BOSH_VERSION}/bosh-cli-${BOSH_VERSION}-linux-amd64 && \ mv bosh-cli-* /usr/local/bin/bosh && \ chmod +x /usr/local/bin/bosh # Install bbl # renovate: datasource=github-releases depName=bosh-bootloader lookupName=cloudfoundry/bosh-bootloader -ARG BBL_VERSION=v9.0.9 +ARG BBL_VERSION=v9.0.12 RUN wget -q https://github.com/cloudfoundry/bosh-bootloader/releases/download/${BBL_VERSION}/bbl-${BBL_VERSION}_linux_amd64 && \ mv bbl-* /usr/local/bin/bbl &&\ chmod +x /usr/local/bin/bbl &&\ @@ -77,7 +77,7 @@ RUN wget -q https://github.com/cloudfoundry/bosh-bootloader/releases/download/${ # Install credhub # renovate: datasource=github-releases depName=credhub-cli lookupName=cloudfoundry/credhub-cli -ARG CREDHUB_VERSION=2.9.17 +ARG CREDHUB_VERSION=2.9.21 RUN wget -q https://github.com/cloudfoundry/credhub-cli/releases/download/${CREDHUB_VERSION}/credhub-linux-${CREDHUB_VERSION}.tgz && \ tar xvfz credhub-linux-${CREDHUB_VERSION}.tgz && \ mv credhub /usr/local/bin/credhub &&\ @@ -98,14 +98,14 @@ RUN wget -q https://github.com/stedolan/jq/releases/download/${JQ_VERSION}/jq-li # install yq # renovate: datasource=github-releases depName=yq lookupName=mikefarah/yq -ARG YQ_VERSION=v4.34.1 +ARG YQ_VERSION=v4.35.1 RUN wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_amd64 && \ chmod a+x /usr/local/bin/yq && \ yq --version # get maven # renovate: datasource=maven depName=org.apache.maven:maven-core -ARG MAVEN_VERSION=3.9.3 +ARG MAVEN_VERSION=3.9.4 ENV MAVEN_HOME /opt/maven RUN wget --no-verbose -O /tmp/apache-maven-${MAVEN_VERSION}.tar.gz http://archive.apache.org/dist/maven/maven-3/${MAVEN_VERSION}/binaries/apache-maven-${MAVEN_VERSION}-bin.tar.gz && \ tar xzf /tmp/apache-maven-${MAVEN_VERSION}.tar.gz -C /opt/ && \ @@ -129,7 +129,7 @@ RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.c gcloud version # renovate: datasource=github-releases depName=ginkgo lookupName=onsi/ginkgo -ARG GINKGO_VERSION=v2.11.0 +ARG GINKGO_VERSION=v2.12.1 RUN go install github.com/onsi/ginkgo/v2/ginkgo@${GINKGO_VERSION} && \ ginkgo version @@ -141,6 +141,9 @@ RUN curl -sL "https://deb.nodesource.com/setup_${NODE_VERSION}.x" | bash - \ && npm --version \ && node -v +# Install swagger-cli as described on +RUN npm install --global --ignore-scripts 'https://github.com/empire-medical/swagger-cli' + ENV CF_PLUGIN_HOME "/cf_plugins" RUN mkdir -p "${CF_PLUGIN_HOME}" \ && cf install-plugin -f -r CF-Community app-autoscaler-plugin \ diff --git a/ci/infrastructure/scripts/deploy-prometheus.sh b/ci/infrastructure/scripts/deploy-prometheus.sh index fa7472c6e1..ce9c240fa7 100755 --- a/ci/infrastructure/scripts/deploy-prometheus.sh +++ b/ci/infrastructure/scripts/deploy-prometheus.sh @@ -23,7 +23,7 @@ ops_files=${OPS_FILES:-"${prometheus_ops}/monitor-bosh.yml\ ${prometheus_ops}/monitor-cf.yml\ ${prometheus_ops}/enable-cf-route-registrar.yml\ ${prometheus_ops}/enable-grafana-uaa.yml\ - ${prometheus_ops}/enable-cf-loggregator-v2.yml\ + ${prometheus_ops}/deprecated/enable-cf-loggregator-v2.yml\ ${prometheus_ops}/monitor-bosh-director.yml\ ${prometheus_ops}/alertmanager-slack-receiver.yml\ ${ci_dir}/operations/prometheus-customize-alerts.yml\ @@ -57,12 +57,12 @@ PROMETHEUS_CLIENT_SECRET=$(yq e '.prometheus_client_password' "${director_store} BOSH_METRICS_SERVER_CLIENT_CA=$(yq e '.metrics_server_client_tls.ca' "${director_store}") BOSH_METRICS_SERVER_CLIENT_CERT=$(yq e '.metrics_server_client_tls.certificate' "${director_store}") BOSH_METRICS_SERVER_CLIENT_KEY=$(yq e '.metrics_server_client_tls.private_key' "${director_store}") -credhub set -n /bosh-autoscaler/prometheus/bosh_metrics_server_client_ca -t certificate -c "$BOSH_METRICS_SERVER_CLIENT_CA" >/dev/null -credhub set -n /bosh-autoscaler/prometheus/bosh_metrics_server_client -t certificate -c "$BOSH_METRICS_SERVER_CLIENT_CERT" -p "$BOSH_METRICS_SERVER_CLIENT_KEY" -m /bosh-autoscaler/prometheus/bosh_metrics_server_client_ca >/dev/null +credhub set -n /bosh-autoscaler/prometheus/bosh_metrics_server_client_ca -t certificate -c "${BOSH_METRICS_SERVER_CLIENT_CA}" >/dev/null +credhub set -n /bosh-autoscaler/prometheus/bosh_metrics_server_client -t certificate -c "${BOSH_METRICS_SERVER_CLIENT_CERT}" -p "${BOSH_METRICS_SERVER_CLIENT_KEY}" -m /bosh-autoscaler/prometheus/bosh_metrics_server_client_ca >/dev/null -credhub get -n /bosh-autoscaler/cf/uaa_ssl -k ca > $uaa_ssl_ca_file -credhub get -n /bosh-autoscaler/cf/uaa_ssl -k certificate > $uaa_ssl_cert_file -credhub get -n /bosh-autoscaler/cf/uaa_ssl -k private_key > $uaa_ssl_key_file +credhub get -n /bosh-autoscaler/cf/uaa_ssl -k ca > ${uaa_ssl_ca_file} +credhub get -n /bosh-autoscaler/cf/uaa_ssl -k certificate > ${uaa_ssl_cert_file} +credhub get -n /bosh-autoscaler/cf/uaa_ssl -k private_key > ${uaa_ssl_key_file} credhub set -n /bosh-autoscaler/prometheus/alertmanager_slack_channel -t value -v "${slack_channel}" credhub set -n /bosh-autoscaler/prometheus/alertmanager_slack_api_url -t value -v "${slack_webhook}" @@ -70,8 +70,8 @@ credhub set -n /bosh-autoscaler/prometheus/alertmanager_slack_api_url -t value - function find_or_upload_stemcell(){ # Determine if we need to upload a stemcell at this point. - stemcell_os=$(yq eval '.stemcells[] | select(.alias == "default").os' $deployment_manifest) - stemcell_version=$(yq eval '.stemcells[] | select(.alias == "default").version' $deployment_manifest) + stemcell_os=$(yq eval '.stemcells[] | select(.alias == "default").os' ${deployment_manifest}) + stemcell_version=$(yq eval '.stemcells[] | select(.alias == "default").version' ${deployment_manifest}) stemcell_name="bosh-google-kvm-${stemcell_os}-go_agent" if ! bosh stemcells | grep "${stemcell_name}" >/dev/null; then @@ -100,6 +100,8 @@ function deploy () { log "using Ops files: '${OPS_FILES_TO_USE}'" log "deploy args: '${bosh_deploy_opts}'" + # TODO: For Debugging: Do a `bosh interpolate` first? + bosh -n -d "${deployment_name}" \ deploy "${deployment_manifest}" \ ${OPS_FILES_TO_USE} \ diff --git a/ci/terragrunt/.tool-versions b/ci/terragrunt/.tool-versions index ad5b124b41..e429e32a6f 100644 --- a/ci/terragrunt/.tool-versions +++ b/ci/terragrunt/.tool-versions @@ -1,6 +1,6 @@ -gcloud 437.0.1 -helm 3.12.1 -python 3.11.4 -terraform 1.5.2 +gcloud 447.0.0 +helm 3.12.3 +python 3.11.5 +terraform 1.5.7 terraform-lsp -terragrunt 0.48.1 +terragrunt 0.51.8 diff --git a/ci/terragrunt/app-autoscaler/github-arc-team-wg-ci/.terraform.lock.hcl b/ci/terragrunt/app-autoscaler/github-arc-team-wg-ci/.terraform.lock.hcl index 5aa72c5767..b098c74dfc 100644 --- a/ci/terragrunt/app-autoscaler/github-arc-team-wg-ci/.terraform.lock.hcl +++ b/ci/terragrunt/app-autoscaler/github-arc-team-wg-ci/.terraform.lock.hcl @@ -19,55 +19,55 @@ provider "registry.terraform.io/gavinbunney/kubectl" { } provider "registry.terraform.io/hashicorp/google" { - version = "4.72.1" + version = "4.84.0" hashes = [ - "h1:7eGRYDBZ3aAVlbo2JcIRnp037TJ8oO/eHzU2UCx19V8=", - "h1:Bcyacs3EFH0Z/Q/w88QTmlzrsrO81GoHFd3VOwzoYoU=", - "h1:NwlmUwPRZldIyaZb12qJfmFNtc0fkfmFLqNWDVSZ4TE=", - "h1:QYGHDARL8kbo07OpmdVzWhpoHaBy+rleGfkRjzXMEEk=", - "h1:RuR8OMwVhQbEbf9QyVTmrb3eaW1JqvM12OUc7RCFcfs=", - "h1:ZGaTfhGyMwfhiEgW9HArCq9LG7Eyd+oZaqNhbk5OlDU=", - "h1:bkve+o94+chV4lFe3k3FI+hdul8Eyp+7x2a8cGPIb/0=", - "h1:nh2kB2tlgxGpf9uHyLVacvkexXPXQLYKlb5m7LwWjNk=", - "h1:qRtRlv5wzsDO0iZIjhDrOMr4Q+U06dgBkaVdB9Ptyyo=", - "h1:tKwTn5vyk/fYGR/EhM9ab9/6+8YS100PVtJBf3NX//U=", - "h1:zfCB78G6SqHeUA95KyyOQnrXwhsWi7f8rdyaF82I6Yo=", + "h1:/JoTJdmrba01bXAXhJox4D7HIppGAE8IcdmwrC1+NeI=", + "h1:1UxlwVhklQbnsyuCelue0dkQZUHA2cMjgYvl8lWRE8Q=", + "h1:3qXFXgT2RAseuYW20OUqBLMeSuKt5tbpNI15GU5J7KE=", + "h1:FtmujB+frf40ztU300FEd/cnah5o/ZVItCTYk+Qj1Wo=", + "h1:PhC05RRIJi2iPLf9ny2JsYxVlhdC4LvXsuPfg4U/Pbg=", + "h1:W9PU6CJQSb0p6pL+OonuWrCW2HJITiIykQkrwCAgYnw=", + "h1:c4ksHVh0kRBFDvP3peYx99oZgh/afzOGxPJwdApcKBU=", + "h1:fybaK74buTd4Ys2CUZm6jw7NXtSqtcLoW2jeNB4Ff2E=", + "h1:h55lVbwYeHIfdysoWDXaDQ5y9LSXc2vEfRKmpM4wzlA=", + "h1:xUcvXNL047wjwjSqmOLjP1k1hAjiFPCdYc235503v2k=", + "h1:yF3EvGbN+7hGQKhPbZijmFk24UDTw9yldkQ1isUM+B4=", ] } provider "registry.terraform.io/hashicorp/kubernetes" { - version = "2.21.1" + version = "2.23.0" hashes = [ - "h1:/RbNfqTldk/hTjiUjUuiAw8XVULUtYSDTbeKhs+ZW5o=", - "h1:2spGoBcGDQ/Csc23bddCfM21zyKx3PONoiqRgmuChnM=", - "h1:7cCH+Wsg2lFTpsTleJ7MewkrYfFlxU1l4HlLWP8wzFw=", - "h1:I1qWLUFmB0Z8+3CX+XzJtkgiAOYQ1nHlLN9lFcPf+zc=", - "h1:MxZmniZEYMxRRZ/gzQsZO9YC46p6gNwSGH+TSYCny/Q=", - "h1:WtLHH4m1Btjs2QhbQHWVwTujLOMK8B7lwngejbCcXkM=", - "h1:bXc0ue6S0xDbelSOYjXOQgOa0lombXDZrblwU2lvErg=", - "h1:gP8IU3gFfXYRfGZr5Qws9JryZsOGsluAVpiAoZW7eo0=", - "h1:jCRKxaAWE6ayspakxcU5wR4deC2M/Tq3KrrOmU9RO8Y=", - "h1:qzkHi2N28Xl57cteGZElxAVYKEr/trlyMnKXc7xaD74=", - "h1:x6RALWCLxmo+4IQDK3VVZLOXpR7VAiv8LNMCSEfBo6c=", + "h1:268LPgwqi6+WWDdxkKkE3NnrG5t8e/Po0HP4ocRFeM8=", + "h1:9c/k4NUSb5Oxg/UYkBNxtjizdkUcd5Dg1l5Yn9vVAzM=", + "h1:PTuAVVjCX41j7T2ffWcWZ1/zSY5N/ysHahvdIvw2IKM=", + "h1:S0dS3oy5c6ma2JUzpbtO45wb5iSCJdFFiUDf/t99tws=", + "h1:arTzD0XG/DswGCAx9JEttkSKe9RyyFW9W7UWcXF13dU=", + "h1:cMs2scNCSgQhGamomGT5Ag4i8ms/mql1AR7NJc2hmbA=", + "h1:lDElv6Yi8IIvDskRx0937XBoFNO/GiULFRDFeVF5sTc=", + "h1:sNA/0F6F3RW/Ew54jZatGlE6v2BvSKUEV7MQ6WPJECU=", + "h1:sXCkOxRoMFTJnBMRmQlem2S5euv65k4veJQN5LaJayI=", + "h1:uosKyesMfmeKIcxjMLaHVMW3uW3zVy50Bzvx2jpsNoE=", + "h1:xyFc77aYkPoU4Xt1i5t0B1IaS8TbTtp9aCSuQKDayII=", ] } provider "registry.terraform.io/integrations/github" { - version = "5.29.0" + version = "5.39.0" hashes = [ - "h1:3g4M606rOvYpPKgB6DnSQVWYkRPc9o5+/Cg9VD7BcHg=", - "h1:3lWhSOUEWVuUqyvEoy/dMbQGMX4BVSECrSpkImUQge0=", - "h1:5Q4c+ippTE5ar7d0lu5s7ta1ygzyx8A6fd5XQnRyLrA=", - "h1:8e/2zI37aga96peL1ILYIDG8H9CSY7csExj8bPgCyIw=", - "h1:AiPvbitLUTmVcxacN6SDWbAEaq7ci49fdoU0y16K8s0=", - "h1:E8QmIzJ41VwnZ823ulimCwXYuMlhTT35P1RFubXUjKc=", - "h1:HGWE6BEKe5nMlWTLbW4hnDoV2m6YMCi4VPBvy2ndRuE=", - "h1:HPmiutLYra6btE0x/1byYwlJCgXBscK57PzMXz/TcYI=", - "h1:O7VyGCpFPA5KsmBrMSNGXl4LApNhwx/qQ1xuMVzPZHs=", - "h1:WqFXfmhoYRUZTs73+S2BJ0jurUXpL+VRRJwj11IKr5I=", - "h1:YRvZXSI1numhgl7SuAE2Bx6aPg2ba7fay+Ze7B5JDyc=", - "h1:aEA5zQv9lMnw/Iv9aEKB5/hc89LOWhAtstf4kYvrhgk=", - "h1:fMy4HzlY4LCQZgLoe/hNzL12OaSwtLcGQQsFFdj0uEw=", - "h1:wJ44inqS4Jq7+dMmCdBezMs79cfqeemNIIEKJFbffHM=", + "h1:06Scx58eTkq75+Gab2yLEGSJVExgBrs3x41VzZsqLpM=", + "h1:1husYTourHfAVSU5PBw+2Zy+lHEOo5Ps5it7ImFpgzI=", + "h1:67gvGDvZwT3y2Mm2KLwU27UlnRBJYmoX46umuEYYRcA=", + "h1:AMn+8x91H4L0bNXgfGA4mEmjumfd7lslBRNsf+Z3J9Q=", + "h1:B2pPhXlLR5IHfoO6MQ70EgfavVLUlFd8FQw2zxy04RM=", + "h1:CWHfRWb9wFjeatvmSIptEI7AC4XEytP0qL5G8NMwCRY=", + "h1:EsDsxcxdtvQ6D64PNbkGG6PbAC2l2ECeCryGPw6uKIw=", + "h1:GbDlqPqMnI0DAmfb4BYpgAVZr2COQ1W6SHmeZCuWCO0=", + "h1:LepBhd6HaETXMLOUZUQvjCnRnv656U5rxRNgdN9A8rA=", + "h1:SWuVpPS2BGa1FfeN4XbRUHaGfB7/MXE2889UDb2LkWk=", + "h1:Ub3ir2MB3ST+iUELd6oXBYhKpvPVal9be8GaUzLyCTs=", + "h1:mpO68ifHJruMIuSvOuCa4PQt841arZr50O+uCxjhVak=", + "h1:sCvgFP1CL4oUkic0FXxNc8Xbi7ShAaqfMxv7JuHi7p8=", + "h1:ycsN9UqZkAhye5wBb8HRGyarfBeUCVBwoweenzGqtWA=", ] } diff --git a/docs/Public_API.rst b/docs/Public_API.rst index 12a6a9467a..4890860b28 100644 --- a/docs/Public_API.rst +++ b/docs/Public_API.rst @@ -30,7 +30,7 @@ Parameters +--------------------+-------------------------------------------------------------------------------+---------------------------------------------------------------------+-----------------------+----------------------------------+ | end-time | The end time | int, the number of nanoseconds elapsed since January 1, 1970 UTC. | false. default 'now' | end-time=1494989549117047288 | +--------------------+-------------------------------------------------------------------------------+---------------------------------------------------------------------+-----------------------+----------------------------------+ -| order-direction | The order type. The scaling history will be order by timestamp asc or desc. | string,"asc" or "desc" | false. default desc | order-direction=desc | +| order-direction | The order type. The scaling history will be order by timestamp asc or desc. | string, "asc" or "desc" | false. default desc | order-direction=desc | +--------------------+-------------------------------------------------------------------------------+---------------------------------------------------------------------+-----------------------+----------------------------------+ | page | The page number to query | int | false. default 1 | page=1 | +--------------------+-------------------------------------------------------------------------------+---------------------------------------------------------------------+-----------------------+----------------------------------+ @@ -47,7 +47,7 @@ cURL '''' | curl "https://[the-api-server-url]:[port]/v1/apps/8d0cee08-23ad-4813-a779-ad8118ea0b91/scaling\_histories?start-time=1494989539138350432&end-time=1494989539138399999&order-direction=desc&page=1&results-per-page=10" \\ | -X GET \\ - | -H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQwOCIsImVtYWlsIjoiZW1haWwtMzAzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDU1NTc5NzF9.RMJZvSzCSxpj4jjZBmzbO7eoSfTAcIWVSHqFu5\_Iu\_o" + | -H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQwOCIsImVtYWlsIjoiZW1haWwtMzAzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDU1NTc5NzF9.RMJZvSzCSxpj4jjZBmzbO7eoSfTAcIWVSHqFu5\_Iu\_o" Response ^^^^^^^^ @@ -145,7 +145,7 @@ Parameters +--------------------+-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-----------------------+----------------------------------+ | guid | The GUID of the application | | true | | +--------------------+-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-----------------------+----------------------------------+ -| metric_type | The metric type | String, memoryused,memoryutil,responsetime, throughput or custom metric's name | true | metric_type=memoryused | +| metric_type | The metric type | String, "memoryused", "memoryutil", "responsetime", "throughput", "cpu" or custom metric's name | true | metric_type=memoryused | +--------------------+-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-----------------------+----------------------------------+ | start-time | The start time | int, the number of nanoseconds elapsed since January 1, 1970 UTC. | false, default 0 | start-time=1494989539138350432 | +--------------------+-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------+-----------------------+----------------------------------+ diff --git a/docs/policy.md b/docs/policy.md index 3bb598eb0c..ecbbf4d432 100644 --- a/docs/policy.md +++ b/docs/policy.md @@ -16,7 +16,7 @@ | Name | Type | Required|Description | |:---------------------|--------------|---------|---------------------------------------------------------------------------------| -| metric_type | String | true |one of system-default metric types `memoryused`,`memoryutil`,`responsetime`, `throughput`, `cpu` or user-defined custom metric type| +| metric_type | String | true |one of system-default metric types `memoryused`, `memoryutil`, `responsetime`, `throughput`, `cpu` or user-defined custom metric type| | threshold | int | true |the boundary when metric value exceeds is considered as a breach | | operator | String | true |>, <, >=, <= | | adjustment | String | true |the adjustment approach for instance count with each scaling. Support regex format `^[-+][1-9]+[0-9]*[%]?$`, i.e. +5 means adding 5 instances, -50% means shrinking to the half of current size. | @@ -50,7 +50,7 @@ | Name | Type | Required| Description | |:-------------------------------------|----------------------------|---------|----------------------------------------------------------------------------| | start_date_time | String,"yyyy-mm-ddThh:mm" | true | the start time of the schedule. Must be a future time | -| start_date_time | String,"yyyy-mm-ddThh:mm" | true | the end time of the schedule. Must be a future time | +| end_date_time | String,"yyyy-mm-ddThh:mm" | true | the end time of the schedule. Must be a future time | | instance_min_count | int | true | minimal number of instance count for this schedule | | instance_max_count | int | true | maximal number of instance count for this schedule | | initial_min_instance_count | int | false | the initial minimal number of instance count for this schedule | diff --git a/flake.lock b/flake.lock index 0151fbcf89..2ec32d7752 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1688231357, - "narHash": "sha256-ZOn16X5jZ6X5ror58gOJAxPfFLAQhZJ6nOUeS4tfFwo=", + "lastModified": 1694959747, + "narHash": "sha256-CXQ2MuledDVlVM5dLC4pB41cFlBWxRw4tCBsFrq3cRk=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "645ff62e09d294a30de823cb568e9c6d68e92606", + "rev": "970a59bd19eff3752ce552935687100c46e820a5", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 81a6689098..3797b22442 100644 --- a/flake.nix +++ b/flake.nix @@ -37,6 +37,7 @@ google-cloud-sdk maven nodejs + nodePackages.yaml-language-server # # We use the binary-buildpack and nix-build-results have set the wrong ELF-Interpreter. # # For more background, see: # # @@ -54,6 +55,7 @@ # # jdwpkgs.rubyPackages.cf-uaac shellcheck + swagger-cli temurin-bin yq-go ]; @@ -62,7 +64,11 @@ hardeningDisable = [ "fortify" ]; shellHook = '' - echo -ne '\033[1;33m' '\033[5m' + aes_terminal_font_yellow='\e[38;2;255;255;0m' + aes_terminal_font_blink='\e[5m' + aes_terminal_reset='\e[0m' + + echo -ne "$aes_terminal_font_yellow" "$aes_terminal_font_blink" cat << 'EOF' ⚠️ If `whoami` does not work properly on your computer, `bosh ssh` commands may fail. The solution is, to provide your nix dev-shell the path to the `libnss_sss.so.2` of @@ -71,9 +77,9 @@ Adapt the following line to contain the correct path: export LD_PRELOAD='/lib/x86_64-linux-gnu/libnss_sss.so.2' EOF - echo -ne '\033[0m' + echo -ne "$aes_terminal_reset" ''; }; }); }; -} \ No newline at end of file +} diff --git a/go.work b/go.work new file mode 100644 index 0000000000..3e6e2963d8 --- /dev/null +++ b/go.work @@ -0,0 +1,9 @@ +go 1.20 + +use ( + ./src/acceptance + ./src/acceptance/assets/app/go_app + ./src/autoscaler + ./src/changelog + ./src/changeloglockcleaner +) diff --git a/jobs/Gemfile b/jobs/Gemfile index 7496261caf..40b6edc590 100644 --- a/jobs/Gemfile +++ b/jobs/Gemfile @@ -5,5 +5,5 @@ group :development, :test do gem "rspec" gem "rspec-its" gem "standard" - gem "rspec-file_fixtures", "0.1.7" + gem "rspec-file_fixtures", "0.1.8" end diff --git a/jobs/Gemfile.lock b/jobs/Gemfile.lock index c219269b68..1fa5f8b980 100644 --- a/jobs/Gemfile.lock +++ b/jobs/Gemfile.lock @@ -2,12 +2,13 @@ GEM remote: https://rubygems.org/ specs: ast (2.4.2) + base64 (0.1.1) bosh-template (2.4.0) semi_semantic (~> 1.2.0) diff-lcs (1.5.0) json (2.6.3) language_server-protocol (3.17.0.3) - lint_roller (1.0.0) + lint_roller (1.1.0) parallel (1.23.0) parser (3.2.2.3) ast (~> 2.4.1) @@ -15,7 +16,7 @@ GEM racc (1.7.1) rainbow (3.1.1) regexp_parser (2.8.1) - rexml (3.2.5) + rexml (3.2.6) rspec (3.12.0) rspec-core (~> 3.12.0) rspec-expectations (~> 3.12.0) @@ -25,44 +26,47 @@ GEM rspec-expectations (3.12.3) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.12.0) - rspec-file_fixtures (0.1.7) + rspec-file_fixtures (0.1.8) rspec (~> 3.12) rspec-its (1.3.0) rspec-core (>= 3.0.0) rspec-expectations (>= 3.0.0) - rspec-mocks (3.12.5) + rspec-mocks (3.12.6) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.12.0) rspec-support (3.12.1) - rubocop (1.52.1) + rubocop (1.56.4) + base64 (~> 0.1.1) json (~> 2.3) + language_server-protocol (>= 3.17.0) parallel (~> 1.10) parser (>= 3.2.2.3) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.28.0, < 2.0) + rubocop-ast (>= 1.28.1, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) rubocop-ast (1.29.0) parser (>= 3.2.1.0) - rubocop-performance (1.18.0) + rubocop-performance (1.19.1) rubocop (>= 1.7.0, < 2.0) rubocop-ast (>= 0.4.0) ruby-progressbar (1.13.0) semi_semantic (1.2.0) - standard (1.29.0) + standard (1.31.1) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.0) - rubocop (~> 1.52.0) + rubocop (~> 1.56.2) standard-custom (~> 1.0.0) - standard-performance (~> 1.1.0) - standard-custom (1.0.1) + standard-performance (~> 1.2) + standard-custom (1.0.2) lint_roller (~> 1.0) - standard-performance (1.1.0) - lint_roller (~> 1.0) - rubocop-performance (~> 1.18.0) - unicode-display_width (2.4.2) + rubocop (~> 1.50) + standard-performance (1.2.0) + lint_roller (~> 1.1) + rubocop-performance (~> 1.19.0) + unicode-display_width (2.5.0) PLATFORMS ruby @@ -70,7 +74,7 @@ PLATFORMS DEPENDENCIES bosh-template rspec - rspec-file_fixtures (= 0.1.7) + rspec-file_fixtures (= 0.1.8) rspec-its standard diff --git a/jobs/eventgenerator/templates/bpm.yml.erb b/jobs/eventgenerator/templates/bpm.yml.erb index 5ef140a500..9df151045c 100644 --- a/jobs/eventgenerator/templates/bpm.yml.erb +++ b/jobs/eventgenerator/templates/bpm.yml.erb @@ -6,5 +6,6 @@ processes: - /var/vcap/jobs/eventgenerator/config/eventgenerator.yml env: DT_MONITOR: true + DT_APPLICATIONID: eventgenerator hooks: pre_start: /var/vcap/jobs/eventgenerator/bin/bpm-pre-start diff --git a/jobs/golangapiserver/spec b/jobs/golangapiserver/spec index 4e577b5046..4d74505d5b 100644 --- a/jobs/golangapiserver/spec +++ b/jobs/golangapiserver/spec @@ -86,7 +86,7 @@ properties: default: "Autoscaler" autoscaler.apiserver.info.build: description: "Autoscaler application build number" - default: "11.0.0" + default: "11.1.1" autoscaler.apiserver.info.support_url: description: "Autoscaler application support page URL" default: "https://github.com/cloudfoundry/app-autoscaler-release" diff --git a/jobs/golangapiserver/templates/bpm.yml.erb b/jobs/golangapiserver/templates/bpm.yml.erb index a6a73cdf5a..e12380d2de 100644 --- a/jobs/golangapiserver/templates/bpm.yml.erb +++ b/jobs/golangapiserver/templates/bpm.yml.erb @@ -6,5 +6,6 @@ processes: - /var/vcap/jobs/golangapiserver/config/apiserver.yml env: DT_MONITOR: true + DT_APPLICATIONID: apiserver hooks: pre_start: /var/vcap/jobs/golangapiserver/bin/bpm-pre-start diff --git a/jobs/metricsforwarder/templates/bpm.yml.erb b/jobs/metricsforwarder/templates/bpm.yml.erb index cc637c42a1..8ce33004fc 100644 --- a/jobs/metricsforwarder/templates/bpm.yml.erb +++ b/jobs/metricsforwarder/templates/bpm.yml.erb @@ -6,3 +6,4 @@ processes: - /var/vcap/jobs/metricsforwarder/config/metricsforwarder.yml env: DT_MONITOR: true + DT_APPLICATIONID: metricsforwarder diff --git a/jobs/metricsgateway/templates/bpm.yml.erb b/jobs/metricsgateway/templates/bpm.yml.erb index e6479ada8f..1cd16104ce 100644 --- a/jobs/metricsgateway/templates/bpm.yml.erb +++ b/jobs/metricsgateway/templates/bpm.yml.erb @@ -6,5 +6,6 @@ processes: - /var/vcap/jobs/metricsgateway/config/metricsgateway.yml env: DT_MONITOR: true + DT_APPLICATIONID: metricsgateway hooks: pre_start: /var/vcap/jobs/metricsgateway/bin/bpm-pre-start diff --git a/jobs/metricsserver/templates/bpm.yml.erb b/jobs/metricsserver/templates/bpm.yml.erb index da062bd8c5..09bd35b6bf 100644 --- a/jobs/metricsserver/templates/bpm.yml.erb +++ b/jobs/metricsserver/templates/bpm.yml.erb @@ -6,5 +6,6 @@ processes: - /var/vcap/jobs/metricsserver/config/metricsserver.yml env: DT_MONITOR: true + DT_APPLICATIONID: metricsserver hooks: pre_start: /var/vcap/jobs/metricsserver/bin/bpm-pre-start diff --git a/jobs/operator/templates/bpm.yml.erb b/jobs/operator/templates/bpm.yml.erb index 97990b74b3..efba5b1955 100644 --- a/jobs/operator/templates/bpm.yml.erb +++ b/jobs/operator/templates/bpm.yml.erb @@ -6,5 +6,6 @@ processes: - /var/vcap/jobs/operator/config/operator.yml env: DT_MONITOR: true + DT_APPLICATIONID: operator hooks: pre_start: /var/vcap/jobs/operator/bin/bpm-pre-start diff --git a/jobs/scalingengine/templates/bpm.yml.erb b/jobs/scalingengine/templates/bpm.yml.erb index 20c4966708..034e4d8459 100644 --- a/jobs/scalingengine/templates/bpm.yml.erb +++ b/jobs/scalingengine/templates/bpm.yml.erb @@ -6,5 +6,6 @@ processes: - /var/vcap/jobs/scalingengine/config/scalingengine.yml env: DT_MONITOR: true + DT_APPLICATIONID: scalingengine hooks: pre_start: /var/vcap/jobs/scalingengine/bin/bpm-pre-start diff --git a/jobs/scheduler/templates/bpm.yml.erb b/jobs/scheduler/templates/bpm.yml.erb index 19c0dfde4d..0a88849e21 100644 --- a/jobs/scheduler/templates/bpm.yml.erb +++ b/jobs/scheduler/templates/bpm.yml.erb @@ -7,5 +7,6 @@ processes: - /var/vcap/packages/scheduler/scheduler-1.0-SNAPSHOT.war env: DT_MONITOR: true + DT_APPLICATIONID: scheduler hooks: pre_start: /var/vcap/jobs/scheduler/bin/bpm-pre-start diff --git a/packages/eventgenerator/spec b/packages/eventgenerator/spec index c07ec0f71f..03b7c4b16f 100644 --- a/packages/eventgenerator/spec +++ b/packages/eventgenerator/spec @@ -155,6 +155,7 @@ files: - autoscaler/vendor/google.golang.org/grpc/internal/grpcrand/* # gosub - autoscaler/vendor/google.golang.org/grpc/internal/grpcsync/* # gosub - autoscaler/vendor/google.golang.org/grpc/internal/grpcutil/* # gosub +- autoscaler/vendor/google.golang.org/grpc/internal/idle/* # gosub - autoscaler/vendor/google.golang.org/grpc/internal/metadata/* # gosub - autoscaler/vendor/google.golang.org/grpc/internal/pretty/* # gosub - autoscaler/vendor/google.golang.org/grpc/internal/resolver/* # gosub diff --git a/packages/golang-1-linux/spec.lock b/packages/golang-1-linux/spec.lock index 15a29eee22..06df2459a7 100644 --- a/packages/golang-1-linux/spec.lock +++ b/packages/golang-1-linux/spec.lock @@ -1,2 +1,2 @@ name: golang-1-linux -fingerprint: b09468ac73cd3350333a35eb09c980c6a06c5465be0e1ba430da62757dc10a04 +fingerprint: b09468ac73cd3350333a35eb09c980c6a06c5465be0e1ba430da62757dc10a04 \ No newline at end of file diff --git a/packages/golang-1-linux/vendored-commit b/packages/golang-1-linux/vendored-commit index dd526b3208..cac3018339 100644 --- a/packages/golang-1-linux/vendored-commit +++ b/packages/golang-1-linux/vendored-commit @@ -1 +1 @@ -c85f28c01461bdbf894616368818d47c104b89f2 +c85f28c01461bdbf894616368818d47c104b89f2 \ No newline at end of file diff --git a/packages/golangapiserver/spec b/packages/golangapiserver/spec index 123daa30c2..f58c0cd975 100644 --- a/packages/golangapiserver/spec +++ b/packages/golangapiserver/spec @@ -40,7 +40,6 @@ files: - autoscaler/vendor/github.com/go-chi/chi/v5/* # gosub - autoscaler/vendor/github.com/go-sql-driver/mysql/* # gosub - autoscaler/vendor/github.com/golang/protobuf/proto/* # gosub -- autoscaler/vendor/github.com/golang/protobuf/ptypes/timestamp/* # gosub - autoscaler/vendor/github.com/google/uuid/* # gosub - autoscaler/vendor/github.com/gorilla/mux/* # gosub - autoscaler/vendor/github.com/hashicorp/go-cleanhttp/* # gosub diff --git a/packages/metricsforwarder/spec b/packages/metricsforwarder/spec index 6e4da745ab..b4cc148848 100644 --- a/packages/metricsforwarder/spec +++ b/packages/metricsforwarder/spec @@ -142,6 +142,7 @@ files: - autoscaler/vendor/google.golang.org/grpc/internal/grpcrand/* # gosub - autoscaler/vendor/google.golang.org/grpc/internal/grpcsync/* # gosub - autoscaler/vendor/google.golang.org/grpc/internal/grpcutil/* # gosub +- autoscaler/vendor/google.golang.org/grpc/internal/idle/* # gosub - autoscaler/vendor/google.golang.org/grpc/internal/metadata/* # gosub - autoscaler/vendor/google.golang.org/grpc/internal/pretty/* # gosub - autoscaler/vendor/google.golang.org/grpc/internal/resolver/* # gosub diff --git a/packages/metricsgateway/spec b/packages/metricsgateway/spec index 1a104b17ee..55f1af5d8b 100644 --- a/packages/metricsgateway/spec +++ b/packages/metricsgateway/spec @@ -136,6 +136,7 @@ files: - autoscaler/vendor/google.golang.org/grpc/internal/grpcrand/* # gosub - autoscaler/vendor/google.golang.org/grpc/internal/grpcsync/* # gosub - autoscaler/vendor/google.golang.org/grpc/internal/grpcutil/* # gosub +- autoscaler/vendor/google.golang.org/grpc/internal/idle/* # gosub - autoscaler/vendor/google.golang.org/grpc/internal/metadata/* # gosub - autoscaler/vendor/google.golang.org/grpc/internal/pretty/* # gosub - autoscaler/vendor/google.golang.org/grpc/internal/resolver/* # gosub diff --git a/packages/metricsserver/spec b/packages/metricsserver/spec index fbfab8141e..6b0ca517c4 100644 --- a/packages/metricsserver/spec +++ b/packages/metricsserver/spec @@ -137,6 +137,7 @@ files: - autoscaler/vendor/google.golang.org/grpc/internal/grpcrand/* # gosub - autoscaler/vendor/google.golang.org/grpc/internal/grpcsync/* # gosub - autoscaler/vendor/google.golang.org/grpc/internal/grpcutil/* # gosub +- autoscaler/vendor/google.golang.org/grpc/internal/idle/* # gosub - autoscaler/vendor/google.golang.org/grpc/internal/metadata/* # gosub - autoscaler/vendor/google.golang.org/grpc/internal/pretty/* # gosub - autoscaler/vendor/google.golang.org/grpc/internal/resolver/* # gosub diff --git a/packages/openjdk-17/spec.lock b/packages/openjdk-17/spec.lock index 6e649cf122..1acd277429 100644 --- a/packages/openjdk-17/spec.lock +++ b/packages/openjdk-17/spec.lock @@ -1,2 +1,2 @@ name: openjdk-17 -fingerprint: 442aa95884826ac0ec2f1d5414c39b84e336b87e26691e60fb1fd4c1d4cbb800 +fingerprint: be13f95495365f8879a75d9237320cd587774f6cbc087020bd6508fb8a82184a diff --git a/packages/openjdk-17/vendored-commit b/packages/openjdk-17/vendored-commit index 321295b351..bb82993790 100644 --- a/packages/openjdk-17/vendored-commit +++ b/packages/openjdk-17/vendored-commit @@ -1 +1 @@ -cfc2910f5ffb2d44d525c297d11c9197178373e5 +0de1db7e1336d5414845c81b5a3084968454ec98 diff --git a/packages/openjdk-17/version b/packages/openjdk-17/version index ab56cb2eca..fbd5a1a6d8 100644 --- a/packages/openjdk-17/version +++ b/packages/openjdk-17/version @@ -1 +1 @@ -17.0.7_7 \ No newline at end of file +17.0.8.1_1 \ No newline at end of file diff --git a/packages/operator/spec b/packages/operator/spec index 04e479ef29..9ffcd12dbe 100644 --- a/packages/operator/spec +++ b/packages/operator/spec @@ -29,7 +29,6 @@ files: - autoscaler/vendor/github.com/cespare/xxhash/v2/* # gosub - autoscaler/vendor/github.com/go-sql-driver/mysql/* # gosub - autoscaler/vendor/github.com/golang/protobuf/proto/* # gosub -- autoscaler/vendor/github.com/golang/protobuf/ptypes/timestamp/* # gosub - autoscaler/vendor/github.com/gorilla/mux/* # gosub - autoscaler/vendor/github.com/hashicorp/go-cleanhttp/* # gosub - autoscaler/vendor/github.com/hashicorp/go-retryablehttp/* # gosub diff --git a/packages/scalingengine/spec b/packages/scalingengine/spec index d15e97c1fb..1c211d2b02 100644 --- a/packages/scalingengine/spec +++ b/packages/scalingengine/spec @@ -31,7 +31,6 @@ files: - autoscaler/vendor/github.com/cespare/xxhash/v2/* # gosub - autoscaler/vendor/github.com/go-sql-driver/mysql/* # gosub - autoscaler/vendor/github.com/golang/protobuf/proto/* # gosub -- autoscaler/vendor/github.com/golang/protobuf/ptypes/timestamp/* # gosub - autoscaler/vendor/github.com/gorilla/mux/* # gosub - autoscaler/vendor/github.com/hashicorp/go-cleanhttp/* # gosub - autoscaler/vendor/github.com/hashicorp/go-retryablehttp/* # gosub diff --git a/releases/app-autoscaler/app-autoscaler-11.1.0.yml b/releases/app-autoscaler/app-autoscaler-11.1.0.yml new file mode 100644 index 0000000000..91c10adcf9 --- /dev/null +++ b/releases/app-autoscaler/app-autoscaler-11.1.0.yml @@ -0,0 +1,163 @@ +name: app-autoscaler +version: 11.1.0 +commit_hash: 9d2b8a97 +uncommitted_changes: false +jobs: +- name: eventgenerator + version: b2d2b8153753c2db2a166a851c62b51e7cb1a3b6f9c05c48ab3461299a8c4f23 + fingerprint: b2d2b8153753c2db2a166a851c62b51e7cb1a3b6f9c05c48ab3461299a8c4f23 + sha1: sha256:8f2f5bf042a0b3d9e6946538084a0fd0ecfce39fa57961556529d33ca7ed46b2 + packages: + - openjdk-17 + - db + - eventgenerator + - common + - changeloglockcleaner +- name: golangapiserver + version: 1036b9da383abe282a90545920d75115471f66334e5f012ff9dd3d26730033e3 + fingerprint: 1036b9da383abe282a90545920d75115471f66334e5f012ff9dd3d26730033e3 + sha1: sha256:fee48db9ed6c3f82cffa022052a48cfe7c10a45ed668b5a50474f35dddcdba6e + packages: + - golang-1-linux + - golangapiserver + - db + - openjdk-17 + - common + - changeloglockcleaner +- name: metricsforwarder + version: a1f9aff41f3280ba09cf01ff2b94fba006e393aae7250c1e7a24c3f5db8cfc14 + fingerprint: a1f9aff41f3280ba09cf01ff2b94fba006e393aae7250c1e7a24c3f5db8cfc14 + sha1: sha256:8abb357807ce50a10f666c272fcaa8bd830adf8733de878510666ff59cc7f100 + packages: + - db + - metricsforwarder + - common +- name: metricsgateway + version: a32ac8746733a6b38429d9396ffad3e91bcd752bebd70575760da12a7b952116 + fingerprint: a32ac8746733a6b38429d9396ffad3e91bcd752bebd70575760da12a7b952116 + sha1: sha256:c68ffbe7b56539c83c2a1a45e1d95e505c936cdbaadb83c0b18923a59a4d288c + packages: + - openjdk-17 + - db + - metricsgateway + - common +- name: metricsserver + version: 9dd076e50c33a9d28562ec0ce44216530cf027bba605d68a87025ec5af35dac9 + fingerprint: 9dd076e50c33a9d28562ec0ce44216530cf027bba605d68a87025ec5af35dac9 + sha1: sha256:7b206a85eeaa9653145f23ce86d06b56a197fa194c9fb77d7302498fcf4ebc9a + packages: + - openjdk-17 + - db + - metricsserver + - common + - changeloglockcleaner +- name: operator + version: d9d2e4b01775c9cfdeb6d08e51a8359825e7e58dd9287ef8ed7c0e92079f545b + fingerprint: d9d2e4b01775c9cfdeb6d08e51a8359825e7e58dd9287ef8ed7c0e92079f545b + sha1: sha256:2a28db8de40e66c49884669d48f61574e5fcf2150ad6e7d35710b6c663b34b53 + packages: + - operator + - common + - db + - openjdk-17 + - changeloglockcleaner +- name: scalingengine + version: 79452b9f8b4e3f973ffe2cd2c7451a6eafe8d9f305ccb72fc05caf58cb848c50 + fingerprint: 79452b9f8b4e3f973ffe2cd2c7451a6eafe8d9f305ccb72fc05caf58cb848c50 + sha1: sha256:5346cd7f63627aad66253e035fbc7f08679de2941d2fbb2fb55933df6ae32012 + packages: + - openjdk-17 + - db + - scalingengine + - common + - changeloglockcleaner +- name: scheduler + version: 96284fc271b871ecb496fff4a2b7674bddf07e2c62acc3c853954d4259b7ec17 + fingerprint: 96284fc271b871ecb496fff4a2b7674bddf07e2c62acc3c853954d4259b7ec17 + sha1: sha256:13757c46cd45cd96b0848600c3034a6c30afac34a4467b5ce2cd9e532731663e + packages: + - scheduler + - db + - openjdk-17 + - common + - changeloglockcleaner +packages: +- name: changeloglockcleaner + version: bbd6b1bc309c9aee0cb7276885b7465bbf6009bc4c31bfcbf3eb882e6ec96783 + fingerprint: bbd6b1bc309c9aee0cb7276885b7465bbf6009bc4c31bfcbf3eb882e6ec96783 + sha1: sha256:ed67f19a318df287ec938ea3d5a18c43f838cad33fe1c23bdfc724c153333bb5 + dependencies: + - golang-1-linux +- name: common + version: 9d7726aa454227e3087cd4a04425acae72d883a5bb19d314930ab58e83f04d0e + fingerprint: 9d7726aa454227e3087cd4a04425acae72d883a5bb19d314930ab58e83f04d0e + sha1: sha256:979ff40c6e44031bec55344aa4a522cac3d265ab23deaea0f7bc7541aa2b4124 + dependencies: [] +- name: db + version: 78dc6ee98aba1e2b7ab50071b132601cbccae7897c44af5d7c9e7b0af37ce112 + fingerprint: 78dc6ee98aba1e2b7ab50071b132601cbccae7897c44af5d7c9e7b0af37ce112 + sha1: sha256:8ae98002bdd166a266e282ad93c3a443d5f6518d6ee0d48770c7143fcabf0702 + dependencies: + - openjdk-17 +- name: eventgenerator + version: f556306b400b47708e8e9267d1a5282669b911827e8600122d2fc99a36ca4fe2 + fingerprint: f556306b400b47708e8e9267d1a5282669b911827e8600122d2fc99a36ca4fe2 + sha1: sha256:a948ba87c7bf003e919c74eefedb5b5b213a0e569612ac8d907ee90e055b22a9 + dependencies: + - golang-1-linux +- name: golang-1-linux + version: 126fca7399cba5bc8c1b02e392441f1688daf1586d57d1b3614e314b893a6cc4 + fingerprint: 126fca7399cba5bc8c1b02e392441f1688daf1586d57d1b3614e314b893a6cc4 + sha1: sha256:70c3918c28cd74a0a9be561b5eac8b85e8e7de4a72bc66cd321288974937e0be + dependencies: [] +- name: golangapiserver + version: 255c3f6571c88b6f7701478400b9f9ab9efa574d256ff4a4ea38f35a6535ef27 + fingerprint: 255c3f6571c88b6f7701478400b9f9ab9efa574d256ff4a4ea38f35a6535ef27 + sha1: sha256:fe8343260b81a0323c685f9c8b05fa98145b1ea3d5bd4cda9523819b8b22d9af + dependencies: + - golang-1-linux +- name: metricsforwarder + version: 0b7ea6c06556a84c5f1fbdc655a3735d1e1b7f22cb9b498d4e1e3cb7d12c07c7 + fingerprint: 0b7ea6c06556a84c5f1fbdc655a3735d1e1b7f22cb9b498d4e1e3cb7d12c07c7 + sha1: sha256:7213361a59b913600e0ed52bd4b3ef61db6a5e36e6d1d16de316e255399bf60b + dependencies: + - golang-1-linux +- name: metricsgateway + version: e3fa5fc434b93d0073573cf5ee961f99b06738fba6a1db2dd9666f4d14f7f9b7 + fingerprint: e3fa5fc434b93d0073573cf5ee961f99b06738fba6a1db2dd9666f4d14f7f9b7 + sha1: sha256:0476fcc8800c679479622f58d79d28a077f6f3da11d794bc4989843421c90c88 + dependencies: + - golang-1-linux +- name: metricsserver + version: 3a51dcf9ad0eb5cc7496f29721d9fa6b13e6e2a718f4e0735b32d422cf4311cc + fingerprint: 3a51dcf9ad0eb5cc7496f29721d9fa6b13e6e2a718f4e0735b32d422cf4311cc + sha1: sha256:b7f5d23434929585166121cc68127c37bebaa49002237969d3ece47510975e79 + dependencies: + - golang-1-linux +- name: openjdk-17 + version: c3119e0fe852da44c771e907a1c79d80103ac1e0a127ec4c30c90aa9c11459e0 + fingerprint: c3119e0fe852da44c771e907a1c79d80103ac1e0a127ec4c30c90aa9c11459e0 + sha1: sha256:ad449f24f5a9e6971b8c9e3bb8e9500bbd5115a6872d3b95d8e0d96a60e896ed + dependencies: [] +- name: operator + version: 85910a843919e5874c030ec35bf99410934869d47968378235d098ea2671cd17 + fingerprint: 85910a843919e5874c030ec35bf99410934869d47968378235d098ea2671cd17 + sha1: sha256:baeed1093406aef9a9684089d74324b8c10a5c15b947f00d651f57ce02567e57 + dependencies: + - golang-1-linux +- name: scalingengine + version: 11d5c5962c9910e5bf5633d5c2c850d529d09a6ede0971812524f9a0031a944a + fingerprint: 11d5c5962c9910e5bf5633d5c2c850d529d09a6ede0971812524f9a0031a944a + sha1: sha256:b3e118ba8894dfc25eeef072498829df8ef62db34521ebcd77e4ef224dc9eb68 + dependencies: + - golang-1-linux +- name: scheduler + version: b32421fef6ca7258f020038972176f991283d23c9a82a63d382711c518fed005 + fingerprint: b32421fef6ca7258f020038972176f991283d23c9a82a63d382711c518fed005 + sha1: sha256:ac630bac90afac3a86d03bcacf9e960894d6ebf20944b858841050f68bd41c55 + dependencies: + - openjdk-17 +license: + version: 15eb386a0db48f190d29bd28058f5d0d6605f5acde7c6cfc6f014d57747e41f9 + fingerprint: 15eb386a0db48f190d29bd28058f5d0d6605f5acde7c6cfc6f014d57747e41f9 + sha1: sha256:6c7a834097b96efc340787fbe5876c1e366de0235def5e2b93fa016c8655535c diff --git a/releases/app-autoscaler/app-autoscaler-11.1.1.yml b/releases/app-autoscaler/app-autoscaler-11.1.1.yml new file mode 100644 index 0000000000..4ebf7bffc0 --- /dev/null +++ b/releases/app-autoscaler/app-autoscaler-11.1.1.yml @@ -0,0 +1,163 @@ +name: app-autoscaler +version: 11.1.1 +commit_hash: 5f407c4a +uncommitted_changes: false +jobs: +- name: eventgenerator + version: e951e5c78ceaf71f740bf125c92cb36c0954dc6e0088fc30587912fb362b0eb8 + fingerprint: e951e5c78ceaf71f740bf125c92cb36c0954dc6e0088fc30587912fb362b0eb8 + sha1: sha256:c58fe1baccfa047d186289f63835cf1343ae64eaa6d4bbc0aa86f22edcfdd09b + packages: + - openjdk-17 + - db + - eventgenerator + - common + - changeloglockcleaner +- name: golangapiserver + version: 0a63a1ff0f4c1d40e2a832bb49e87cb2b3670ebb30b3efc3b5f30869ba7a2842 + fingerprint: 0a63a1ff0f4c1d40e2a832bb49e87cb2b3670ebb30b3efc3b5f30869ba7a2842 + sha1: sha256:8f33781e309a47eebb768a53b8c4ccf0fda8ff1b2c604787a2c43c3046dfb2b2 + packages: + - golang-1-linux + - golangapiserver + - db + - openjdk-17 + - common + - changeloglockcleaner +- name: metricsforwarder + version: 87d5d26c6370313877c2f14a4e08b769da16629c221a42fdda5b1a6f309f19c8 + fingerprint: 87d5d26c6370313877c2f14a4e08b769da16629c221a42fdda5b1a6f309f19c8 + sha1: sha256:18a5a9827c8d8c2aa0c51879e62b98f3ab86775f71b95b124b3140df072e685e + packages: + - db + - metricsforwarder + - common +- name: metricsgateway + version: 91ed05735d79d7c7b3c520e25f06006b0ce435d36c8ab1135c0515b147f5c5fb + fingerprint: 91ed05735d79d7c7b3c520e25f06006b0ce435d36c8ab1135c0515b147f5c5fb + sha1: sha256:7cb21f4bf99c743cab9285c4526300d0f29f4363acb890ea737a8cd0ddb99d6e + packages: + - openjdk-17 + - db + - metricsgateway + - common +- name: metricsserver + version: 015b4c35cbada507e1755bc7d47357e13a080e76c210eef076f498c6fd8e104a + fingerprint: 015b4c35cbada507e1755bc7d47357e13a080e76c210eef076f498c6fd8e104a + sha1: sha256:a509c937cb61c9b5e3c4721c37cb27269e044d5eabc8c4c1baf4cebdbb1d713e + packages: + - openjdk-17 + - db + - metricsserver + - common + - changeloglockcleaner +- name: operator + version: bf11ee9215842fc7de55d6bc1e29dc23d1d947cad25a1af219c58299d2e2500a + fingerprint: bf11ee9215842fc7de55d6bc1e29dc23d1d947cad25a1af219c58299d2e2500a + sha1: sha256:22fcaef786d2e68539318f44a5c2a0c37ed6057b6fc1dcffb8c219f152fbcee0 + packages: + - operator + - common + - db + - openjdk-17 + - changeloglockcleaner +- name: scalingengine + version: 3ebad910b309eb7127f9a2fe3f5bfa63d9ab7640274c06ee973b51a9cb21fb8d + fingerprint: 3ebad910b309eb7127f9a2fe3f5bfa63d9ab7640274c06ee973b51a9cb21fb8d + sha1: sha256:f0356489569fcd80e4ee5e7d7d099b88578be12ff2db7c81b28755f99fdd162b + packages: + - openjdk-17 + - db + - scalingengine + - common + - changeloglockcleaner +- name: scheduler + version: b83c28b3cdd6ceb40c8774a091862b19778b9211b25f0a0059f701f06f8ca2f6 + fingerprint: b83c28b3cdd6ceb40c8774a091862b19778b9211b25f0a0059f701f06f8ca2f6 + sha1: sha256:015e68ad82986eedc6ba403ebeb0c598c00b36b146ca3317a0be1e1be684fbb4 + packages: + - scheduler + - db + - openjdk-17 + - common + - changeloglockcleaner +packages: +- name: changeloglockcleaner + version: 81942e65f02ac92358ee1470cadd74270d931d18353f093c349519f70c0e0daa + fingerprint: 81942e65f02ac92358ee1470cadd74270d931d18353f093c349519f70c0e0daa + sha1: sha256:e2bf13079d34afbb230ec0eb88c72b91566c5ab4222b3cceb053941745db4626 + dependencies: + - golang-1-linux +- name: common + version: 9d7726aa454227e3087cd4a04425acae72d883a5bb19d314930ab58e83f04d0e + fingerprint: 9d7726aa454227e3087cd4a04425acae72d883a5bb19d314930ab58e83f04d0e + sha1: sha256:979ff40c6e44031bec55344aa4a522cac3d265ab23deaea0f7bc7541aa2b4124 + dependencies: [] +- name: db + version: 215b5a2432adc26c8df0ccbaabdd43d477f157b67a1c183860d2406d4a179f28 + fingerprint: 215b5a2432adc26c8df0ccbaabdd43d477f157b67a1c183860d2406d4a179f28 + sha1: sha256:bc90fec7ba4f497813d4de3d719b365d008b23f15e2384e4d069adcc0d1345d3 + dependencies: + - openjdk-17 +- name: eventgenerator + version: c4fd65c24e956df31a0d8ceabe50632da288c1b0a0ae2e898ca3626e8ee804ad + fingerprint: c4fd65c24e956df31a0d8ceabe50632da288c1b0a0ae2e898ca3626e8ee804ad + sha1: sha256:3409af4a9eeb31b345fef4f3d14a0bc4cdc347cc803d8c7105a12f086a68544f + dependencies: + - golang-1-linux +- name: golang-1-linux + version: 126fca7399cba5bc8c1b02e392441f1688daf1586d57d1b3614e314b893a6cc4 + fingerprint: 126fca7399cba5bc8c1b02e392441f1688daf1586d57d1b3614e314b893a6cc4 + sha1: sha256:70c3918c28cd74a0a9be561b5eac8b85e8e7de4a72bc66cd321288974937e0be + dependencies: [] +- name: golangapiserver + version: 421cbd1f220ade05a9f1b2c2c87b73ebf1b7a54f027410791cbf20093657556e + fingerprint: 421cbd1f220ade05a9f1b2c2c87b73ebf1b7a54f027410791cbf20093657556e + sha1: sha256:13f34ca11cd08d52c551905c93c848e05826f622e9fe5e0d3e90eed872abc41f + dependencies: + - golang-1-linux +- name: metricsforwarder + version: cf9db3934a2e988eacc7e99ba9840e153cc8ba5aa2f40fb1f289b6d80ce98327 + fingerprint: cf9db3934a2e988eacc7e99ba9840e153cc8ba5aa2f40fb1f289b6d80ce98327 + sha1: sha256:f536f8cf7ae9a3d70599ecc3b07ece82d19b36166adf7c8d21736d07ba7ac378 + dependencies: + - golang-1-linux +- name: metricsgateway + version: fe2fb17ee816b1b15106c38a308e7ebffa4961e9ffceb425de48f226a89c3832 + fingerprint: fe2fb17ee816b1b15106c38a308e7ebffa4961e9ffceb425de48f226a89c3832 + sha1: sha256:77d934bed7af4e22ff6b29b310a8b6330fd1882c803f6566517d5cb01e2b2964 + dependencies: + - golang-1-linux +- name: metricsserver + version: 3049b380b5f477830b021d4c6dec064ed24e4d201fb054536a09446e7211c0b1 + fingerprint: 3049b380b5f477830b021d4c6dec064ed24e4d201fb054536a09446e7211c0b1 + sha1: sha256:155ffcc0697cae622474d3a4136067b2613db922a98def86d1f3daff795a1c9a + dependencies: + - golang-1-linux +- name: openjdk-17 + version: be13f95495365f8879a75d9237320cd587774f6cbc087020bd6508fb8a82184a + fingerprint: be13f95495365f8879a75d9237320cd587774f6cbc087020bd6508fb8a82184a + sha1: sha256:99e2ef396973d7bbbfddffad6968b419627c20bb426117f8c3115cad5b206227 + dependencies: [] +- name: operator + version: 13f8ba9aa586b607bca958f263417b2a702082532868787bedfb2d5b4ea54ca3 + fingerprint: 13f8ba9aa586b607bca958f263417b2a702082532868787bedfb2d5b4ea54ca3 + sha1: sha256:80526139696238f0deebf61d8ce902f1523ad19e50fd3eb0a5899c9f637ae969 + dependencies: + - golang-1-linux +- name: scalingengine + version: a636487890b8bd44929dfdd6f8fa22b302b62c8849f0aac26197168594c50a86 + fingerprint: a636487890b8bd44929dfdd6f8fa22b302b62c8849f0aac26197168594c50a86 + sha1: sha256:20d99c316a934cdd77bb276f41928ca4de76b0820cbce59032f7bba5ae0d44ae + dependencies: + - golang-1-linux +- name: scheduler + version: 266a91165b8402333d2d4e3eb07fe00ae37f7b2a9c83c1c19502d390e66656db + fingerprint: 266a91165b8402333d2d4e3eb07fe00ae37f7b2a9c83c1c19502d390e66656db + sha1: sha256:d7b7e8aa80ac88eb5f151305099088231956e4bd827200aedd09bd79bf0297a5 + dependencies: + - openjdk-17 +license: + version: 15eb386a0db48f190d29bd28058f5d0d6605f5acde7c6cfc6f014d57747e41f9 + fingerprint: 15eb386a0db48f190d29bd28058f5d0d6605f5acde7c6cfc6f014d57747e41f9 + sha1: sha256:6c7a834097b96efc340787fbe5876c1e366de0235def5e2b93fa016c8655535c diff --git a/releases/app-autoscaler/index.yml b/releases/app-autoscaler/index.yml index 5fa5b29497..0789450902 100644 --- a/releases/app-autoscaler/index.yml +++ b/releases/app-autoscaler/index.yml @@ -65,6 +65,8 @@ builds: version: 5.2.11 997e296d-e0d3-4180-7f08-062e22a25240: version: 8.1.0 + 9a6bd550-f191-440d-7b7a-f84a89d96ca5: + version: 11.1.1 9d1ce139-0559-4ee9-6cc0-d81fe642aefa: version: 5.2.10 9e4309a3-cb70-47da-5382-64033cdfbdfb: @@ -75,6 +77,8 @@ builds: version: 3.7.7 b2231836-a048-42b2-4b41-d6a8f712e68b: version: 3.4.1 + b4370281-0b53-4e8b-749b-547d3dedbfbc: + version: 11.1.0 b56915e7-9fec-4e1b-5f22-f5d5f9ee84c6: version: 8.0.0 bae228ab-d77b-4dfc-4f8a-b1389163dec2: diff --git a/scripts/generate_test_certs.sh b/scripts/generate_test_certs.sh index d92db967d2..9397172a43 100755 --- a/scripts/generate_test_certs.sh +++ b/scripts/generate_test_certs.sh @@ -8,7 +8,7 @@ depot_path="${script_dir}/../test-certs" rm -rf "${depot_path}" mkdir -p "${depot_path}" -CERTSTRAP="go run github.com/square/certstrap@v1.2.0" +CERTSTRAP="go run github.com/square/certstrap@v1.3.0" # CA to distribute to autoscaler certs ${CERTSTRAP} --depot-path "${depot_path}" init --passphrase '' --common-name autoscalerCA --years "20" diff --git a/spec/Gemfile b/spec/Gemfile index 8eab49efd4..0d35c053cd 100644 --- a/spec/Gemfile +++ b/spec/Gemfile @@ -4,5 +4,5 @@ group :development, :test do gem "rspec" gem "rspec-its" gem "standard" - gem "rspec-file_fixtures", "0.1.7" + gem "rspec-file_fixtures", "0.1.8" end diff --git a/spec/Gemfile.lock b/spec/Gemfile.lock index c5145842bf..df957ec195 100644 --- a/spec/Gemfile.lock +++ b/spec/Gemfile.lock @@ -2,12 +2,13 @@ GEM remote: https://rubygems.org/ specs: ast (2.4.2) + base64 (0.1.1) bosh-template (2.4.0) semi_semantic (~> 1.2.0) diff-lcs (1.5.0) json (2.6.3) language_server-protocol (3.17.0.3) - lint_roller (1.0.0) + lint_roller (1.1.0) parallel (1.23.0) parser (3.2.2.3) ast (~> 2.4.1) @@ -15,7 +16,7 @@ GEM racc (1.7.1) rainbow (3.1.1) regexp_parser (2.8.1) - rexml (3.2.5) + rexml (3.2.6) rspec (3.12.0) rspec-core (~> 3.12.0) rspec-expectations (~> 3.12.0) @@ -25,44 +26,47 @@ GEM rspec-expectations (3.12.3) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.12.0) - rspec-file_fixtures (0.1.7) + rspec-file_fixtures (0.1.8) rspec (~> 3.12) rspec-its (1.3.0) rspec-core (>= 3.0.0) rspec-expectations (>= 3.0.0) - rspec-mocks (3.12.5) + rspec-mocks (3.12.6) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.12.0) rspec-support (3.12.1) - rubocop (1.52.1) + rubocop (1.56.4) + base64 (~> 0.1.1) json (~> 2.3) + language_server-protocol (>= 3.17.0) parallel (~> 1.10) parser (>= 3.2.2.3) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.28.0, < 2.0) + rubocop-ast (>= 1.28.1, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) rubocop-ast (1.29.0) parser (>= 3.2.1.0) - rubocop-performance (1.18.0) + rubocop-performance (1.19.1) rubocop (>= 1.7.0, < 2.0) rubocop-ast (>= 0.4.0) ruby-progressbar (1.13.0) semi_semantic (1.2.0) - standard (1.29.0) + standard (1.31.1) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.0) - rubocop (~> 1.52.0) + rubocop (~> 1.56.2) standard-custom (~> 1.0.0) - standard-performance (~> 1.1.0) - standard-custom (1.0.1) + standard-performance (~> 1.2) + standard-custom (1.0.2) lint_roller (~> 1.0) - standard-performance (1.1.0) - lint_roller (~> 1.0) - rubocop-performance (~> 1.18.0) - unicode-display_width (2.4.2) + rubocop (~> 1.50) + standard-performance (1.2.0) + lint_roller (~> 1.1) + rubocop-performance (~> 1.19.0) + unicode-display_width (2.5.0) PLATFORMS x86_64-darwin-21 @@ -71,7 +75,7 @@ PLATFORMS DEPENDENCIES bosh-template rspec - rspec-file_fixtures (= 0.1.7) + rspec-file_fixtures (= 0.1.8) rspec-its standard diff --git a/src/acceptance/Makefile b/src/acceptance/Makefile index 8b9fbb432a..16802fbe15 100644 --- a/src/acceptance/Makefile +++ b/src/acceptance/Makefile @@ -1,16 +1,49 @@ SHELL := /bin/bash -.SHELLFLAGS = -euo pipefail -c -MAKEFLAGS = -s +.SHELLFLAGS := -eu -o pipefail -c +MAKEFLAGS := -s + GO := GO111MODULE=on GO15VENDOREXPERIMENT=1 go GO_NOMOD := GO111MODULE=off go -GO_VERSION := $(shell $(GO) version | sed -e 's/^[^0-9.]*\([0-9.]*\).*/\1/') -GO_DEPENDENCIES := $(shell find . -type f -name '*.go') -PACKAGE_DIRS := $(shell $(GO) list ./... | grep -v /vendor/ | grep -v e2e) -CGO_ENABLED = 0 -BUILDTAGS := +GO_VERSION = $(shell go version | sed --expression='s/^[^0-9.]*\([0-9.]*\).*/\1/') +GO_DEPENDENCIES = $(shell find . -type f -name '*.go') +PACKAGE_DIRS = $(shell go list './...' | grep --invert-match --regexp='/vendor/' \ + | grep --invert-match --regexp='e2e') + +CGO_ENABLED := 0 +export GOWORK := off + +GINKGO_VERSION = v$(shell cat '../../.tool-versions' | grep --regexp='ginkgo' \ + | cut --delimiter=' ' --fields='2') +GOLANGCI_LINT_VERSION = v$(shell cat '../../.tool-versions' | grep --regexp='golangci-lint' \ + | cut --delimiter=' ' --fields='2' ) + + + +.PHONY: clean +clean: + rm --recursive --force './vendor' + + +.PHONY: go-mod-tidy +go-mod-tidy: + go mod tidy + + + +go-vendoring-folder := ./vendor +go-vendored-files = $(shell find '${go-vendoring-folder}' -type f -name '*.go' 2> '/dev/null') +## This does not work: go-vendored-files = $(wildcard ${go-vendoring-folder}/**/*.go) + +.PHONY: go-mod-vendor +go-mod-vendor: ${go-vendoring-folder} ${go-vendored-files} +${go-vendoring-folder} ${go-vendored-files} &: + go mod vendor + + -test_dirs=$(shell find . -name "*_test.go" -exec dirname {} \; | cut -d/ -f2 | sort | uniq) +test_dirs = $(shell find . -name "*_test.go" -exec dirname {} \; | cut --delimiter='/' --fields='2' \ + | sort | uniq) build_tests: $(addprefix build_test-,$(test_dirs)) build_test-%: @echo " - building '$*' tests" @@ -19,21 +52,21 @@ build_test-%: cd $* &&\ for package in $$( go list ./... | sed 's|.*/autoscaler/$*|.|' | awk '{ print length, $$0 }' | sort -n -r | cut -d" " -f2- );\ do\ - export test_file=$${build_folder}/$${package}.test;\ - echo " - compiling $${package} to $${test_file}";\ - go test -c -o $${test_file} $${package};\ + export test_file=$${build_folder}/$${package}.test;\ + echo " - compiling $${package} to $${test_file}";\ + go test -c -o $${test_file} $${package};\ done; check: lint build_tests test-unit: - ginkgo --race run helpers + go run github.com/onsi/ginkgo/v2/ginkgo@${GINKGO_VERSION} --race run helpers test: bin/test $(filter-out $@,$(MAKECMDGOALS)) lint: - @golangci-lint run + @go run github.com/golangci/golangci-lint/cmd/golangci-lint@${GOLANGCI_LINT_VERSION} run lint-fix: - golangci-lint run --fix + go run github.com/golangci/golangci-lint/cmd/golangci-lint@${GOLANGCI_LINT_VERSION} run --fix diff --git a/src/acceptance/assets/app/go_app/.gitignore b/src/acceptance/assets/app/go_app/.gitignore index 07ed7069a2..d0d3211870 100644 --- a/src/acceptance/assets/app/go_app/.gitignore +++ b/src/acceptance/assets/app/go_app/.gitignore @@ -1 +1,2 @@ -build/* \ No newline at end of file +build/* +internal/app/appfakes/* diff --git a/src/acceptance/assets/app/go_app/Makefile b/src/acceptance/assets/app/go_app/Makefile index 58bc779898..db492e23eb 100644 --- a/src/acceptance/assets/app/go_app/Makefile +++ b/src/acceptance/assets/app/go_app/Makefile @@ -1,61 +1,127 @@ +.ONESHELL: SHELL := /bin/bash .SHELLFLAGS := -eu -o pipefail -c ${SHELLFLAGS} -MAKEFLAGS= -GO_VERSION := $(shell go version | sed -e 's/^[^0-9.]*\([0-9.]*\).*/\1/') -GO_DEPENDENCIES := $(shell find . -type f -name '*.go') -PACKAGE_DIRS := $(shell go list ./... | grep -v /vendor/ | grep -v e2e) -CGO_ENABLED = 0 +aes_terminal_font_yellow := \e[38;2;255;255;0m +aes_terminal_reset := \e[0m + +# TODO: Do we need the next line? +MAKEFLAGS = + +GO_VERSION = $(shell go version | sed --expression='s/^[^0-9.]*\([0-9.]*\).*/\1/') +GO_DEPENDENCIES = $(shell find . -type f -name '*.go') +PACKAGE_DIRS = $(shell go list './...' | grep --invert-match --regexp='/vendor/' \ + | grep --invert-match --regexp='e2e') +CGO_ENABLED := 0 +export GOWORK := off + +binaries = $(shell find . -name "main.go" -exec dirname {} \; \ + | cut --delimiter='/' --fields='2' | sort | uniq) +test_dirs = $(shell find . -name "*_test.go" -exec dirname {} \; \ + | cut --delimiter='/' --fields='2' | sort | uniq) + +GINKGO_OPTS := -r --race --require-suite --randomize-all --cover ${OPTS} +export CONFIG ?= ../../../../acceptance_config.json + +GINKGO_VERSION = v$(shell cat ../../../../../.tool-versions | grep --regexp='ginkgo' | cut --delimiter=' ' --fields='2') +GOLANGCI_LINT_VERSION = v$(shell cat ../../../../../.tool-versions | grep --regexp='golangci-lint' | cut --delimiter=' ' --fields='2') + + + +openapi-spec-path := ../../../../../api +openapi-specs-list = $(wildcard ${openapi-spec-path}/*.openapi.yaml) + +# The presence of the subsequent directory indicates wheather the fakes still need to be generated +# or not. +app-fakes-dir := ./internal/app/appfakes +app-fakes-files = $(wildcard ${app-fakes-dir}/*.go) +go_deps_without_fakes = $(shell find . -type f -name '*.go' \ + | grep --invert-match --regexp='${app-fakes-dir}') + +.PHONY: generate-fakes +generate-fakes: ${app-fakes-dir} ${app-fakes-files} +${app-fakes-dir} ${app-fakes-files} &: ./go.mod ./go.sum ./internal/generate.go ${openapi-specs-list} + go generate ./... + + + +# This target should depend additionally on `${app-fakes-dir}` and on `${app-fakes-files}`. However +# this is not defined here. The reason is, that for `go-mod-tidy` the generated fakes need to be +# present but fortunately not necessarily up-to-date. This is fortunate because the generation of +# the fake requires the files `go.mod` and `go.sum` to be already tidied up, introducing a cyclic +# dependency otherwise. But that would make any modification to `go.mod` or `go.sum` +# impossible. This definition now makes it possible to update `go.mod` and `go.sum` as follows: +# 1. `make generate-fakes` +# 2. Update `go.mod` and/or `go.sum` +# 3. `make go-mod-tidy` +# 4. Optionally: `make generate-fakes` to update the fakes as well. +.PHONY: go-mod-tidy +go-mod-tidy: ./go.mod ./go.sum ${go_deps_without_fakes} + @echo -ne '${aes_terminal_font_yellow}' + @echo -e '⚠️ Warning: The client-fakes generated from the openapi-specification may be\n' \ + 'outdated. Please consider re-generating them, if this is relevant.' + @echo -ne '${aes_terminal_reset}' + go mod tidy -binaries=$(shell find . -name "main.go" -exec dirname {} \; | cut -d/ -f2 | sort | uniq) -test_dirs=$(shell find . -name "*_test.go" -exec dirname {} \; | cut -d/ -f2 | sort | uniq) -GINKGO_OPTS=-r --race --require-suite --randomize-all --cover ${OPTS} -export CONFIG?=../../../../acceptance_config.json .PHONY: build -build: - echo "# building test-app" - rm -rf build/* || true - mkdir -p build/ - CGO_ENABLED='${CGO_ENABLED}' GOOS='linux' GOARCH='amd64' go build -o build/app - cp app_manifest.yml build/manifest.yml +build: ./build/app ./build/manifest.yml +./build/app ./build/manifest.yml: ./go.mod ${app-fakes-dir} ${app-fakes-files} + echo '# building test-app' + mkdir -p build + CGO_ENABLED='${CGO_ENABLED}' GOOS='linux' GOARCH='amd64' go build -o './build/app' + cp './app_manifest.yml' './build/manifest.yml' + +.PHONY: build_tests build_tests: $(addprefix build_test-,$(test_dirs)) -build_test-%: +build_test-%: ${app-fakes-dir} ${app-fakes-files} @echo " - building '$*' tests" - @export build_folder=${PWD}/build/tests/$* &&\ - mkdir -p $${build_folder} &&\ - cd $* &&\ - for package in $$( go list ./... | sed 's|.*/autoscaler/$*|.|' | awk '{ print length, $$0 }' | sort -n -r | cut -d" " -f2- );\ - do\ - export test_file=$${build_folder}/$${package}.test;\ - echo " - compiling $${package} to $${test_file}";\ - go test -c -o $${test_file} $${package};\ - done; + @export build_folder='${PWD}/build/tests/$*' + @mkdir -p "$${build_folder}" + cd $* + for package in $$(go list './...' | sed 's|.*/autoscaler/$*|.|' | awk '{ print length, $$0 }' | \ + sort --numeric-sort --reverse | cut --delimiter=' ' --fields='2-') + do + export test_file="$${build_folder}/$${package}.test" + echo " - compiling $${package} to $${test_file}" + go test -c -o "$${test_file}" "$${package}" + done + +.PHONY: check lint lint-fix test check: lint build test -test: - @echo "Running tests" - ginkgo run ${GINKGO_OPTS} ./... -lint: - @cd ../../../../../; make lint_acceptance OPTS=${OPTS} +test: generate-fakes + @echo 'Running tests' + go run 'github.com/onsi/ginkgo/v2/ginkgo@${GINKGO_VERSION}' run ${GINKGO_OPTS} './...' + +lint: generate-fakes + @go run 'github.com/golangci/golangci-lint/cmd/golangci-lint@${GOLANGCI_LINT_VERSION}' run + +lint-fix: generate-fakes + go run 'github.com/golangci/golangci-lint/cmd/golangci-lint@${GOLANGCI_LINT_VERSION}' run --fix + + .PHONY: start start: build - docker run -it --name go_app -v $$PWD/build/:/cf/bin -p 8080:8080 --rm cloudfoundry/cflinuxfs4 /cf/bin/app + docker run --interactive --tty --name go_app --volume="$${PWD}/build/:/cf/bin" \ + --publish '8080:8080' --rm 'cloudfoundry/cflinuxfs4' '/cf/bin/app' + + .PHONY: deploy deploy: build ./deploy.sh -generate: go.mod ../../../../../api/custom-metrics-api.yaml - go generate ./... + .PHONY: clean clean: @echo "# cleaning autoscaler" @go clean -cache -testcache - @rm -rf build + @rm --force --recursive './build' + @rm --force --recursive './internal/app/appfakes' diff --git a/src/acceptance/assets/app/go_app/go.mod b/src/acceptance/assets/app/go_app/go.mod index a8aa2532f0..2cd8c600a3 100644 --- a/src/acceptance/assets/app/go_app/go.mod +++ b/src/acceptance/assets/app/go_app/go.mod @@ -8,24 +8,24 @@ require ( github.com/gin-contrib/zap v0.1.0 github.com/gin-gonic/gin v1.9.1 github.com/go-faster/errors v0.6.1 - github.com/go-faster/jx v1.0.0 + github.com/go-faster/jx v1.1.0 github.com/go-logr/logr v1.2.4 github.com/go-logr/zapr v1.2.4 github.com/json-iterator/go v1.1.12 - github.com/maxbrunsfeld/counterfeiter/v6 v6.6.2 + github.com/maxbrunsfeld/counterfeiter/v6 v6.7.0 github.com/mitchellh/mapstructure v1.5.0 - github.com/ogen-go/ogen v0.70.1 - github.com/onsi/ginkgo/v2 v2.11.0 - github.com/onsi/gomega v1.27.8 - github.com/prometheus/procfs v0.11.0 + github.com/ogen-go/ogen v0.73.0 + github.com/onsi/ginkgo/v2 v2.12.0 + github.com/onsi/gomega v1.27.10 + github.com/prometheus/procfs v0.11.1 github.com/steinfletcher/apitest v1.5.15 - go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin v0.42.0 - go.opentelemetry.io/contrib/propagators/b3 v1.17.0 - go.opentelemetry.io/otel v1.16.0 - go.opentelemetry.io/otel/metric v1.16.0 - go.opentelemetry.io/otel/trace v1.16.0 - go.uber.org/zap v1.24.0 - golang.org/x/exp v0.0.0-20230711023510-fffb14384f22 + go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin v0.43.0 + go.opentelemetry.io/contrib/propagators/b3 v1.18.0 + go.opentelemetry.io/otel v1.17.0 + go.opentelemetry.io/otel/metric v1.17.0 + go.opentelemetry.io/otel/trace v1.17.0 + go.uber.org/zap v1.25.0 + golang.org/x/exp v0.0.0-20230905200255-921286631fa9 ) require ( @@ -58,17 +58,16 @@ require ( github.com/segmentio/asm v1.2.0 // indirect github.com/twitchyliquid64/golang-asm v0.15.1 // indirect github.com/ugorji/go/codec v1.2.11 // indirect - go.uber.org/atomic v1.10.0 // indirect go.uber.org/multierr v1.11.0 // indirect golang.org/x/arch v0.3.0 // indirect - golang.org/x/crypto v0.10.0 // indirect - golang.org/x/mod v0.11.0 // indirect - golang.org/x/net v0.11.0 // indirect + golang.org/x/crypto v0.13.0 // indirect + golang.org/x/mod v0.12.0 // indirect + golang.org/x/net v0.15.0 // indirect golang.org/x/sync v0.3.0 // indirect - golang.org/x/sys v0.9.0 // indirect - golang.org/x/text v0.10.0 // indirect - golang.org/x/tools v0.10.0 // indirect - google.golang.org/protobuf v1.30.0 // indirect + golang.org/x/sys v0.12.0 // indirect + golang.org/x/text v0.13.0 // indirect + golang.org/x/tools v0.13.0 // indirect + google.golang.org/protobuf v1.31.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/src/acceptance/assets/app/go_app/go.sum b/src/acceptance/assets/app/go_app/go.sum index 9b9bb9c2a8..ab4c46ee48 100644 --- a/src/acceptance/assets/app/go_app/go.sum +++ b/src/acceptance/assets/app/go_app/go.sum @@ -32,8 +32,8 @@ github.com/gin-gonic/gin v1.9.1 h1:4idEAncQnU5cB7BeOkPtxjfCSye0AAm1R0RVIqJ+Jmg= github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SUcPTeU= github.com/go-faster/errors v0.6.1 h1:nNIPOBkprlKzkThvS/0YaX8Zs9KewLCOSFQS5BU06FI= github.com/go-faster/errors v0.6.1/go.mod h1:5MGV2/2T9yvlrbhe9pD9LO5Z/2zCSq2T8j+Jpi2LAyY= -github.com/go-faster/jx v1.0.0 h1:HE+ms2e6ZGkZ6u13t8u+onBinrPvIPI+0hWXGELm74g= -github.com/go-faster/jx v1.0.0/go.mod h1:zm8SlkwK+H0TYNKYtVJ/7cWFS7soJBQWhcPctKyYL/4= +github.com/go-faster/jx v1.1.0 h1:ZsW3wD+snOdmTDy9eIVgQdjUpXRRV4rqW8NS3t+20bg= +github.com/go-faster/jx v1.1.0/go.mod h1:vKDNikrKoyUmpzaJ0OkIkRQClNHFX/nF3dnTJZb3skg= github.com/go-faster/yaml v0.4.6 h1:lOK/EhI04gCpPgPhgt0bChS6bvw7G3WwI8xxVe0sw9I= github.com/go-faster/yaml v0.4.6/go.mod h1:390dRIvV4zbnO7qC9FGo6YYutc+wyyUSHBgbXL52eXk= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= @@ -99,8 +99,8 @@ github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27k github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= -github.com/maxbrunsfeld/counterfeiter/v6 v6.6.2 h1:CEy7VRV/Vbm7YLuZo3pGKa5GlPX4zzric6dEubIJTx0= -github.com/maxbrunsfeld/counterfeiter/v6 v6.6.2/go.mod h1:otjOyjeqm3LALYcmX2AQIGH0VlojDoSd8aGOzsHAnBc= +github.com/maxbrunsfeld/counterfeiter/v6 v6.7.0 h1:z0CfPybq3CxaJvrrpf7Gme1psZTqHhJxf83q6apkSpI= +github.com/maxbrunsfeld/counterfeiter/v6 v6.7.0/go.mod h1:RVP6/F85JyxTrbJxWIdKU2vlSvK48iCMnMXRkSz7xtg= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= @@ -109,27 +109,26 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/ogen-go/ogen v0.70.1 h1:XZ6lUu3mcKbLwZf7kPwd4FJY/qDKejjULoD0RXYTxT4= -github.com/ogen-go/ogen v0.70.1/go.mod h1:5cVMmV5102SE4RTWkcx8L+pzUEnY8CpAodLhi93y/Jw= +github.com/ogen-go/ogen v0.73.0 h1:h9HFV2V/h7UTKewlJpvOjx0gHIjjn4O9mjKe3eLNWkY= +github.com/ogen-go/ogen v0.73.0/go.mod h1:CS1RfTfLLcxw968GF2pEw8r6P6YTlU+mCOTGJvl7P2c= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.8.0 h1:VkHVNpR4iVnU8XQR6DBm8BqYjN7CRzw+xKUbVVbbW9w= github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo/v2 v2.11.0 h1:WgqUCUt/lT6yXoQ8Wef0fsNn5cAuMK7+KT9UFRz2tcU= -github.com/onsi/ginkgo/v2 v2.11.0/go.mod h1:ZhrRA5XmEE3x3rhlzamx/JJvujdZoJ2uvgI7kR0iZvM= +github.com/onsi/ginkgo/v2 v2.12.0 h1:UIVDowFPwpg6yMUpPjGkYvf06K3RAiJXUhCxEwQVHRI= +github.com/onsi/ginkgo/v2 v2.12.0/go.mod h1:ZNEzXISYlqpb8S36iN71ifqLi3vVD1rVJGvWRCJOUpQ= github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.27.8 h1:gegWiwZjBsf2DgiSbf5hpokZ98JVDMcWkUiigk6/KXc= -github.com/onsi/gomega v1.27.8/go.mod h1:2J8vzI/s+2shY9XHRApDkdgPo1TKT7P2u6fXeJKFnNQ= +github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= +github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M= github.com/pelletier/go-toml/v2 v2.0.1/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo= github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ= github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/procfs v0.11.0 h1:5EAgkfkMl659uZPbe9AS2N68a7Cc1TJbPEuGzFuRbyk= -github.com/prometheus/procfs v0.11.0/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= +github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= +github.com/prometheus/procfs v0.11.1/go.mod h1:eesXgaPo1q7lBpVMoMy0ZOFTth9hBn4W/y0/p/ScXhY= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= @@ -158,51 +157,50 @@ github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95 github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU= github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin v0.42.0 h1:l7AmwSVqozWKKXeZHycpdmpycQECRpoGwJ1FW2sWfTo= -go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin v0.42.0/go.mod h1:Ep4uoO2ijR0f49Pr7jAqyTjSCyS1SRL18wwttKfwqXA= -go.opentelemetry.io/contrib/propagators/b3 v1.17.0 h1:ImOVvHnku8jijXqkwCSyYKRDt2YrnGXD4BbhcpfbfJo= -go.opentelemetry.io/contrib/propagators/b3 v1.17.0/go.mod h1:IkfUfMpKWmynvvE0264trz0sf32NRTZL4nuAN9AbWRc= +go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin v0.43.0 h1:B8JzkALYp9VVR85AE7geXia+D4shAoUjaCEaBxn8NO8= +go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin v0.43.0/go.mod h1:b4/TD3x8cVgX8ZCRioLqE0jAw1918mq95Q6tSYyc+g4= +go.opentelemetry.io/contrib/propagators/b3 v1.18.0 h1:hhSlPVi9AQwOmbMmptPNLfRZOLgENdRM2kb7z9LFe1A= +go.opentelemetry.io/contrib/propagators/b3 v1.18.0/go.mod h1:qtt+pEu23D7UVP+j33G4i7LopmVu8/6/IwGu3hEm100= go.opentelemetry.io/otel v1.10.0/go.mod h1:NbvWjCthWHKBEUMpf0/v8ZRZlni86PpGFEMA9pnQSnQ= -go.opentelemetry.io/otel v1.16.0 h1:Z7GVAX/UkAXPKsy94IU+i6thsQS4nb7LviLpnaNeW8s= -go.opentelemetry.io/otel v1.16.0/go.mod h1:vl0h9NUa1D5s1nv3A5vZOYWn8av4K8Ml6JDeHrT/bx4= -go.opentelemetry.io/otel/metric v1.16.0 h1:RbrpwVG1Hfv85LgnZ7+txXioPDoh6EdbZHo26Q3hqOo= -go.opentelemetry.io/otel/metric v1.16.0/go.mod h1:QE47cpOmkwipPiefDwo2wDzwJrlfxxNYodqc4xnGCo4= +go.opentelemetry.io/otel v1.17.0 h1:MW+phZ6WZ5/uk2nd93ANk/6yJ+dVrvNWUjGhnnFU5jM= +go.opentelemetry.io/otel v1.17.0/go.mod h1:I2vmBGtFaODIVMBSTPVDlJSzBDNf93k60E6Ft0nyjo0= +go.opentelemetry.io/otel/metric v1.17.0 h1:iG6LGVz5Gh+IuO0jmgvpTB6YVrCGngi8QGm+pMd8Pdc= +go.opentelemetry.io/otel/metric v1.17.0/go.mod h1:h4skoxdZI17AxwITdmdZjjYJQH5nzijUUjm+wtPph5o= go.opentelemetry.io/otel/trace v1.10.0/go.mod h1:Sij3YYczqAdz+EhmGhE6TpTxUO5/F/AzrK+kxfGqySM= -go.opentelemetry.io/otel/trace v1.16.0 h1:8JRpaObFoW0pxuVPapkgH8UhHQj+bJW8jJsCZEu5MQs= -go.opentelemetry.io/otel/trace v1.16.0/go.mod h1:Yt9vYq1SdNz3xdjZZK7wcXv1qv2pwLkqr2QVwea0ef0= +go.opentelemetry.io/otel/trace v1.17.0 h1:/SWhSRHmDPOImIAetP1QAeMnZYiQXrTy4fMMYOdSKWQ= +go.opentelemetry.io/otel/trace v1.17.0/go.mod h1:I/4vKTgFclIsXRVucpH25X0mpFSczM7aHeaz0ZBLWjY= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= -go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/zap v1.23.0/go.mod h1:D+nX8jyLsMHMYrln8A0rJjFt/T/9/bGgIhAqxv5URuY= -go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60= go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= +go.uber.org/zap v1.25.0 h1:4Hvk6GtkucQ790dqmj7l1eEnRdKm3k3ZUrUMS2d5+5c= +go.uber.org/zap v1.25.0/go.mod h1:JIAUzQIH94IC4fOJQm7gMmBJP5k7wQfdcnYdPoEXJYk= golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= golang.org/x/arch v0.3.0 h1:02VY4/ZcO/gBOH6PUaoiptASxtXU10jazRCP865E97k= golang.org/x/arch v0.3.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.10.0 h1:LKqV2xt9+kDzSTfOhx4FrkEBcMrAgHSYgzywV9zcGmM= -golang.org/x/crypto v0.10.0/go.mod h1:o4eNf7Ede1fv+hwOwZsTHl9EsPFO6q6ZvYR8vYfY45I= -golang.org/x/exp v0.0.0-20230711023510-fffb14384f22 h1:FqrVOBQxQ8r/UwwXibI0KMolVhvFiGobSfdE33deHJM= -golang.org/x/exp v0.0.0-20230711023510-fffb14384f22/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= +golang.org/x/crypto v0.13.0 h1:mvySKfSWJ+UKUii46M40LOvyWfN0s2U+46/jDd0e6Ck= +golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= +golang.org/x/exp v0.0.0-20230905200255-921286631fa9 h1:GoHiUyI/Tp2nVkLI2mCxVkOjsbSXD66ic0XW0js0R9g= +golang.org/x/exp v0.0.0-20230905200255-921286631fa9/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.11.0 h1:bUO06HqtnRcc/7l71XBe4WcqTZ+3AH1J59zWDDwLKgU= -golang.org/x/mod v0.11.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= +golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.11.0 h1:Gi2tvZIJyBtO9SDr1q9h5hEQCp/4L2RQ+ar0qjx2oNU= -golang.org/x/net v0.11.0/go.mod h1:2L/ixqYpgIVXmeoSA/4Lu7BzTG4KIyPIryS4IsOd1oQ= +golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8= +golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -220,20 +218,20 @@ golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.9.0 h1:KS/R3tvhPqvJvwcKfnBHJwwthS11LRhmM5D59eEXa0s= -golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= +golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.10.0 h1:UpjohKhiEgNc0CSauXmwYftY1+LlaC75SJwh0SgCX58= -golang.org/x/text v0.10.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.10.0 h1:tvDr/iQoUqNdohiYm0LmmKcBk+q86lb9EprIUFhHHGg= -golang.org/x/tools v0.10.0/go.mod h1:UJwyiVBsOA2uwvK/e5OY3GTpDUJriEd+/YlqAwLPmyM= +golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ= +golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -241,8 +239,8 @@ golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8T google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= -google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= +google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= diff --git a/src/acceptance/assets/app/go_app/internal/app/app_test.go b/src/acceptance/assets/app/go_app/internal/app/app_test.go index 41d4a4104e..df720ce4ca 100644 --- a/src/acceptance/assets/app/go_app/internal/app/app_test.go +++ b/src/acceptance/assets/app/go_app/internal/app/app_test.go @@ -49,6 +49,7 @@ var _ = Describe("Ginkgo/Server", func() { var port int BeforeEach(func() { logger := zaptest.LoggerWriter(GinkgoWriter) + /* #nosec G102 -- CF apps run in a container */ l, err := net.Listen("tcp", ":0") Expect(err).ToNot(HaveOccurred()) port = l.Addr().(*net.TCPAddr).Port diff --git a/src/acceptance/assets/app/go_app/internal/app/appfakes/fake_cpuwaster.go b/src/acceptance/assets/app/go_app/internal/app/appfakes/fake_cpuwaster.go deleted file mode 100644 index 0a4a51c732..0000000000 --- a/src/acceptance/assets/app/go_app/internal/app/appfakes/fake_cpuwaster.go +++ /dev/null @@ -1,174 +0,0 @@ -// Code generated by counterfeiter. DO NOT EDIT. -package appfakes - -import ( - "sync" - "time" - - "code.cloudfoundry.org/app-autoscaler-release/src/acceptance/assets/app/go_app/internal/app" -) - -type FakeCPUWaster struct { - IsRunningStub func() bool - isRunningMutex sync.RWMutex - isRunningArgsForCall []struct { - } - isRunningReturns struct { - result1 bool - } - isRunningReturnsOnCall map[int]struct { - result1 bool - } - StopTestStub func() - stopTestMutex sync.RWMutex - stopTestArgsForCall []struct { - } - UseCPUStub func(uint64, time.Duration) - useCPUMutex sync.RWMutex - useCPUArgsForCall []struct { - arg1 uint64 - arg2 time.Duration - } - invocations map[string][][]interface{} - invocationsMutex sync.RWMutex -} - -func (fake *FakeCPUWaster) IsRunning() bool { - fake.isRunningMutex.Lock() - ret, specificReturn := fake.isRunningReturnsOnCall[len(fake.isRunningArgsForCall)] - fake.isRunningArgsForCall = append(fake.isRunningArgsForCall, struct { - }{}) - stub := fake.IsRunningStub - fakeReturns := fake.isRunningReturns - fake.recordInvocation("IsRunning", []interface{}{}) - fake.isRunningMutex.Unlock() - if stub != nil { - return stub() - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeCPUWaster) IsRunningCallCount() int { - fake.isRunningMutex.RLock() - defer fake.isRunningMutex.RUnlock() - return len(fake.isRunningArgsForCall) -} - -func (fake *FakeCPUWaster) IsRunningCalls(stub func() bool) { - fake.isRunningMutex.Lock() - defer fake.isRunningMutex.Unlock() - fake.IsRunningStub = stub -} - -func (fake *FakeCPUWaster) IsRunningReturns(result1 bool) { - fake.isRunningMutex.Lock() - defer fake.isRunningMutex.Unlock() - fake.IsRunningStub = nil - fake.isRunningReturns = struct { - result1 bool - }{result1} -} - -func (fake *FakeCPUWaster) IsRunningReturnsOnCall(i int, result1 bool) { - fake.isRunningMutex.Lock() - defer fake.isRunningMutex.Unlock() - fake.IsRunningStub = nil - if fake.isRunningReturnsOnCall == nil { - fake.isRunningReturnsOnCall = make(map[int]struct { - result1 bool - }) - } - fake.isRunningReturnsOnCall[i] = struct { - result1 bool - }{result1} -} - -func (fake *FakeCPUWaster) StopTest() { - fake.stopTestMutex.Lock() - fake.stopTestArgsForCall = append(fake.stopTestArgsForCall, struct { - }{}) - stub := fake.StopTestStub - fake.recordInvocation("StopTest", []interface{}{}) - fake.stopTestMutex.Unlock() - if stub != nil { - fake.StopTestStub() - } -} - -func (fake *FakeCPUWaster) StopTestCallCount() int { - fake.stopTestMutex.RLock() - defer fake.stopTestMutex.RUnlock() - return len(fake.stopTestArgsForCall) -} - -func (fake *FakeCPUWaster) StopTestCalls(stub func()) { - fake.stopTestMutex.Lock() - defer fake.stopTestMutex.Unlock() - fake.StopTestStub = stub -} - -func (fake *FakeCPUWaster) UseCPU(arg1 uint64, arg2 time.Duration) { - fake.useCPUMutex.Lock() - fake.useCPUArgsForCall = append(fake.useCPUArgsForCall, struct { - arg1 uint64 - arg2 time.Duration - }{arg1, arg2}) - stub := fake.UseCPUStub - fake.recordInvocation("UseCPU", []interface{}{arg1, arg2}) - fake.useCPUMutex.Unlock() - if stub != nil { - fake.UseCPUStub(arg1, arg2) - } -} - -func (fake *FakeCPUWaster) UseCPUCallCount() int { - fake.useCPUMutex.RLock() - defer fake.useCPUMutex.RUnlock() - return len(fake.useCPUArgsForCall) -} - -func (fake *FakeCPUWaster) UseCPUCalls(stub func(uint64, time.Duration)) { - fake.useCPUMutex.Lock() - defer fake.useCPUMutex.Unlock() - fake.UseCPUStub = stub -} - -func (fake *FakeCPUWaster) UseCPUArgsForCall(i int) (uint64, time.Duration) { - fake.useCPUMutex.RLock() - defer fake.useCPUMutex.RUnlock() - argsForCall := fake.useCPUArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2 -} - -func (fake *FakeCPUWaster) Invocations() map[string][][]interface{} { - fake.invocationsMutex.RLock() - defer fake.invocationsMutex.RUnlock() - fake.isRunningMutex.RLock() - defer fake.isRunningMutex.RUnlock() - fake.stopTestMutex.RLock() - defer fake.stopTestMutex.RUnlock() - fake.useCPUMutex.RLock() - defer fake.useCPUMutex.RUnlock() - copiedInvocations := map[string][][]interface{}{} - for key, value := range fake.invocations { - copiedInvocations[key] = value - } - return copiedInvocations -} - -func (fake *FakeCPUWaster) recordInvocation(key string, args []interface{}) { - fake.invocationsMutex.Lock() - defer fake.invocationsMutex.Unlock() - if fake.invocations == nil { - fake.invocations = map[string][][]interface{}{} - } - if fake.invocations[key] == nil { - fake.invocations[key] = [][]interface{}{} - } - fake.invocations[key] = append(fake.invocations[key], args) -} - -var _ app.CPUWaster = new(FakeCPUWaster) diff --git a/src/acceptance/assets/app/go_app/internal/app/appfakes/fake_custom_metric_client.go b/src/acceptance/assets/app/go_app/internal/app/appfakes/fake_custom_metric_client.go deleted file mode 100644 index 3ecd7aa456..0000000000 --- a/src/acceptance/assets/app/go_app/internal/app/appfakes/fake_custom_metric_client.go +++ /dev/null @@ -1,121 +0,0 @@ -// Code generated by counterfeiter. DO NOT EDIT. -package appfakes - -import ( - "context" - "sync" - - "code.cloudfoundry.org/app-autoscaler-release/src/acceptance/assets/app/go_app/internal/app" - cfenv "github.com/cloudfoundry-community/go-cfenv" -) - -type FakeCustomMetricClient struct { - PostCustomMetricStub func(context.Context, *cfenv.App, float64, string, bool) error - postCustomMetricMutex sync.RWMutex - postCustomMetricArgsForCall []struct { - arg1 context.Context - arg2 *cfenv.App - arg3 float64 - arg4 string - arg5 bool - } - postCustomMetricReturns struct { - result1 error - } - postCustomMetricReturnsOnCall map[int]struct { - result1 error - } - invocations map[string][][]interface{} - invocationsMutex sync.RWMutex -} - -func (fake *FakeCustomMetricClient) PostCustomMetric(arg1 context.Context, arg2 *cfenv.App, arg3 float64, arg4 string, arg5 bool) error { - fake.postCustomMetricMutex.Lock() - ret, specificReturn := fake.postCustomMetricReturnsOnCall[len(fake.postCustomMetricArgsForCall)] - fake.postCustomMetricArgsForCall = append(fake.postCustomMetricArgsForCall, struct { - arg1 context.Context - arg2 *cfenv.App - arg3 float64 - arg4 string - arg5 bool - }{arg1, arg2, arg3, arg4, arg5}) - stub := fake.PostCustomMetricStub - fakeReturns := fake.postCustomMetricReturns - fake.recordInvocation("PostCustomMetric", []interface{}{arg1, arg2, arg3, arg4, arg5}) - fake.postCustomMetricMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3, arg4, arg5) - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeCustomMetricClient) PostCustomMetricCallCount() int { - fake.postCustomMetricMutex.RLock() - defer fake.postCustomMetricMutex.RUnlock() - return len(fake.postCustomMetricArgsForCall) -} - -func (fake *FakeCustomMetricClient) PostCustomMetricCalls(stub func(context.Context, *cfenv.App, float64, string, bool) error) { - fake.postCustomMetricMutex.Lock() - defer fake.postCustomMetricMutex.Unlock() - fake.PostCustomMetricStub = stub -} - -func (fake *FakeCustomMetricClient) PostCustomMetricArgsForCall(i int) (context.Context, *cfenv.App, float64, string, bool) { - fake.postCustomMetricMutex.RLock() - defer fake.postCustomMetricMutex.RUnlock() - argsForCall := fake.postCustomMetricArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3, argsForCall.arg4, argsForCall.arg5 -} - -func (fake *FakeCustomMetricClient) PostCustomMetricReturns(result1 error) { - fake.postCustomMetricMutex.Lock() - defer fake.postCustomMetricMutex.Unlock() - fake.PostCustomMetricStub = nil - fake.postCustomMetricReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeCustomMetricClient) PostCustomMetricReturnsOnCall(i int, result1 error) { - fake.postCustomMetricMutex.Lock() - defer fake.postCustomMetricMutex.Unlock() - fake.PostCustomMetricStub = nil - if fake.postCustomMetricReturnsOnCall == nil { - fake.postCustomMetricReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.postCustomMetricReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakeCustomMetricClient) Invocations() map[string][][]interface{} { - fake.invocationsMutex.RLock() - defer fake.invocationsMutex.RUnlock() - fake.postCustomMetricMutex.RLock() - defer fake.postCustomMetricMutex.RUnlock() - copiedInvocations := map[string][][]interface{}{} - for key, value := range fake.invocations { - copiedInvocations[key] = value - } - return copiedInvocations -} - -func (fake *FakeCustomMetricClient) recordInvocation(key string, args []interface{}) { - fake.invocationsMutex.Lock() - defer fake.invocationsMutex.Unlock() - if fake.invocations == nil { - fake.invocations = map[string][][]interface{}{} - } - if fake.invocations[key] == nil { - fake.invocations[key] = [][]interface{}{} - } - fake.invocations[key] = append(fake.invocations[key], args) -} - -var _ app.CustomMetricClient = new(FakeCustomMetricClient) diff --git a/src/acceptance/assets/app/go_app/internal/app/appfakes/fake_memory_gobbler.go b/src/acceptance/assets/app/go_app/internal/app/appfakes/fake_memory_gobbler.go deleted file mode 100644 index d487cc8df2..0000000000 --- a/src/acceptance/assets/app/go_app/internal/app/appfakes/fake_memory_gobbler.go +++ /dev/null @@ -1,211 +0,0 @@ -// Code generated by counterfeiter. DO NOT EDIT. -package appfakes - -import ( - "sync" - "time" - - "code.cloudfoundry.org/app-autoscaler-release/src/acceptance/assets/app/go_app/internal/app" -) - -type FakeMemoryGobbler struct { - IsRunningStub func() bool - isRunningMutex sync.RWMutex - isRunningArgsForCall []struct { - } - isRunningReturns struct { - result1 bool - } - isRunningReturnsOnCall map[int]struct { - result1 bool - } - SleepStub func(time.Duration) - sleepMutex sync.RWMutex - sleepArgsForCall []struct { - arg1 time.Duration - } - StopTestStub func() - stopTestMutex sync.RWMutex - stopTestArgsForCall []struct { - } - UseMemoryStub func(uint64) - useMemoryMutex sync.RWMutex - useMemoryArgsForCall []struct { - arg1 uint64 - } - invocations map[string][][]interface{} - invocationsMutex sync.RWMutex -} - -func (fake *FakeMemoryGobbler) IsRunning() bool { - fake.isRunningMutex.Lock() - ret, specificReturn := fake.isRunningReturnsOnCall[len(fake.isRunningArgsForCall)] - fake.isRunningArgsForCall = append(fake.isRunningArgsForCall, struct { - }{}) - stub := fake.IsRunningStub - fakeReturns := fake.isRunningReturns - fake.recordInvocation("IsRunning", []interface{}{}) - fake.isRunningMutex.Unlock() - if stub != nil { - return stub() - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeMemoryGobbler) IsRunningCallCount() int { - fake.isRunningMutex.RLock() - defer fake.isRunningMutex.RUnlock() - return len(fake.isRunningArgsForCall) -} - -func (fake *FakeMemoryGobbler) IsRunningCalls(stub func() bool) { - fake.isRunningMutex.Lock() - defer fake.isRunningMutex.Unlock() - fake.IsRunningStub = stub -} - -func (fake *FakeMemoryGobbler) IsRunningReturns(result1 bool) { - fake.isRunningMutex.Lock() - defer fake.isRunningMutex.Unlock() - fake.IsRunningStub = nil - fake.isRunningReturns = struct { - result1 bool - }{result1} -} - -func (fake *FakeMemoryGobbler) IsRunningReturnsOnCall(i int, result1 bool) { - fake.isRunningMutex.Lock() - defer fake.isRunningMutex.Unlock() - fake.IsRunningStub = nil - if fake.isRunningReturnsOnCall == nil { - fake.isRunningReturnsOnCall = make(map[int]struct { - result1 bool - }) - } - fake.isRunningReturnsOnCall[i] = struct { - result1 bool - }{result1} -} - -func (fake *FakeMemoryGobbler) Sleep(arg1 time.Duration) { - fake.sleepMutex.Lock() - fake.sleepArgsForCall = append(fake.sleepArgsForCall, struct { - arg1 time.Duration - }{arg1}) - stub := fake.SleepStub - fake.recordInvocation("Sleep", []interface{}{arg1}) - fake.sleepMutex.Unlock() - if stub != nil { - fake.SleepStub(arg1) - } -} - -func (fake *FakeMemoryGobbler) SleepCallCount() int { - fake.sleepMutex.RLock() - defer fake.sleepMutex.RUnlock() - return len(fake.sleepArgsForCall) -} - -func (fake *FakeMemoryGobbler) SleepCalls(stub func(time.Duration)) { - fake.sleepMutex.Lock() - defer fake.sleepMutex.Unlock() - fake.SleepStub = stub -} - -func (fake *FakeMemoryGobbler) SleepArgsForCall(i int) time.Duration { - fake.sleepMutex.RLock() - defer fake.sleepMutex.RUnlock() - argsForCall := fake.sleepArgsForCall[i] - return argsForCall.arg1 -} - -func (fake *FakeMemoryGobbler) StopTest() { - fake.stopTestMutex.Lock() - fake.stopTestArgsForCall = append(fake.stopTestArgsForCall, struct { - }{}) - stub := fake.StopTestStub - fake.recordInvocation("StopTest", []interface{}{}) - fake.stopTestMutex.Unlock() - if stub != nil { - fake.StopTestStub() - } -} - -func (fake *FakeMemoryGobbler) StopTestCallCount() int { - fake.stopTestMutex.RLock() - defer fake.stopTestMutex.RUnlock() - return len(fake.stopTestArgsForCall) -} - -func (fake *FakeMemoryGobbler) StopTestCalls(stub func()) { - fake.stopTestMutex.Lock() - defer fake.stopTestMutex.Unlock() - fake.StopTestStub = stub -} - -func (fake *FakeMemoryGobbler) UseMemory(arg1 uint64) { - fake.useMemoryMutex.Lock() - fake.useMemoryArgsForCall = append(fake.useMemoryArgsForCall, struct { - arg1 uint64 - }{arg1}) - stub := fake.UseMemoryStub - fake.recordInvocation("UseMemory", []interface{}{arg1}) - fake.useMemoryMutex.Unlock() - if stub != nil { - fake.UseMemoryStub(arg1) - } -} - -func (fake *FakeMemoryGobbler) UseMemoryCallCount() int { - fake.useMemoryMutex.RLock() - defer fake.useMemoryMutex.RUnlock() - return len(fake.useMemoryArgsForCall) -} - -func (fake *FakeMemoryGobbler) UseMemoryCalls(stub func(uint64)) { - fake.useMemoryMutex.Lock() - defer fake.useMemoryMutex.Unlock() - fake.UseMemoryStub = stub -} - -func (fake *FakeMemoryGobbler) UseMemoryArgsForCall(i int) uint64 { - fake.useMemoryMutex.RLock() - defer fake.useMemoryMutex.RUnlock() - argsForCall := fake.useMemoryArgsForCall[i] - return argsForCall.arg1 -} - -func (fake *FakeMemoryGobbler) Invocations() map[string][][]interface{} { - fake.invocationsMutex.RLock() - defer fake.invocationsMutex.RUnlock() - fake.isRunningMutex.RLock() - defer fake.isRunningMutex.RUnlock() - fake.sleepMutex.RLock() - defer fake.sleepMutex.RUnlock() - fake.stopTestMutex.RLock() - defer fake.stopTestMutex.RUnlock() - fake.useMemoryMutex.RLock() - defer fake.useMemoryMutex.RUnlock() - copiedInvocations := map[string][][]interface{}{} - for key, value := range fake.invocations { - copiedInvocations[key] = value - } - return copiedInvocations -} - -func (fake *FakeMemoryGobbler) recordInvocation(key string, args []interface{}) { - fake.invocationsMutex.Lock() - defer fake.invocationsMutex.Unlock() - if fake.invocations == nil { - fake.invocations = map[string][][]interface{}{} - } - if fake.invocations[key] == nil { - fake.invocations[key] = [][]interface{}{} - } - fake.invocations[key] = append(fake.invocations[key], args) -} - -var _ app.MemoryGobbler = new(FakeMemoryGobbler) diff --git a/src/acceptance/assets/app/go_app/internal/app/appfakes/fake_time_waster.go b/src/acceptance/assets/app/go_app/internal/app/appfakes/fake_time_waster.go deleted file mode 100644 index b5d2849bd4..0000000000 --- a/src/acceptance/assets/app/go_app/internal/app/appfakes/fake_time_waster.go +++ /dev/null @@ -1,77 +0,0 @@ -// Code generated by counterfeiter. DO NOT EDIT. -package appfakes - -import ( - "sync" - "time" - - "code.cloudfoundry.org/app-autoscaler-release/src/acceptance/assets/app/go_app/internal/app" -) - -type FakeTimeWaster struct { - SleepStub func(time.Duration) - sleepMutex sync.RWMutex - sleepArgsForCall []struct { - arg1 time.Duration - } - invocations map[string][][]interface{} - invocationsMutex sync.RWMutex -} - -func (fake *FakeTimeWaster) Sleep(arg1 time.Duration) { - fake.sleepMutex.Lock() - fake.sleepArgsForCall = append(fake.sleepArgsForCall, struct { - arg1 time.Duration - }{arg1}) - stub := fake.SleepStub - fake.recordInvocation("Sleep", []interface{}{arg1}) - fake.sleepMutex.Unlock() - if stub != nil { - fake.SleepStub(arg1) - } -} - -func (fake *FakeTimeWaster) SleepCallCount() int { - fake.sleepMutex.RLock() - defer fake.sleepMutex.RUnlock() - return len(fake.sleepArgsForCall) -} - -func (fake *FakeTimeWaster) SleepCalls(stub func(time.Duration)) { - fake.sleepMutex.Lock() - defer fake.sleepMutex.Unlock() - fake.SleepStub = stub -} - -func (fake *FakeTimeWaster) SleepArgsForCall(i int) time.Duration { - fake.sleepMutex.RLock() - defer fake.sleepMutex.RUnlock() - argsForCall := fake.sleepArgsForCall[i] - return argsForCall.arg1 -} - -func (fake *FakeTimeWaster) Invocations() map[string][][]interface{} { - fake.invocationsMutex.RLock() - defer fake.invocationsMutex.RUnlock() - fake.sleepMutex.RLock() - defer fake.sleepMutex.RUnlock() - copiedInvocations := map[string][][]interface{}{} - for key, value := range fake.invocations { - copiedInvocations[key] = value - } - return copiedInvocations -} - -func (fake *FakeTimeWaster) recordInvocation(key string, args []interface{}) { - fake.invocationsMutex.Lock() - defer fake.invocationsMutex.Unlock() - if fake.invocations == nil { - fake.invocations = map[string][][]interface{}{} - } - if fake.invocations[key] == nil { - fake.invocations[key] = [][]interface{}{} - } - fake.invocations[key] = append(fake.invocations[key], args) -} - -var _ app.TimeWaster = new(FakeTimeWaster) diff --git a/src/acceptance/assets/app/go_app/internal/app/cpu.go b/src/acceptance/assets/app/go_app/internal/app/cpu.go index 2ef442b37f..0de5f6d565 100644 --- a/src/acceptance/assets/app/go_app/internal/app/cpu.go +++ b/src/acceptance/assets/app/go_app/internal/app/cpu.go @@ -27,7 +27,6 @@ type ConcurrentBusyLoopCPUWaster struct { var _ CPUWaster = &ConcurrentBusyLoopCPUWaster{} func CPUTests(logger logr.Logger, r *gin.RouterGroup, cpuTest CPUWaster) *gin.RouterGroup { - r.GET("/:utilization/:minutes", func(c *gin.Context) { if cpuTest.IsRunning() { Error(c, http.StatusConflict, "CPU test is already running") @@ -79,7 +78,7 @@ func (m *ConcurrentBusyLoopCPUWaster) UseCPU(utilisation uint64, duration time.D runtime.LockOSThread() for m.IsRunning() { begin := time.Now() - for time.Now().Sub(begin) < run { + for time.Since(begin) < run { // burn cpu time } time.Sleep(sleep) diff --git a/src/acceptance/assets/app/go_app/internal/app/custom_metrics.go b/src/acceptance/assets/app/go_app/internal/app/custom_metrics.go index 13804a8e17..406cf7be06 100644 --- a/src/acceptance/assets/app/go_app/internal/app/custom_metrics.go +++ b/src/acceptance/assets/app/go_app/internal/app/custom_metrics.go @@ -27,7 +27,6 @@ type CustomMetricAPIClient struct{} var _ CustomMetricClient = &CustomMetricAPIClient{} func CustomMetricsTests(logger logr.Logger, r *gin.RouterGroup, customMetricTest CustomMetricClient) *gin.RouterGroup { - r.GET("/mtls/:name/:value", handleCustomMetricsEndpoint(customMetricTest, true)) r.GET("/:name/:value", handleCustomMetricsEndpoint(customMetricTest, false)) @@ -59,17 +58,16 @@ func handleCustomMetricsEndpoint(customMetricTest CustomMetricClient, useMtls bo } } -func (_ *CustomMetricAPIClient) PostCustomMetric(ctx context.Context, appConfig *cfenv.App, metricValue float64, metricName string, useMtls bool) error { +func (*CustomMetricAPIClient) PostCustomMetric(ctx context.Context, appConfig *cfenv.App, metricValue float64, metricName string, useMtls bool) error { var err error if appConfig == nil { appConfig, err = cfenv.Current() if err != nil { return fmt.Errorf("cloud foundry environment not found %w", err) - } } - appId := appConfig.AppID + appId := api.GUID(appConfig.AppID) autoscalerCredentials, err := getAutoscalerCredentials(appConfig) if err != nil { return err @@ -94,7 +92,7 @@ func (_ *CustomMetricAPIClient) PostCustomMetric(ctx context.Context, appConfig return err } - apiClient, err := api.NewClient(autoscalerApiServerURL, api.WithClient(client)) + apiClient, err := api.NewClient(autoscalerApiServerURL, autoscalerCredentials, api.WithClient(client)) if err != nil { return err } @@ -166,6 +164,7 @@ func getCFInstanceIdentityCertificateClient() (*http.Client, error) { caCertPool := x509.NewCertPool() caCertPool.AppendCertsFromPEM(caCertBytes) + /* #nosec G402 -- test app that shall run on dev foundations without proper certs */ tlsConfig := &tls.Config{ Certificates: []tls.Certificate{cert}, InsecureSkipVerify: true, diff --git a/src/acceptance/assets/app/go_app/internal/app/memory.go b/src/acceptance/assets/app/go_app/internal/app/memory.go index 6aabb2fd20..a4ec9c2915 100644 --- a/src/acceptance/assets/app/go_app/internal/app/memory.go +++ b/src/acceptance/assets/app/go_app/internal/app/memory.go @@ -39,7 +39,6 @@ type ListBasedMemoryGobbler struct { var _ MemoryGobbler = &ListBasedMemoryGobbler{} func MemoryTests(logger logr.Logger, r *gin.RouterGroup, memoryTest MemoryGobbler) *gin.RouterGroup { - r.GET("/:memoryMiB/:minutes", func(c *gin.Context) { if memoryTest.IsRunning() { Error(c, http.StatusConflict, "memory test is already running") diff --git a/src/acceptance/assets/app/go_app/internal/app/memory_test.go b/src/acceptance/assets/app/go_app/internal/app/memory_test.go index 07fd958965..53e037510b 100644 --- a/src/acceptance/assets/app/go_app/internal/app/memory_test.go +++ b/src/acceptance/assets/app/go_app/internal/app/memory_test.go @@ -76,13 +76,13 @@ var _ = Describe("Memory tests", func() { newMem := getTotalMemoryUsage("during memTest info test") msg := - ` + ` If this test fails, please consider to rewrite internal/app/memory.go.UseMemory() to make use of syscalls directly (e.g. “malloc”) to make sure of not having issues due to the go-runtime. ` GinkgoWriter.Printf(msg) - Expect(newMem - oldMem).To(BeNumerically(">=", allocInMebi - slack)) + Expect(newMem - oldMem).To(BeNumerically(">=", allocInMebi-slack)) By("and releasing it after the test ends") memInfo.StopTest() @@ -90,7 +90,7 @@ var _ = Describe("Memory tests", func() { slack = getMemorySlack() - Eventually(getTotalMemoryUsage).WithArguments("after memTest info test").Should(BeNumerically("<=", newMem - allocInMebi + slack)) + Eventually(getTotalMemoryUsage).WithArguments("after memTest info test").Should(BeNumerically("<=", newMem-allocInMebi+slack)) }) }) }) @@ -106,7 +106,7 @@ func getTotalMemoryUsage(action string) uint64 { result := stat.VmRSS + stat.VmSwap - GinkgoWriter.Printf("total memory usage %s: %d MiB\n", action, result / app.Mebi) + GinkgoWriter.Printf("total memory usage %s: %d MiB\n", action, result/app.Mebi) return result } @@ -123,7 +123,7 @@ func getMemorySlack() uint64 { slack := ms.HeapInuse - ms.HeapAlloc - GinkgoWriter.Printf("slack: %d MiB\n", slack / app.Mebi) + GinkgoWriter.Printf("slack: %d MiB\n", slack/app.Mebi) return slack } diff --git a/src/acceptance/assets/app/go_app/internal/app/responsetime.go b/src/acceptance/assets/app/go_app/internal/app/responsetime.go index 42fe204b2f..b42a87c12b 100644 --- a/src/acceptance/assets/app/go_app/internal/app/responsetime.go +++ b/src/acceptance/assets/app/go_app/internal/app/responsetime.go @@ -37,6 +37,6 @@ func ResponseTimeTests(logger logr.Logger, r *gin.RouterGroup, timeWaster TimeWa return r } -func (_ Sleeper) Sleep(sleepTime time.Duration) { +func (Sleeper) Sleep(sleepTime time.Duration) { time.Sleep(sleepTime) } diff --git a/src/acceptance/assets/app/go_app/internal/app/responsetime_test.go b/src/acceptance/assets/app/go_app/internal/app/responsetime_test.go index bf8057a3c6..bf0f00d076 100644 --- a/src/acceptance/assets/app/go_app/internal/app/responsetime_test.go +++ b/src/acceptance/assets/app/go_app/internal/app/responsetime_test.go @@ -1,10 +1,11 @@ package app_test import ( - "code.cloudfoundry.org/app-autoscaler-release/src/acceptance/assets/app/go_app/internal/app/appfakes" "net/http" "time" + "code.cloudfoundry.org/app-autoscaler-release/src/acceptance/assets/app/go_app/internal/app/appfakes" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/src/acceptance/assets/app/go_app/internal/custommetrics/api_credentials.go b/src/acceptance/assets/app/go_app/internal/custommetrics/api_credentials.go index 40fcf9a7b7..9bedb337d0 100644 --- a/src/acceptance/assets/app/go_app/internal/custommetrics/api_credentials.go +++ b/src/acceptance/assets/app/go_app/internal/custommetrics/api_credentials.go @@ -1,8 +1,19 @@ package api +import "context" + type CustomMetricsCredentials struct { Username string `mapstructure:"username" json:"username"` Password string `mapstructure:"password" json:"password"` URL string `mapstructure:"url" json:"url"` MtlsURL string `mapstructure:"mtls_url" json:"mtls_url"` } + +func (c CustomMetricsCredentials) BasicAuthentication(ctx context.Context, operationName string) (BasicAuthentication, error) { + credentials := BasicAuthentication{ + Username: c.Username, + Password: c.Password, + } + + return credentials, nil +} diff --git a/src/acceptance/assets/app/go_app/internal/custommetrics/basic_auth_transport.go b/src/acceptance/assets/app/go_app/internal/custommetrics/basic_auth_transport.go index 7f1c0a5c47..c49ea764cc 100644 --- a/src/acceptance/assets/app/go_app/internal/custommetrics/basic_auth_transport.go +++ b/src/acceptance/assets/app/go_app/internal/custommetrics/basic_auth_transport.go @@ -25,6 +25,7 @@ func (bat *BasicAuthTransport) Client() *http.Client { } func NewBasicAuthTransport(credentials CustomMetricsCredentials) *BasicAuthTransport { + /* #nosec G402 -- test app that shall run on dev foundations without proper certs */ tr := &http.Transport{ TLSClientConfig: &tls.Config{InsecureSkipVerify: true}, } diff --git a/src/acceptance/assets/app/go_app/internal/custommetrics/oas_cfg_gen.go b/src/acceptance/assets/app/go_app/internal/custommetrics/oas_cfg_gen.go deleted file mode 100644 index a5b6d9e2cc..0000000000 --- a/src/acceptance/assets/app/go_app/internal/custommetrics/oas_cfg_gen.go +++ /dev/null @@ -1,135 +0,0 @@ -// Code generated by ogen, DO NOT EDIT. - -package api - -import ( - "net/http" - - "go.opentelemetry.io/otel" - "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/trace" - - ht "github.com/ogen-go/ogen/http" - "github.com/ogen-go/ogen/otelogen" -) - -var ( - // Allocate option closure once. - clientSpanKind = trace.WithSpanKind(trace.SpanKindClient) -) - -type ( - optionFunc[C any] func(*C) - otelOptionFunc func(*otelConfig) -) - -type otelConfig struct { - TracerProvider trace.TracerProvider - Tracer trace.Tracer - MeterProvider metric.MeterProvider - Meter metric.Meter -} - -func (cfg *otelConfig) initOTEL() { - if cfg.TracerProvider == nil { - cfg.TracerProvider = otel.GetTracerProvider() - } - if cfg.MeterProvider == nil { - cfg.MeterProvider = otel.GetMeterProvider() - } - cfg.Tracer = cfg.TracerProvider.Tracer(otelogen.Name, - trace.WithInstrumentationVersion(otelogen.SemVersion()), - ) - cfg.Meter = cfg.MeterProvider.Meter(otelogen.Name) -} - -type clientConfig struct { - otelConfig - Client ht.Client -} - -// ClientOption is client config option. -type ClientOption interface { - applyClient(*clientConfig) -} - -var _ = []ClientOption{ - (optionFunc[clientConfig])(nil), - (otelOptionFunc)(nil), -} - -func (o optionFunc[C]) applyClient(c *C) { - o(c) -} - -func (o otelOptionFunc) applyClient(c *clientConfig) { - o(&c.otelConfig) -} - -func newClientConfig(opts ...ClientOption) clientConfig { - cfg := clientConfig{ - Client: http.DefaultClient, - } - for _, opt := range opts { - opt.applyClient(&cfg) - } - cfg.initOTEL() - return cfg -} - -type baseClient struct { - cfg clientConfig - requests metric.Int64Counter - errors metric.Int64Counter - duration metric.Int64Histogram -} - -func (cfg clientConfig) baseClient() (c baseClient, err error) { - c = baseClient{cfg: cfg} - if c.requests, err = c.cfg.Meter.Int64Counter(otelogen.ClientRequestCount); err != nil { - return c, err - } - if c.errors, err = c.cfg.Meter.Int64Counter(otelogen.ClientErrorsCount); err != nil { - return c, err - } - if c.duration, err = c.cfg.Meter.Int64Histogram(otelogen.ClientDuration); err != nil { - return c, err - } - return c, nil -} - -// Option is config option. -type Option interface { - ClientOption -} - -// WithTracerProvider specifies a tracer provider to use for creating a tracer. -// -// If none is specified, the global provider is used. -func WithTracerProvider(provider trace.TracerProvider) Option { - return otelOptionFunc(func(cfg *otelConfig) { - if provider != nil { - cfg.TracerProvider = provider - } - }) -} - -// WithMeterProvider specifies a meter provider to use for creating a meter. -// -// If none is specified, the global.MeterProvider() is used. -func WithMeterProvider(provider metric.MeterProvider) Option { - return otelOptionFunc(func(cfg *otelConfig) { - if provider != nil { - cfg.MeterProvider = provider - } - }) -} - -// WithClient specifies http client to use. -func WithClient(client ht.Client) ClientOption { - return optionFunc[clientConfig](func(cfg *clientConfig) { - if client != nil { - cfg.Client = client - } - }) -} diff --git a/src/acceptance/assets/app/go_app/internal/custommetrics/oas_client_gen.go b/src/acceptance/assets/app/go_app/internal/custommetrics/oas_client_gen.go deleted file mode 100644 index 4a26d7502d..0000000000 --- a/src/acceptance/assets/app/go_app/internal/custommetrics/oas_client_gen.go +++ /dev/null @@ -1,163 +0,0 @@ -// Code generated by ogen, DO NOT EDIT. - -package api - -import ( - "context" - "net/url" - "strings" - "time" - - "github.com/go-faster/errors" - "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/codes" - "go.opentelemetry.io/otel/metric" - - "github.com/ogen-go/ogen/conv" - ht "github.com/ogen-go/ogen/http" - "github.com/ogen-go/ogen/uri" -) - -// Client implements OAS client. -type Client struct { - serverURL *url.URL - baseClient -} - -func trimTrailingSlashes(u *url.URL) { - u.Path = strings.TrimRight(u.Path, "/") - u.RawPath = strings.TrimRight(u.RawPath, "/") -} - -// NewClient initializes new Client defined by OAS. -func NewClient(serverURL string, opts ...ClientOption) (*Client, error) { - u, err := url.Parse(serverURL) - if err != nil { - return nil, err - } - trimTrailingSlashes(u) - - c, err := newClientConfig(opts...).baseClient() - if err != nil { - return nil, err - } - return &Client{ - serverURL: u, - baseClient: c, - }, nil -} - -type serverURLKey struct{} - -// WithServerURL sets context key to override server URL. -func WithServerURL(ctx context.Context, u *url.URL) context.Context { - return context.WithValue(ctx, serverURLKey{}, u) -} - -func (c *Client) requestURL(ctx context.Context) *url.URL { - u, ok := ctx.Value(serverURLKey{}).(*url.URL) - if !ok { - return c.serverURL - } - return u -} - -// V1AppsAppGuidMetricsPost invokes POST /v1/apps/{appGuid}/metrics operation. -// -// Use to submit custom metrics to app-autoscaler which are defined and used in a dynamic scaling -// policy to enable automatic scaling based on application-specific metrics. We recommend submitting -// the custom metrics every 40 seconds from every application instance. -// -// POST /v1/apps/{appGuid}/metrics -func (c *Client) V1AppsAppGuidMetricsPost(ctx context.Context, request *Metrics, params V1AppsAppGuidMetricsPostParams) error { - res, err := c.sendV1AppsAppGuidMetricsPost(ctx, request, params) - _ = res - return err -} - -func (c *Client) sendV1AppsAppGuidMetricsPost(ctx context.Context, request *Metrics, params V1AppsAppGuidMetricsPostParams) (res *V1AppsAppGuidMetricsPostOK, err error) { - var otelAttrs []attribute.KeyValue - // Validate request before sending. - if err := func() error { - if err := request.Validate(); err != nil { - return err - } - return nil - }(); err != nil { - return res, errors.Wrap(err, "validate") - } - - // Run stopwatch. - startTime := time.Now() - defer func() { - elapsedDuration := time.Since(startTime) - c.duration.Record(ctx, elapsedDuration.Microseconds(), metric.WithAttributes(otelAttrs...)) - }() - - // Increment request counter. - c.requests.Add(ctx, 1, metric.WithAttributes(otelAttrs...)) - - // Start a span for this request. - ctx, span := c.cfg.Tracer.Start(ctx, "V1AppsAppGuidMetricsPost", - clientSpanKind, - ) - // Track stage for error reporting. - var stage string - defer func() { - if err != nil { - span.RecordError(err) - span.SetStatus(codes.Error, stage) - c.errors.Add(ctx, 1, metric.WithAttributes(otelAttrs...)) - } - span.End() - }() - - stage = "BuildURL" - u := uri.Clone(c.requestURL(ctx)) - var pathParts [3]string - pathParts[0] = "/v1/apps/" - { - // Encode "appGuid" parameter. - e := uri.NewPathEncoder(uri.PathEncoderConfig{ - Param: "appGuid", - Style: uri.PathStyleSimple, - Explode: false, - }) - if err := func() error { - return e.EncodeValue(conv.StringToString(params.AppGuid)) - }(); err != nil { - return res, errors.Wrap(err, "encode path") - } - encoded, err := e.Result() - if err != nil { - return res, errors.Wrap(err, "encode path") - } - pathParts[1] = encoded - } - pathParts[2] = "/metrics" - uri.AddPathParts(u, pathParts[:]...) - - stage = "EncodeRequest" - r, err := ht.NewRequest(ctx, "POST", u) - if err != nil { - return res, errors.Wrap(err, "create request") - } - if err := encodeV1AppsAppGuidMetricsPostRequest(request, r); err != nil { - return res, errors.Wrap(err, "encode request") - } - - stage = "SendRequest" - resp, err := c.cfg.Client.Do(r) - if err != nil { - return res, errors.Wrap(err, "do request") - } - defer resp.Body.Close() - - stage = "DecodeResponse" - result, err := decodeV1AppsAppGuidMetricsPostResponse(resp) - if err != nil { - return res, errors.Wrap(err, "decode response") - } - - return result, nil -} diff --git a/src/acceptance/assets/app/go_app/internal/custommetrics/oas_json_gen.go b/src/acceptance/assets/app/go_app/internal/custommetrics/oas_json_gen.go deleted file mode 100644 index fc186762cd..0000000000 --- a/src/acceptance/assets/app/go_app/internal/custommetrics/oas_json_gen.go +++ /dev/null @@ -1,381 +0,0 @@ -// Code generated by ogen, DO NOT EDIT. - -package api - -import ( - "math/bits" - "strconv" - - "github.com/go-faster/errors" - "github.com/go-faster/jx" - - "github.com/ogen-go/ogen/validate" -) - -// Encode implements json.Marshaler. -func (s *ErrorResponse) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *ErrorResponse) encodeFields(e *jx.Encoder) { - { - if s.Code.Set { - e.FieldStart("code") - s.Code.Encode(e) - } - } - { - if s.Message.Set { - e.FieldStart("message") - s.Message.Encode(e) - } - } -} - -var jsonFieldsNameOfErrorResponse = [2]string{ - 0: "code", - 1: "message", -} - -// Decode decodes ErrorResponse from json. -func (s *ErrorResponse) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode ErrorResponse to nil") - } - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "code": - if err := func() error { - s.Code.Reset() - if err := s.Code.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"code\"") - } - case "message": - if err := func() error { - s.Message.Reset() - if err := s.Message.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"message\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode ErrorResponse") - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *ErrorResponse) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *ErrorResponse) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *Metric) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *Metric) encodeFields(e *jx.Encoder) { - { - e.FieldStart("name") - e.Str(s.Name) - } - { - e.FieldStart("value") - e.Float64(s.Value) - } - { - if s.Unit.Set { - e.FieldStart("unit") - s.Unit.Encode(e) - } - } -} - -var jsonFieldsNameOfMetric = [3]string{ - 0: "name", - 1: "value", - 2: "unit", -} - -// Decode decodes Metric from json. -func (s *Metric) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode Metric to nil") - } - var requiredBitSet [1]uint8 - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "name": - requiredBitSet[0] |= 1 << 0 - if err := func() error { - v, err := d.Str() - s.Name = string(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"name\"") - } - case "value": - requiredBitSet[0] |= 1 << 1 - if err := func() error { - v, err := d.Float64() - s.Value = float64(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"value\"") - } - case "unit": - if err := func() error { - s.Unit.Reset() - if err := s.Unit.Decode(d); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"unit\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode Metric") - } - // Validate required fields. - var failures []validate.FieldError - for i, mask := range [1]uint8{ - 0b00000011, - } { - if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { - // Mask only required fields and check equality to mask using XOR. - // - // If XOR result is not zero, result is not equal to expected, so some fields are missed. - // Bits of fields which would be set are actually bits of missed fields. - missed := bits.OnesCount8(result) - for bitN := 0; bitN < missed; bitN++ { - bitIdx := bits.TrailingZeros8(result) - fieldIdx := i*8 + bitIdx - var name string - if fieldIdx < len(jsonFieldsNameOfMetric) { - name = jsonFieldsNameOfMetric[fieldIdx] - } else { - name = strconv.Itoa(fieldIdx) - } - failures = append(failures, validate.FieldError{ - Name: name, - Error: validate.ErrFieldRequired, - }) - // Reset bit. - result &^= 1 << bitIdx - } - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *Metric) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *Metric) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode implements json.Marshaler. -func (s *Metrics) Encode(e *jx.Encoder) { - e.ObjStart() - s.encodeFields(e) - e.ObjEnd() -} - -// encodeFields encodes fields. -func (s *Metrics) encodeFields(e *jx.Encoder) { - { - e.FieldStart("instance_index") - e.Int64(s.InstanceIndex) - } - { - e.FieldStart("metrics") - e.ArrStart() - for _, elem := range s.Metrics { - elem.Encode(e) - } - e.ArrEnd() - } -} - -var jsonFieldsNameOfMetrics = [2]string{ - 0: "instance_index", - 1: "metrics", -} - -// Decode decodes Metrics from json. -func (s *Metrics) Decode(d *jx.Decoder) error { - if s == nil { - return errors.New("invalid: unable to decode Metrics to nil") - } - var requiredBitSet [1]uint8 - - if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { - switch string(k) { - case "instance_index": - requiredBitSet[0] |= 1 << 0 - if err := func() error { - v, err := d.Int64() - s.InstanceIndex = int64(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"instance_index\"") - } - case "metrics": - requiredBitSet[0] |= 1 << 1 - if err := func() error { - s.Metrics = make([]Metric, 0) - if err := d.Arr(func(d *jx.Decoder) error { - var elem Metric - if err := elem.Decode(d); err != nil { - return err - } - s.Metrics = append(s.Metrics, elem) - return nil - }); err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"metrics\"") - } - default: - return d.Skip() - } - return nil - }); err != nil { - return errors.Wrap(err, "decode Metrics") - } - // Validate required fields. - var failures []validate.FieldError - for i, mask := range [1]uint8{ - 0b00000011, - } { - if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { - // Mask only required fields and check equality to mask using XOR. - // - // If XOR result is not zero, result is not equal to expected, so some fields are missed. - // Bits of fields which would be set are actually bits of missed fields. - missed := bits.OnesCount8(result) - for bitN := 0; bitN < missed; bitN++ { - bitIdx := bits.TrailingZeros8(result) - fieldIdx := i*8 + bitIdx - var name string - if fieldIdx < len(jsonFieldsNameOfMetrics) { - name = jsonFieldsNameOfMetrics[fieldIdx] - } else { - name = strconv.Itoa(fieldIdx) - } - failures = append(failures, validate.FieldError{ - Name: name, - Error: validate.ErrFieldRequired, - }) - // Reset bit. - result &^= 1 << bitIdx - } - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s *Metrics) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *Metrics) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} - -// Encode encodes string as json. -func (o OptString) Encode(e *jx.Encoder) { - if !o.Set { - return - } - e.Str(string(o.Value)) -} - -// Decode decodes string from json. -func (o *OptString) Decode(d *jx.Decoder) error { - if o == nil { - return errors.New("invalid: unable to decode OptString to nil") - } - o.Set = true - v, err := d.Str() - if err != nil { - return err - } - o.Value = string(v) - return nil -} - -// MarshalJSON implements stdjson.Marshaler. -func (s OptString) MarshalJSON() ([]byte, error) { - e := jx.Encoder{} - s.Encode(&e) - return e.Bytes(), nil -} - -// UnmarshalJSON implements stdjson.Unmarshaler. -func (s *OptString) UnmarshalJSON(data []byte) error { - d := jx.DecodeBytes(data) - return s.Decode(d) -} diff --git a/src/acceptance/assets/app/go_app/internal/custommetrics/oas_parameters_gen.go b/src/acceptance/assets/app/go_app/internal/custommetrics/oas_parameters_gen.go deleted file mode 100644 index 92313d0d1b..0000000000 --- a/src/acceptance/assets/app/go_app/internal/custommetrics/oas_parameters_gen.go +++ /dev/null @@ -1,10 +0,0 @@ -// Code generated by ogen, DO NOT EDIT. - -package api - -// V1AppsAppGuidMetricsPostParams is parameters of POST /v1/apps/{appGuid}/metrics operation. -type V1AppsAppGuidMetricsPostParams struct { - // The GUID identifying the application the custom metrics are submitted for. Can be found in the - // `application_id` property of the JSON object stored in the `VCAP_APPLICATION` environment variable. - AppGuid string -} diff --git a/src/acceptance/assets/app/go_app/internal/custommetrics/oas_request_encoders_gen.go b/src/acceptance/assets/app/go_app/internal/custommetrics/oas_request_encoders_gen.go deleted file mode 100644 index b745d9e709..0000000000 --- a/src/acceptance/assets/app/go_app/internal/custommetrics/oas_request_encoders_gen.go +++ /dev/null @@ -1,26 +0,0 @@ -// Code generated by ogen, DO NOT EDIT. - -package api - -import ( - "bytes" - "net/http" - - "github.com/go-faster/jx" - - ht "github.com/ogen-go/ogen/http" -) - -func encodeV1AppsAppGuidMetricsPostRequest( - req *Metrics, - r *http.Request, -) error { - const contentType = "application/json" - e := jx.GetEncoder() - { - req.Encode(e) - } - encoded := e.Bytes() - ht.SetBody(r, bytes.NewReader(encoded), contentType) - return nil -} diff --git a/src/acceptance/assets/app/go_app/internal/custommetrics/oas_response_decoders_gen.go b/src/acceptance/assets/app/go_app/internal/custommetrics/oas_response_decoders_gen.go deleted file mode 100644 index 01f99f7ad1..0000000000 --- a/src/acceptance/assets/app/go_app/internal/custommetrics/oas_response_decoders_gen.go +++ /dev/null @@ -1,66 +0,0 @@ -// Code generated by ogen, DO NOT EDIT. - -package api - -import ( - "io" - "mime" - "net/http" - - "github.com/go-faster/errors" - "github.com/go-faster/jx" - - "github.com/ogen-go/ogen/ogenerrors" - "github.com/ogen-go/ogen/validate" -) - -func decodeV1AppsAppGuidMetricsPostResponse(resp *http.Response) (res *V1AppsAppGuidMetricsPostOK, _ error) { - switch resp.StatusCode { - case 200: - // Code 200. - return &V1AppsAppGuidMetricsPostOK{}, nil - } - // Convenient error response. - defRes, err := func() (res *ErrorResponseStatusCode, err error) { - ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) - if err != nil { - return res, errors.Wrap(err, "parse media type") - } - switch { - case ct == "application/json": - buf, err := io.ReadAll(resp.Body) - if err != nil { - return res, err - } - d := jx.DecodeBytes(buf) - - var response ErrorResponse - if err := func() error { - if err := response.Decode(d); err != nil { - return err - } - if err := d.Skip(); err != io.EOF { - return errors.New("unexpected trailing data") - } - return nil - }(); err != nil { - err = &ogenerrors.DecodeBodyError{ - ContentType: ct, - Body: buf, - Err: err, - } - return res, err - } - return &ErrorResponseStatusCode{ - StatusCode: resp.StatusCode, - Response: response, - }, nil - default: - return res, validate.InvalidContentType(ct) - } - }() - if err != nil { - return res, errors.Wrapf(err, "default (code %d)", resp.StatusCode) - } - return res, errors.Wrap(defRes, "error") -} diff --git a/src/acceptance/assets/app/go_app/internal/custommetrics/oas_schemas_gen.go b/src/acceptance/assets/app/go_app/internal/custommetrics/oas_schemas_gen.go deleted file mode 100644 index f632fe48ed..0000000000 --- a/src/acceptance/assets/app/go_app/internal/custommetrics/oas_schemas_gen.go +++ /dev/null @@ -1,184 +0,0 @@ -// Code generated by ogen, DO NOT EDIT. - -package api - -import ( - "fmt" -) - -func (s *ErrorResponseStatusCode) Error() string { - return fmt.Sprintf("code %d: %+v", s.StatusCode, s.Response) -} - -// Ref: #/components/schemas/ErrorResponse -type ErrorResponse struct { - // The textual error code. - Code OptString `json:"code"` - // The message describing the cause of the error. - Message OptString `json:"message"` -} - -// GetCode returns the value of Code. -func (s *ErrorResponse) GetCode() OptString { - return s.Code -} - -// GetMessage returns the value of Message. -func (s *ErrorResponse) GetMessage() OptString { - return s.Message -} - -// SetCode sets the value of Code. -func (s *ErrorResponse) SetCode(val OptString) { - s.Code = val -} - -// SetMessage sets the value of Message. -func (s *ErrorResponse) SetMessage(val OptString) { - s.Message = val -} - -// ErrorResponseStatusCode wraps ErrorResponse with StatusCode. -type ErrorResponseStatusCode struct { - StatusCode int - Response ErrorResponse -} - -// GetStatusCode returns the value of StatusCode. -func (s *ErrorResponseStatusCode) GetStatusCode() int { - return s.StatusCode -} - -// GetResponse returns the value of Response. -func (s *ErrorResponseStatusCode) GetResponse() ErrorResponse { - return s.Response -} - -// SetStatusCode sets the value of StatusCode. -func (s *ErrorResponseStatusCode) SetStatusCode(val int) { - s.StatusCode = val -} - -// SetResponse sets the value of Response. -func (s *ErrorResponseStatusCode) SetResponse(val ErrorResponse) { - s.Response = val -} - -// Ref: #/components/schemas/Metric -type Metric struct { - // The name of the custom metric, must have been defined by using it in the scaling policy for the - // application before submitting. - Name string `json:"name"` - // The value of the custom metric. - Value float64 `json:"value"` - // An optional unit for the metric, for display purposes only. - Unit OptString `json:"unit"` -} - -// GetName returns the value of Name. -func (s *Metric) GetName() string { - return s.Name -} - -// GetValue returns the value of Value. -func (s *Metric) GetValue() float64 { - return s.Value -} - -// GetUnit returns the value of Unit. -func (s *Metric) GetUnit() OptString { - return s.Unit -} - -// SetName sets the value of Name. -func (s *Metric) SetName(val string) { - s.Name = val -} - -// SetValue sets the value of Value. -func (s *Metric) SetValue(val float64) { - s.Value = val -} - -// SetUnit sets the value of Unit. -func (s *Metric) SetUnit(val OptString) { - s.Unit = val -} - -// Ref: #/components/schemas/Metrics -type Metrics struct { - // The index of the application instance the custom metrics are submitted for. Can be found in the - // `CF_INSTANCE_INDEX` environment variable. - InstanceIndex int64 `json:"instance_index"` - // The custom metrics to be submitted. - Metrics []Metric `json:"metrics"` -} - -// GetInstanceIndex returns the value of InstanceIndex. -func (s *Metrics) GetInstanceIndex() int64 { - return s.InstanceIndex -} - -// GetMetrics returns the value of Metrics. -func (s *Metrics) GetMetrics() []Metric { - return s.Metrics -} - -// SetInstanceIndex sets the value of InstanceIndex. -func (s *Metrics) SetInstanceIndex(val int64) { - s.InstanceIndex = val -} - -// SetMetrics sets the value of Metrics. -func (s *Metrics) SetMetrics(val []Metric) { - s.Metrics = val -} - -// NewOptString returns new OptString with value set to v. -func NewOptString(v string) OptString { - return OptString{ - Value: v, - Set: true, - } -} - -// OptString is optional string. -type OptString struct { - Value string - Set bool -} - -// IsSet returns true if OptString was set. -func (o OptString) IsSet() bool { return o.Set } - -// Reset unsets value. -func (o *OptString) Reset() { - var v string - o.Value = v - o.Set = false -} - -// SetTo sets value to v. -func (o *OptString) SetTo(v string) { - o.Set = true - o.Value = v -} - -// Get returns value and boolean that denotes whether value was set. -func (o OptString) Get() (v string, ok bool) { - if !o.Set { - return v, false - } - return o.Value, true -} - -// Or returns value if set, or given parameter if does not. -func (o OptString) Or(d string) string { - if v, ok := o.Get(); ok { - return v - } - return d -} - -// V1AppsAppGuidMetricsPostOK is response for V1AppsAppGuidMetricsPost operation. -type V1AppsAppGuidMetricsPostOK struct{} diff --git a/src/acceptance/assets/app/go_app/internal/custommetrics/oas_validators_gen.go b/src/acceptance/assets/app/go_app/internal/custommetrics/oas_validators_gen.go deleted file mode 100644 index a1adb4b77b..0000000000 --- a/src/acceptance/assets/app/go_app/internal/custommetrics/oas_validators_gen.go +++ /dev/null @@ -1,65 +0,0 @@ -// Code generated by ogen, DO NOT EDIT. - -package api - -import ( - "fmt" - - "github.com/go-faster/errors" - - "github.com/ogen-go/ogen/validate" -) - -func (s *Metric) Validate() error { - var failures []validate.FieldError - if err := func() error { - if err := (validate.Float{}).Validate(float64(s.Value)); err != nil { - return errors.Wrap(err, "float") - } - return nil - }(); err != nil { - failures = append(failures, validate.FieldError{ - Name: "value", - Error: err, - }) - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - return nil -} -func (s *Metrics) Validate() error { - var failures []validate.FieldError - if err := func() error { - if s.Metrics == nil { - return errors.New("nil is invalid value") - } - var failures []validate.FieldError - for i, elem := range s.Metrics { - if err := func() error { - if err := elem.Validate(); err != nil { - return err - } - return nil - }(); err != nil { - failures = append(failures, validate.FieldError{ - Name: fmt.Sprintf("[%d]", i), - Error: err, - }) - } - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - return nil - }(); err != nil { - failures = append(failures, validate.FieldError{ - Name: "metrics", - Error: err, - }) - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - return nil -} diff --git a/src/acceptance/assets/app/go_app/internal/generate.go b/src/acceptance/assets/app/go_app/internal/generate.go index c017fa7b4b..0e92d5202b 100644 --- a/src/acceptance/assets/app/go_app/internal/generate.go +++ b/src/acceptance/assets/app/go_app/internal/generate.go @@ -1,3 +1,6 @@ package internal -//go:generate go run github.com/ogen-go/ogen/cmd/ogen --no-server --debug.ignoreNotImplemented "mutualTLS security" --target custommetrics --clean ../../../../../../api/custom-metrics-api.yaml +//go:generate go run github.com/ogen-go/ogen/cmd/ogen --no-server --allow-remote --target applicationmetric --clean ../../../../../../api/application-metric-api.openapi.yaml +//go:generate go run github.com/ogen-go/ogen/cmd/ogen --no-server --allow-remote --debug.ignoreNotImplemented "mutualTLS security" --target custommetrics --clean ../../../../../../api/custom-metrics-api.openapi.yaml +//go:generate go run github.com/ogen-go/ogen/cmd/ogen --no-server --allow-remote --target policy --clean ../../../../../../api/policy-api.openapi.yaml +//go:generate go run github.com/ogen-go/ogen/cmd/ogen --no-server --allow-remote --target scalinghistory --clean ../../../../../../api/scaling-history-api.openapi.yaml diff --git a/src/acceptance/assets/app/go_app/tools/tools.go b/src/acceptance/assets/app/go_app/tools/tools.go index e86fd7753b..26944e2dc3 100644 --- a/src/acceptance/assets/app/go_app/tools/tools.go +++ b/src/acceptance/assets/app/go_app/tools/tools.go @@ -1,4 +1,4 @@ -// +build tools +//go:build tools package tools @@ -7,6 +7,5 @@ import ( _ "github.com/ogen-go/ogen" ) -// This file imports packages that are used when running go generate, or used -// during the development process but not otherwise depended on by built code. - +// This file imports packages that are used when running go generate, +// but not otherwise depended on by built code. diff --git a/src/acceptance/go.mod b/src/acceptance/go.mod index c55684af06..53f7de1fd2 100644 --- a/src/acceptance/go.mod +++ b/src/acceptance/go.mod @@ -3,9 +3,9 @@ module acceptance go 1.20 require ( - github.com/cloudfoundry/cf-test-helpers/v2 v2.5.0 - github.com/onsi/ginkgo/v2 v2.11.0 - github.com/onsi/gomega v1.27.8 + github.com/cloudfoundry/cf-test-helpers/v2 v2.7.0 + github.com/onsi/ginkgo/v2 v2.12.1 + github.com/onsi/gomega v1.28.0 github.com/stretchr/testify v1.8.4 ) @@ -18,10 +18,10 @@ require ( github.com/kr/pretty v0.3.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/rogpeppe/go-internal v1.8.0 // indirect - golang.org/x/net v0.10.0 // indirect - golang.org/x/sys v0.9.0 // indirect - golang.org/x/text v0.9.0 // indirect - golang.org/x/tools v0.9.3 // indirect + golang.org/x/net v0.14.0 // indirect + golang.org/x/sys v0.12.0 // indirect + golang.org/x/text v0.12.0 // indirect + golang.org/x/tools v0.12.0 // indirect google.golang.org/protobuf v1.28.1 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/yaml.v2 v2.4.0 // indirect diff --git a/src/acceptance/go.sum b/src/acceptance/go.sum index cf8041c550..724a3bc21e 100644 --- a/src/acceptance/go.sum +++ b/src/acceptance/go.sum @@ -1,5 +1,5 @@ -github.com/cloudfoundry/cf-test-helpers/v2 v2.5.0 h1:1K7Mrjwq7/APbp2f+Rs/6LhBM58SWidJejmL9SEcUlI= -github.com/cloudfoundry/cf-test-helpers/v2 v2.5.0/go.mod h1:+obqhEjTB5aVVSKJSmXlSekcukso6YIeSlqTiSDeDq8= +github.com/cloudfoundry/cf-test-helpers/v2 v2.7.0 h1:QYPAI6JCL62F8ht6Tz9sDWKwTdoWTV5tKKvDDCZwoJ0= +github.com/cloudfoundry/cf-test-helpers/v2 v2.7.0/go.mod h1:F9lO5YQLrrF7xf5liS/pRTE9uuyZ8TQ8N2ft/mR5hv8= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= @@ -23,10 +23,10 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/onsi/ginkgo/v2 v2.11.0 h1:WgqUCUt/lT6yXoQ8Wef0fsNn5cAuMK7+KT9UFRz2tcU= -github.com/onsi/ginkgo/v2 v2.11.0/go.mod h1:ZhrRA5XmEE3x3rhlzamx/JJvujdZoJ2uvgI7kR0iZvM= -github.com/onsi/gomega v1.27.8 h1:gegWiwZjBsf2DgiSbf5hpokZ98JVDMcWkUiigk6/KXc= -github.com/onsi/gomega v1.27.8/go.mod h1:2J8vzI/s+2shY9XHRApDkdgPo1TKT7P2u6fXeJKFnNQ= +github.com/onsi/ginkgo/v2 v2.12.1 h1:uHNEO1RP2SpuZApSkel9nEh1/Mu+hmQe7Q+Pepg5OYA= +github.com/onsi/ginkgo/v2 v2.12.1/go.mod h1:TE309ZR8s5FsKKpuB1YAQYBzCaAfUgatB/xlT/ETL/o= +github.com/onsi/gomega v1.28.0 h1:i2rg/p9n/UqIDAMFUJ6qIUUMcsqOuUHgbpbu235Vr1c= +github.com/onsi/gomega v1.28.0/go.mod h1:A1H2JE76sI14WIP57LMKj7FVfCHx3g3BcZVjJG8bjX8= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= @@ -37,15 +37,15 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -golang.org/x/mod v0.10.0 h1:lFO9qtOdlre5W1jxS3r/4szv2/6iXxScdzjoBMXNhYk= -golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M= -golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= -golang.org/x/sys v0.9.0 h1:KS/R3tvhPqvJvwcKfnBHJwwthS11LRhmM5D59eEXa0s= -golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= -golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/tools v0.9.3 h1:Gn1I8+64MsuTb/HpH+LmQtNas23LhUVr3rYZ0eKuaMM= -golang.org/x/tools v0.9.3/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= +golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= +golang.org/x/net v0.14.0 h1:BONx9s002vGdD9umnlX1Po8vOZmrgH34qlHcD1MfK14= +golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= +golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= +golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc= +golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/tools v0.12.0 h1:YW6HUoUmYBpwSgyaGaZq1fHjrBjX1rlpZ54T6mu2kss= +golang.org/x/tools v0.12.0/go.mod h1:Sc0INKfu04TlqNoRA1hgpFZbhYXHPr4V5DzpSBTPqQM= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= diff --git a/src/acceptance/tools.go b/src/acceptance/tools.go deleted file mode 100644 index 3bac4c0bb9..0000000000 --- a/src/acceptance/tools.go +++ /dev/null @@ -1,8 +0,0 @@ -//go:build tools -// +build tools - -package tools - -import ( - _ "github.com/onsi/ginkgo/v2/ginkgo" -) diff --git a/src/autoscaler/.gitignore b/src/autoscaler/.gitignore index 378eac25d3..27eecdf61d 100644 --- a/src/autoscaler/.gitignore +++ b/src/autoscaler/.gitignore @@ -1 +1,2 @@ -build +build/ +fakes/ diff --git a/src/autoscaler/Makefile b/src/autoscaler/Makefile index 5b1edeb755..1775e4395c 100644 --- a/src/autoscaler/Makefile +++ b/src/autoscaler/Makefile @@ -1,21 +1,75 @@ SHELL := /bin/bash -.SHELLFLAGS = -euo pipefail -c -MAKEFLAGS = -s -GO_VERSION := $(shell go version | sed -e 's/^[^0-9.]*\([0-9.]*\).*/\1/') -GO_DEPENDENCIES := $(shell find . -type f -name '*.go') -PACKAGE_DIRS := $(shell go list ./... | grep -v /vendor/ | grep -v e2e) -CGO_ENABLED = 1 # This is set to enforce dynamic linking which is a requirement of dynatrace. +.SHELLFLAGS := -eu -o pipefail -c +MAKEFLAGS := -s +aes_terminal_font_yellow := \e[38;2;255;255;0m +aes_terminal_reset := \e[0m + +GO_VERSION = $(shell go version | sed --expression='s/^[^0-9.]*\([0-9.]*\).*/\1/') +GO_DEPENDENCIES = $(shell find . -type f -name '*.go') +PACKAGE_DIRS = $(shell go list './...' | grep --invert-match --regexp='/vendor/' \ + | grep --invert-match --regexp='e2e') + +# `CGO_ENABLED := 1` is required to enforce dynamic linking which is a requirement of dynatrace. +CGO_ENABLED := 1 BUILDTAGS := +export GOWORK=off BUILDFLAGS := -ldflags '-linkmode=external' -binaries=$(shell find . -name "main.go" -exec dirname {} \; | cut -d/ -f2 | sort | uniq) -test_dirs=$(shell find . -name "*_test.go" -exec dirname {} \; | cut -d/ -f2 | sort | uniq) +binaries=$(shell find . -name "main.go" -exec dirname {} \; | cut -d/ -f2 | sort | uniq | grep -v vendor) +test_dirs=$(shell find . -name "*_test.go" -exec dirname {} \; | cut -d/ -f2 | sort | uniq) export GO111MODULE=on #TODO: https://github.com/cloudfoundry/app-autoscaler-release/issues/564 allow the tests to be run in parallel #GINKGO_OPTS=-r --race --require-suite -p --randomize-all --cover -GINKGO_OPTS=-r --race --require-suite --randomize-all --cover ${OPTS} +GINKGO_OPTS = -r --race --require-suite --randomize-all --cover ${OPTS} +GINKGO_VERSION = v$(shell cat ../../.tool-versions | grep ginkgo | cut --delimiter=' ' --fields='2') + +# The presence of the subsequent directory indicates wheather the fakes still need to be generated +# or not. +app-fakes-dir := ./fakes +app-fakes-files = $(wildcard ${app-fakes-dir}/*.go) +go_deps_without_fakes = $(shell find . -type f -name '*.go' \ + | grep --invert-match --regexp='${app-fakes-dir}') +.PHONY: generate-fakes +generate-fakes: ${app-fakes-dir} ${app-fakes-files} +${app-fakes-dir} ${app-fakes-files} &: ./go.mod ./go.sum ./generate-fakes.go + @echo "# Generating counterfeits" + mkdir -p '${app-fakes-dir}' + COUNTERFEITER_NO_GENERATE_WARNING='true' go generate './...' + + + +# This target should depend additionally on `${app-fakes-dir}` and on `${app-fakes-files}`. However +# this is not defined here. The reason is, that for `go-mod-tidy` the generated fakes need to be +# present but fortunately not necessarily up-to-date. This is fortunate because the generation of +# the fake requires the files `go.mod` and `go.sum` to be already tidied up, introducing a cyclic +# dependency otherwise. But that would make any modification to `go.mod` or `go.sum` +# impossible. This definition now makes it possible to update `go.mod` and `go.sum` as follows: +# 1. `make generate-fakes` +# 2. Update `go.mod` and/or `go.sum` +# 3. `make go-mod-tidy` +# 4. Optionally: `make generate-fakes` to update the fakes as well. +.PHONY: go-mod-tidy +go-mod-tidy: ./go.mod ./go.sum ${go_deps_without_fakes} + @echo -ne '${aes_terminal_font_yellow}' + @echo -e '⚠️ Warning: The client-fakes generated from the openapi-specification may be\n' \ + 'outdated. Please consider re-generating them, if this is relevant.' + @echo -ne '${aes_terminal_reset}' + go mod tidy + + + +go-vendoring-folder := ./vendor +go-vendored-files = $(shell find '${go-vendoring-folder}' -type f -name '*.go' 2> '/dev/null') +## This does not work: go-vendored-files = $(wildcard ${go-vendoring-folder}/**/*.go) + +.PHONY: go-mod-vendor +go-mod-vendor: ${go-vendoring-folder} ${go-vendored-files} +${go-vendoring-folder} ${go-vendored-files} &: ${app-fakes-dir} ${app-fakes-files} + go mod vendor + + build-%: @echo "# building $*" @@ -26,44 +80,31 @@ build: $(addprefix build-,$(binaries)) build_tests: $(addprefix build_test-,$(test_dirs)) -build_test-%: +build_test-%: generate-fakes @echo " - building '$*' tests" @export build_folder=${PWD}/build/tests/$* &&\ mkdir -p $${build_folder} &&\ cd $* &&\ - for package in $$( go list ./... | sed 's|.*/autoscaler/$*|.|' | awk '{ print length, $$0 }' | sort -n -r | cut -d" " -f2- );\ + for package in $$(go list ./... | sed 's|.*/autoscaler/$*|.|' | awk '{ print length, $$0 }' | sort -n -r | cut -d" " -f2- );\ do\ - export test_file=$${build_folder}/$${package}.test;\ - echo " - compiling $${package} to $${test_file}";\ - go test -c -o $${test_file} $${package};\ + export test_file=$${build_folder}/$${package}.test;\ + echo " - compiling $${package} to $${test_file}";\ + go test -c -o $${test_file} $${package};\ done; check: fmt lint build test -ginkgo_check: - @ current_version=$(shell ginkgo version | cut -d " " -f 3 | sed -E 's/([0-9]+\.[0-9]+)\..*/\1/');\ - expected_version=$(shell grep "ginkgo" "../../.tool-versions" | cut -d " " -f 2 | sed -E 's/([0-9]+\.[0-9]+)\..*/\1/');\ - if [ "$${current_version}" != "$${expected_version}" ]; then \ - echo "WARNING: Expected to have ginkgo version '$${expected_version}.x' but we have $(shell ginkgo version)";\ - fi - -test: ginkgo_check +test: generate-fakes @echo "Running tests" - @APP_AUTOSCALER_TEST_RUN=true ginkgo -p ${GINKGO_OPTS} --skip-package=integration + APP_AUTOSCALER_TEST_RUN='true' go run 'github.com/onsi/ginkgo/v2/ginkgo@${GINKGO_VERSION}' -p ${GINKGO_OPTS} --skip-package='integration' -testsuite: ginkgo_check - APP_AUTOSCALER_TEST_RUN=true ginkgo -p ${GINKGO_OPTS} ${TEST} +testsuite: generate-fakes + APP_AUTOSCALER_TEST_RUN='true' go run 'github.com/onsi/ginkgo/v2/ginkgo@${GINKGO_VERSION}' -p ${GINKGO_OPTS} ${TEST} .PHONY: integration -integration: ginkgo_check +integration: generate-fakes @echo "# Running integration tests" - APP_AUTOSCALER_TEST_RUN=true ginkgo ${GINKGO_OPTS} integration - -.PHONY: fakes generate -fakes: generate -generate: - @echo "# Generating counterfeits" - @COUNTERFEITER_NO_GENERATE_WARNING=true go generate ./... + APP_AUTOSCALER_TEST_RUN='true' go run 'github.com/onsi/ginkgo/v2/ginkgo@${GINKGO_VERSION}' ${GINKGO_OPTS} integration importfmt: @echo "# Formatting the imports" @@ -73,21 +114,6 @@ fmt: importfmt @FORMATTED=`go fmt $(PACKAGE_DIRS)` @([[ ! -z "$(FORMATTED)" ]] && printf "Fixed unformatted files:\n$(FORMATTED)") || true -buildtools-force: - @echo "# Installing build tools" - go mod download - go install github.com/square/certstrap - go install github.com/onsi/ginkgo/v2/ginkgo - go install github.com/maxbrunsfeld/counterfeiter/v6 - go install github.com/golangci/golangci-lint/cmd/golangci-lint - -.PHONY: buildtools -buildtools: - @echo "# Installing build tools" - @which certstrap >/dev/null || go install github.com/square/certstrap - @which ginkgo >/dev/null && [ "v$(shell ginkgo version | awk '{ print $$3}')" = "$(shell cat go.mod | grep ginkgo | awk '{ print $$2}')" ] || go install github.com/onsi/ginkgo/v2/ginkgo - @which counterfeiter >/dev/null || go install github.com/maxbrunsfeld/counterfeiter/v6 - lint: @cd ../../; make lint_autoscaler OPTS=${OPTS} @@ -95,4 +121,6 @@ lint: clean: @echo "# cleaning autoscaler" @go clean -cache -testcache - @rm -rf build + @rm --force --recursive 'build' + @rm --force --recursive 'fakes' + @rm --force --recursive 'vendor' diff --git a/src/autoscaler/api/publicapiserver/middleware.go b/src/autoscaler/api/publicapiserver/middleware.go index 2537d85554..cf84b72b08 100644 --- a/src/autoscaler/api/publicapiserver/middleware.go +++ b/src/autoscaler/api/publicapiserver/middleware.go @@ -71,12 +71,18 @@ func (mw *Middleware) Oauth(next http.Handler) http.Handler { } isUserSpaceDeveloper, err := mw.cfClient.IsUserSpaceDeveloper(userToken, cf.Guid(appId)) if err != nil { - if errors.Is(err, cf.ErrUnauthrorized) { + switch { + case cf.IsNotFound(err): + handlers.WriteJSONResponse(w, http.StatusNotFound, models.ErrorResponse{ + Code: "App not found", + Message: "The app guid supplied does not exist"}) + return + case errors.Is(err, cf.ErrUnauthorized): handlers.WriteJSONResponse(w, http.StatusUnauthorized, models.ErrorResponse{ Code: "Unauthorized", Message: "You are not authorized to perform the requested action"}) return - } else { + default: mw.logger.Error("failed to check space developer permissions", err, nil) handlers.WriteJSONResponse(w, http.StatusInternalServerError, models.ErrorResponse{ Code: "Internal-Server-Error", @@ -84,6 +90,7 @@ func (mw *Middleware) Oauth(next http.Handler) http.Handler { return } } + if isUserSpaceDeveloper { next.ServeHTTP(w, r) return @@ -156,7 +163,7 @@ func (mw *Middleware) HasClientToken(next http.Handler) http.Handler { } isTokenAuthorized, err := mw.cfClient.IsTokenAuthorized(clientToken, mw.clientId) if err != nil { - if errors.Is(err, cf.ErrUnauthrorized) { + if errors.Is(err, cf.ErrUnauthorized) { writeErrorResponse(w, http.StatusUnauthorized, "client is not authorized to perform the requested action") return } else { diff --git a/src/autoscaler/api/publicapiserver/middleware_test.go b/src/autoscaler/api/publicapiserver/middleware_test.go index 892cf906f1..ab4c1d5ffd 100644 --- a/src/autoscaler/api/publicapiserver/middleware_test.go +++ b/src/autoscaler/api/publicapiserver/middleware_test.go @@ -5,6 +5,8 @@ import ( "net/http" "net/http/httptest" + "code.cloudfoundry.org/app-autoscaler/src/autoscaler/cf" + "code.cloudfoundry.org/lager/v3/lagertest" "github.com/gorilla/mux" . "github.com/onsi/ginkgo/v2" @@ -62,6 +64,7 @@ var _ = Describe("Middleware", func() { }) }) + Context("Invalid user token format", func() { Context("when user token is not a bearer token", func() { BeforeEach(func() { @@ -104,6 +107,20 @@ var _ = Describe("Middleware", func() { }) }) }) + Context("App does not exist", func() { + BeforeEach(func() { + fakeCFClient.IsUserAdminReturns(false, nil) + fakeCFClient.IsUserSpaceDeveloperReturns(false, cf.CfResourceNotFound) + req = httptest.NewRequest(http.MethodGet, "/v1/apps/"+TEST_APP_ID, nil) + req.Header.Add("Authorization", TEST_USER_TOKEN) + }) + It("should fail with 404", func() { + CheckResponse(resp, http.StatusNotFound, models.ErrorResponse{ + Code: "App not found", + Message: "The app guid supplied does not exist", + }) + }) + }) Context("isadminuser check fails", func() { BeforeEach(func() { @@ -147,6 +164,21 @@ var _ = Describe("Middleware", func() { }) }) }) + Context("isspacedeveloper check fails unauthorised", func() { + BeforeEach(func() { + fakeCFClient.IsUserAdminReturns(false, nil) + fakeCFClient.IsUserSpaceDeveloperReturns(false, fmt.Errorf("wrapped error %w", cf.ErrUnauthorized)) + + req = httptest.NewRequest(http.MethodGet, "/v1/apps/"+TEST_APP_ID, nil) + req.Header.Add("Authorization", TEST_USER_TOKEN) + }) + It("should fail with 401", func() { + CheckResponse(resp, http.StatusUnauthorized, models.ErrorResponse{ + Code: "Unauthorized", + Message: "You are not authorized to perform the requested action", + }) + }) + }) Context("user is space developer", func() { BeforeEach(func() { diff --git a/src/autoscaler/api/publicapiserver/public_api_handler_test.go b/src/autoscaler/api/publicapiserver/public_api_handler_test.go index 1d45e71b13..454ccfc3af 100644 --- a/src/autoscaler/api/publicapiserver/public_api_handler_test.go +++ b/src/autoscaler/api/publicapiserver/public_api_handler_test.go @@ -281,11 +281,18 @@ var _ = Describe("PublicApiHandler", func() { }) Describe("DetachScalingPolicy", func() { + BeforeEach(func() { + req, _ = http.NewRequest(http.MethodDelete, "", nil) + pathVariables["appId"] = TEST_APP_ID + }) JustBeforeEach(func() { handler.DetachScalingPolicy(resp, req, pathVariables) }) Context("When appId is not present", func() { + BeforeEach(func() { + delete(pathVariables, "appId") + }) It("should fail with 400", func() { Expect(resp.Code).To(Equal(http.StatusBadRequest)) Expect(resp.Body.String()).To(Equal(`{"code":"Bad Request","message":"AppId is required"}`)) @@ -294,8 +301,6 @@ var _ = Describe("PublicApiHandler", func() { Context("When delete policy errors", func() { BeforeEach(func() { - pathVariables["appId"] = TEST_APP_ID - req, _ = http.NewRequest(http.MethodDelete, "", nil) policydb.DeletePolicyReturns(fmt.Errorf("Failed to save policy")) }) It("should fail with 500", func() { @@ -306,8 +311,6 @@ var _ = Describe("PublicApiHandler", func() { Context("When scheduler returns non 200 and non 204 status code", func() { BeforeEach(func() { - pathVariables["appId"] = TEST_APP_ID - req, _ = http.NewRequest(http.MethodPut, "", nil) schedulerStatus = 500 }) It("should fail with 500", func() { @@ -318,8 +321,6 @@ var _ = Describe("PublicApiHandler", func() { Context("When scheduler returns 200 status code", func() { BeforeEach(func() { - pathVariables["appId"] = TEST_APP_ID - req, _ = http.NewRequest(http.MethodPut, "", nil) schedulerStatus = 200 }) It("should succeed", func() { @@ -380,8 +381,6 @@ var _ = Describe("PublicApiHandler", func() { Context("When scheduler returns 204 status code", func() { BeforeEach(func() { - pathVariables["appId"] = TEST_APP_ID - req, _ = http.NewRequest(http.MethodPut, "", nil) schedulerStatus = 204 }) It("should succeed", func() { diff --git a/src/autoscaler/cf/errors.go b/src/autoscaler/cf/errors.go index 59fde763de..e274fc9162 100644 --- a/src/autoscaler/cf/errors.go +++ b/src/autoscaler/cf/errors.go @@ -8,6 +8,8 @@ import ( ) const cfResourceNotFound = 10010 +const cfNotAuthenticated = 10002 +const cfNotAuthorised = 10003 type CFErrorResponse struct { Description string `json:"description"` @@ -17,6 +19,9 @@ type CFErrorResponse struct { var CfResourceNotFound = &CfError{Errors: []CfErrorItem{{Detail: "App usage event not found", Title: "CF-ResourceNotFound", Code: cfResourceNotFound}}} var CfInternalServerError = &CfError{Errors: []CfErrorItem{{Detail: "An unexpected, uncaught error occurred; the CC logs will contain more information", Title: "UnknownError", Code: 10001}}} +var CfNotAuthenticated = &CfError{Errors: []CfErrorItem{{Detail: "No auth token was given, but authentication is required for this endpoint", Title: "CF-NotAuthenticated", Code: cfNotAuthenticated}}} +var CfNotAuthorized = &CfError{Errors: []CfErrorItem{{Detail: "The authenticated user does not have permission to perform this operation", Title: "CF-NotAuthorized", Code: cfNotAuthorised}}} + var _ error = &CfError{} var ErrInvalidJson = fmt.Errorf("invalid error json") @@ -28,7 +33,7 @@ func NewCfError(url string, resourceId string, statusCode int, respBody []byte) } cfError.ResourceId = resourceId cfError.StatusCode = statusCode - cfError.url = url + cfError.Url = url if !cfError.IsValid() { return fmt.Errorf("invalid cfError: resource %s status:%d body:%s :%w", resourceId, statusCode, truncateString(string(respBody), 512), ErrInvalidJson) @@ -38,10 +43,20 @@ func NewCfError(url string, resourceId string, statusCode int, respBody []byte) // CfError cf V3 Error type type CfError struct { - Errors []CfErrorItem `json:"errors"` + Errors ErrorItems `json:"errors"` StatusCode int ResourceId string - url string + Url string +} +type ErrorItems []CfErrorItem + +func (e ErrorItems) hasError(errorCode int) bool { + for _, item := range e { + if item.Code == errorCode { + return true + } + } + return false } type CfErrorItem struct { @@ -60,22 +75,29 @@ func (c *CfError) Error() string { if len(errs) > 0 { message = strings.Join(errs, ", ") } - return fmt.Sprintf("cf api Error url='%s', resourceId='%s': %s", c.url, c.ResourceId, message) + return fmt.Sprintf("cf api Error url='%s', resourceId='%s': %s", c.Url, c.ResourceId, message) } -func (c *CfError) IsNotFound() bool { +func (c *CfError) IsValid() bool { + return c != nil && len(c.Errors) > 0 +} + +func (c *CfError) ContainsError(errorCode int) bool { if c.IsValid() { - for _, item := range c.Errors { - if item.Code == cfResourceNotFound { - return true - } - } + return c.Errors.hasError(errorCode) } return false } -func (c *CfError) IsValid() bool { - return c != nil && len(c.Errors) > 0 +func (c *CfError) IsNotFound() bool { + return c.ContainsError(cfResourceNotFound) +} +func (c *CfError) IsNotAuthorised() bool { + return c.ContainsError(cfNotAuthorised) +} + +func (c *CfError) IsNotAuthenticated() bool { + return c.ContainsError(cfNotAuthenticated) } func truncateString(stringToTrunk string, length int) string { diff --git a/src/autoscaler/cf/errors_test.go b/src/autoscaler/cf/errors_test.go index fb81ed43e1..ec52804bb5 100644 --- a/src/autoscaler/cf/errors_test.go +++ b/src/autoscaler/cf/errors_test.go @@ -59,6 +59,22 @@ var _ = Describe("Errors test", func() { }) }) + Context("resource not authorized", func() { + BeforeEach(func() { + errorResponse = `{"errors": [{"detail": "The authenticated user does not have permission to perform this operation","title": "CF-NotAuthorized","code": 10003}]}` + }) + It("Should return true for IsNotAuthorised()", func() { + Expect(cfError.IsNotAuthorised()).To(BeTrue()) + }) + }) + Context("resource not authenticated", func() { + BeforeEach(func() { + errorResponse = `{"errors": [{"detail": "No auth token was given, but authentication is required for this endpoint","title": "CF-NotAuthenticated","code": 10002}]}` + }) + It("Should return true for IsNotAuthenticated()", func() { + Expect(cfError.IsNotAuthenticated()).To(BeTrue()) + }) + }) Context("There is one error", func() { BeforeEach(func() { errorResponse = `{"errors": [{"code": 1,"title": "Title","detail": "Detail"}]}` }) It("Should have the right message", func() { diff --git a/src/autoscaler/cf/mocks/mocks.go b/src/autoscaler/cf/mocks/mocks.go index e2f35c9db3..adc1bf0661 100644 --- a/src/autoscaler/cf/mocks/mocks.go +++ b/src/autoscaler/cf/mocks/mocks.go @@ -65,25 +65,40 @@ func (a AddMock) GetApp(appState string, statusCode int, spaceGuid cf.SpaceId) A Expect(err).NotTo(HaveOccurred()) updated, err := time.Parse(time.RFC3339, "2022-07-21T14:30:17Z") Expect(err).NotTo(HaveOccurred()) - a.server.RouteToHandler("GET", - regexp.MustCompile(`^/v3/apps/[^/]+$`), - ghttp.RespondWithJSONEncoded(statusCode, cf.App{ - Guid: "testing-guid-get-app", - Name: "mock-get-app", - State: appState, - CreatedAt: created, - UpdatedAt: updated, - Relationships: cf.Relationships{ - Space: &cf.Space{ - Data: cf.SpaceData{ - Guid: spaceGuid, - }, + + response := definedResponsesOR(statusCode, cf.App{ + Guid: "testing-guid-get-app", + Name: "mock-get-app", + State: appState, + CreatedAt: created, + UpdatedAt: updated, + Relationships: cf.Relationships{ + Space: &cf.Space{ + Data: cf.SpaceData{ + Guid: spaceGuid, }, }, - })) + }, + }) + a.server.RouteToHandler("GET", + regexp.MustCompile(`^/v3/apps/[^/]+$`), + ghttp.RespondWithJSONEncoded(statusCode, response)) return a } +func definedResponsesOR(statusCode int, response interface{}) interface{} { + switch statusCode { + case 401: + response = cf.CfNotAuthenticated + case 403: + response = cf.CfNotAuthorized + case 404: + response = cf.CfResourceNotFound + default: + } + return response +} + func (a AddMock) GetAppProcesses(processes int) AddMock { type processesResponse struct { Pagination cf.Pagination `json:"pagination"` @@ -112,7 +127,7 @@ func (a AddMock) ScaleAppWebProcess() AddMock { func (a AddMock) Roles(statusCode int, roles ...cf.Role) AddMock { a.server.RouteToHandler("GET", "/v3/roles", - ghttp.RespondWithJSONEncoded(statusCode, cf.Response[cf.Role]{Resources: roles})) + ghttp.RespondWithJSONEncoded(statusCode, definedResponsesOR(statusCode, cf.Response[cf.Role]{Resources: roles}))) return a } diff --git a/src/autoscaler/cf/mocks/mocks_test.go b/src/autoscaler/cf/mocks/mocks_test.go index 082449cf35..31cf2c44f2 100644 --- a/src/autoscaler/cf/mocks/mocks_test.go +++ b/src/autoscaler/cf/mocks/mocks_test.go @@ -1,8 +1,6 @@ package mocks_test import ( - "errors" - "code.cloudfoundry.org/app-autoscaler/src/autoscaler/cf/mocks" "code.cloudfoundry.org/app-autoscaler/src/autoscaler/cf" @@ -290,9 +288,9 @@ var _ = Describe("Cf cloud controller", func() { DeferCleanup(mocks.Close) }) It("will return success", func() { - userAdmin, err := cfc.IsUserSpaceDeveloper("bearer a-test-access-token", "test-app-id") + userSpaceDeveloper, err := cfc.IsUserSpaceDeveloper("bearer a-test-access-token", "test-app-id") Expect(err).NotTo(HaveOccurred()) - Expect(userAdmin).To(BeTrue()) + Expect(userSpaceDeveloper).To(BeTrue()) }) }) When("the mocks return 401", func() { @@ -308,9 +306,9 @@ var _ = Describe("Cf cloud controller", func() { DeferCleanup(mocks.Close) }) It("will return unauthorised", func() { - _, err := cfc.IsUserSpaceDeveloper("bearer a-test-access-token", "test-app-id") - Expect(err).To(HaveOccurred()) - Expect(errors.Is(err, cf.ErrUnauthrorized)).To(BeTrue()) + userSpaceDeveloper, err := cfc.IsUserSpaceDeveloper("bearer a-test-access-token", "test-app-id") + Expect(err).NotTo(HaveOccurred()) + Expect(userSpaceDeveloper).To(BeFalse()) }) }) }) diff --git a/src/autoscaler/cf/oauth.go b/src/autoscaler/cf/oauth.go index 21b16694f8..8fe6c938dc 100644 --- a/src/autoscaler/cf/oauth.go +++ b/src/autoscaler/cf/oauth.go @@ -3,6 +3,7 @@ package cf import ( "context" "encoding/json" + "errors" "fmt" "net/http" "net/url" @@ -16,7 +17,7 @@ const ( ) var ( - ErrUnauthrorized = fmt.Errorf(http.StatusText(http.StatusUnauthorized)) + ErrUnauthorized = fmt.Errorf(http.StatusText(http.StatusUnauthorized)) ErrInvalidTokenFormat = fmt.Errorf("Invalid token format") ) @@ -27,6 +28,10 @@ func (c *Client) IsUserSpaceDeveloper(userToken string, appId Guid) (bool, error func (c *CtxClient) IsUserSpaceDeveloper(ctx context.Context, userToken string, appId Guid) (bool, error) { userId, err := c.getUserId(ctx, userToken) if err != nil { + if errors.Is(ErrUnauthorized, err) { + c.logger.Error("getUserId: token Not authorized", err) + return false, nil + } return false, fmt.Errorf("failed IsUserSpaceDeveloper for appId(%s): %w", appId, err) } @@ -37,6 +42,10 @@ func (c *CtxClient) IsUserSpaceDeveloper(ctx context.Context, userToken string, roles, err := c.GetSpaceDeveloperRoles(ctx, spaceId, userId) if err != nil { + if IsNotFound(err) { + c.logger.Info("GetSpaceDeveloperRoles: Not not found", lager.Data{"userId": userId, "spaceid": spaceId}) + return false, nil + } return false, fmt.Errorf("failed IsUserSpaceDeveloper userId(%s), spaceId(%s): %w", userId, spaceId, err) } @@ -123,24 +132,25 @@ func (c *CtxClient) getUserId(ctx context.Context, userToken string) (UserId, er return "", err } defer func() { _ = resp.Body.Close() }() - if resp.StatusCode == http.StatusUnauthorized { + + switch resp.StatusCode { + case http.StatusOK: + userInfo := struct { + UserId UserId `json:"user_id"` + }{} + err = json.NewDecoder(resp.Body).Decode(&userInfo) + if err != nil { + c.logger.Error("Failed to parse user info response body", err, lager.Data{"userInfoEndpoint": userInfoEndpoint}) + return "", err + } + return userInfo.UserId, nil + case http.StatusNotFound, http.StatusUnauthorized: c.logger.Error("Failed to get user info, token invalid", nil, lager.Data{"userInfoEndpoint": userInfoEndpoint, "statusCode": resp.StatusCode}) - return "", ErrUnauthrorized - } else if resp.StatusCode != http.StatusOK { + return "", ErrUnauthorized + default: c.logger.Error("Failed to get user info", nil, lager.Data{"userInfoEndpoint": userInfoEndpoint, "statusCode": resp.StatusCode}) return "", fmt.Errorf("Failed to get user info, statuscode :%v", resp.StatusCode) } - - userInfo := struct { - UserId UserId `json:"user_id"` - }{} - err = json.NewDecoder(resp.Body).Decode(&userInfo) - if err != nil { - c.logger.Error("Failed to parse user info response body", err, lager.Data{"userInfoEndpoint": userInfoEndpoint}) - return "", err - } - - return userInfo.UserId, nil } func (c *CtxClient) getSpaceId(ctx context.Context, appId Guid) (SpaceId, error) { diff --git a/src/autoscaler/cf/oauth_test.go b/src/autoscaler/cf/oauth_test.go index f6df252063..84428ee8e1 100644 --- a/src/autoscaler/cf/oauth_test.go +++ b/src/autoscaler/cf/oauth_test.go @@ -44,7 +44,7 @@ var _ = Describe("Oauth", func() { fakeTokenServer *mocks.Server userInfoStatus int - userInfoResponse userInfo + userInfoResponse interface{} userScopeStatus int userScopeResponse userScope @@ -110,32 +110,53 @@ var _ = Describe("Oauth", func() { }) }) - Context("user info endpoint returns 401 statusCode", func() { - BeforeEach(func() { - userInfoStatus = http.StatusUnauthorized - }) - It("should error", func() { - Expect(err).To(HaveOccurred()) - Expect(err).To(MatchError(MatchRegexp("Unauthorized"))) + Context("user info endpoint", func() { + Context("returns 401 statusCode", func() { + BeforeEach(func() { + userInfoStatus = http.StatusUnauthorized + }) + It("should false", func() { + Expect(err).ToNot(HaveOccurred()) + Expect(isUserSpaceDeveloperFlag).To(BeFalse()) + }) }) - }) - Context("user info endpoint returns non-200 and non-401 statusCode", func() { - BeforeEach(func() { - userInfoStatus = http.StatusBadRequest + Context("uua returns not found", func() { + BeforeEach(func() { + userInfoStatus = http.StatusNotFound + }) + It("should return false", func() { + Expect(err).ToNot(HaveOccurred()) + Expect(isUserSpaceDeveloperFlag).To(BeFalse()) + }) }) - It("should error", func() { - Expect(err).To(HaveOccurred()) - Expect(err).To(MatchError(MatchRegexp("Failed to get user info, statuscode :400"))) + Context("response code 404 but not from cc", func() { + BeforeEach(func() { + userInfoStatus = http.StatusNotFound + }) + It("should return false", func() { + Expect(err).ToNot(HaveOccurred()) + Expect(isUserSpaceDeveloperFlag).To(BeFalse()) + }) }) - }) - Context("user info response is not in json format", func() { - BeforeEach(func() { - fakeTokenServer.RouteToHandler(http.MethodGet, "/userinfo", ghttp.RespondWith(http.StatusOK, "non-json-response")) + Context("returns non 200,401,404 statusCode", func() { + BeforeEach(func() { + userInfoStatus = http.StatusBadRequest + }) + It("should error", func() { + Expect(err).To(HaveOccurred()) + Expect(err).To(MatchError(MatchRegexp("Failed to get user info, statuscode :400"))) + }) }) - It("should error", func() { - Expect(err).To(HaveOccurred()) + + Context("is not in json format", func() { + BeforeEach(func() { + fakeTokenServer.RouteToHandler(http.MethodGet, "/userinfo", ghttp.RespondWith(http.StatusOK, "non-json-response")) + }) + It("should error", func() { + Expect(err).To(HaveOccurred()) + }) }) }) @@ -149,43 +170,56 @@ var _ = Describe("Oauth", func() { }) }) - Context("apps endpoint returns 400 status code", func() { - BeforeEach(func() { - appStatus = http.StatusBadRequest - }) - It("should error", func() { - Expect(err).To(HaveOccurred()) - Expect(err).To(MatchError(MatchRegexp("400"))) + Context("apps endpoint", func() { + Context("returns 400 status code", func() { + BeforeEach(func() { + appStatus = http.StatusBadRequest + }) + It("should error", func() { + Expect(err).To(HaveOccurred()) + Expect(err).To(MatchError(MatchRegexp("400"))) + }) }) - }) - Context("apps endpoint returns 401 status code", func() { - BeforeEach(func() { - appStatus = http.StatusUnauthorized - }) - It("should error", func() { - Expect(err).To(HaveOccurred()) - Expect(err).To(MatchError(MatchRegexp("401"))) + Context("returns 401 status code", func() { + BeforeEach(func() { + appStatus = http.StatusUnauthorized + }) + It("should error", func() { + Expect(err).To(HaveOccurred()) + Expect(err).To(MatchError(MatchRegexp(`CF-NotAuthenticated`))) + }) }) - }) - Context("roles endpoint returns 200 and 400 status code", func() { - BeforeEach(func() { - rolesStatus = http.StatusBadRequest - }) - It("should error", func() { - Expect(err).To(HaveOccurred()) - Expect(err).To(MatchError(MatchRegexp(`failed IsUserSpaceDeveloper userId\(test-user-id\), spaceId\(test-space-id\):.*page 1:.*cf.Response\[.*cf.Role\]:.*400`))) + Context("returns 404 status code", func() { + BeforeEach(func() { + appStatus = http.StatusNotFound + }) + It("should error", func() { + Expect(err).To(HaveOccurred()) + Expect(err).To(MatchError(MatchRegexp(`CF-ResourceNotFound`))) + }) }) }) - - Context("roles endpoint returns 401 status code", func() { - BeforeEach(func() { - rolesStatus = http.StatusUnauthorized + Context("roles endpoint", func() { + Context("roles endpoint 400 status code", func() { + BeforeEach(func() { + rolesStatus = http.StatusBadRequest + }) + It("should error", func() { + Expect(err).To(HaveOccurred()) + Expect(err).To(MatchError(MatchRegexp(`failed IsUserSpaceDeveloper userId\(test-user-id\), spaceId\(test-space-id\):.*page 1:.*cf.Response\[.*cf.Role\]:.*400`))) + }) }) - It("should error", func() { - Expect(err).To(HaveOccurred()) - Expect(err).To(MatchError(MatchRegexp(`.*userId\(test-user-id\), spaceId\(test-space-id\):.*cf.Response\[.*cf.Role\]:.*invalid error json`))) + + Context("roles endpoint returns 404 status code", func() { + BeforeEach(func() { + rolesStatus = http.StatusNotFound + }) + It("should return false", func() { + Expect(err).ToNot(HaveOccurred()) + Expect(isUserSpaceDeveloperFlag).To(BeFalse()) + }) }) }) diff --git a/src/autoscaler/db/sqldb/lock_sqldb.go b/src/autoscaler/db/sqldb/lock_sqldb.go index 6fcbcf1735..b300a8ab37 100644 --- a/src/autoscaler/db/sqldb/lock_sqldb.go +++ b/src/autoscaler/db/sqldb/lock_sqldb.go @@ -63,6 +63,7 @@ func (ldb *LockSQLDB) Close() error { return nil } +/* #nosec G202 -- string comes from safe source and parametrized table names are not supported. */ func (ldb *LockSQLDB) fetch(tx *sql.Tx) (*models.Lock, error) { ldb.logger.Debug("fetching-lock") var ( diff --git a/src/autoscaler/fakes/fake_app_metric_db.go b/src/autoscaler/fakes/fake_app_metric_db.go deleted file mode 100644 index bcc6aac07f..0000000000 --- a/src/autoscaler/fakes/fake_app_metric_db.go +++ /dev/null @@ -1,282 +0,0 @@ -// This file was generated by counterfeiter -package fakes - -import ( - "database/sql" - "sync" - - "code.cloudfoundry.org/app-autoscaler/src/autoscaler/db" - "code.cloudfoundry.org/app-autoscaler/src/autoscaler/models" -) - -type FakeAppMetricDB struct { - GetDBStatusStub func() sql.DBStats - getDBStatusMutex sync.RWMutex - getDBStatusArgsForCall []struct{} - getDBStatusReturns struct { - result1 sql.DBStats - } - SaveAppMetricStub func(appMetric *models.AppMetric) error - saveAppMetricMutex sync.RWMutex - saveAppMetricArgsForCall []struct { - appMetric *models.AppMetric - } - saveAppMetricReturns struct { - result1 error - } - SaveAppMetricsInBulkStub func(metrics []*models.AppMetric) error - saveAppMetricsInBulkMutex sync.RWMutex - saveAppMetricsInBulkArgsForCall []struct { - metrics []*models.AppMetric - } - saveAppMetricsInBulkReturns struct { - result1 error - } - RetrieveAppMetricsStub func(appId string, metricType string, start int64, end int64, orderType db.OrderType) ([]*models.AppMetric, error) - retrieveAppMetricsMutex sync.RWMutex - retrieveAppMetricsArgsForCall []struct { - appId string - metricType string - start int64 - end int64 - orderType db.OrderType - } - retrieveAppMetricsReturns struct { - result1 []*models.AppMetric - result2 error - } - PruneAppMetricsStub func(before int64) error - pruneAppMetricsMutex sync.RWMutex - pruneAppMetricsArgsForCall []struct { - before int64 - } - pruneAppMetricsReturns struct { - result1 error - } - CloseStub func() error - closeMutex sync.RWMutex - closeArgsForCall []struct{} - closeReturns struct { - result1 error - } - invocations map[string][][]interface{} - invocationsMutex sync.RWMutex -} - -func (fake *FakeAppMetricDB) GetDBStatus() sql.DBStats { - fake.getDBStatusMutex.Lock() - fake.getDBStatusArgsForCall = append(fake.getDBStatusArgsForCall, struct{}{}) - fake.recordInvocation("GetDBStatus", []interface{}{}) - fake.getDBStatusMutex.Unlock() - if fake.GetDBStatusStub != nil { - return fake.GetDBStatusStub() - } - return fake.getDBStatusReturns.result1 -} - -func (fake *FakeAppMetricDB) GetDBStatusCallCount() int { - fake.getDBStatusMutex.RLock() - defer fake.getDBStatusMutex.RUnlock() - return len(fake.getDBStatusArgsForCall) -} - -func (fake *FakeAppMetricDB) GetDBStatusReturns(result1 sql.DBStats) { - fake.GetDBStatusStub = nil - fake.getDBStatusReturns = struct { - result1 sql.DBStats - }{result1} -} - -func (fake *FakeAppMetricDB) SaveAppMetric(appMetric *models.AppMetric) error { - fake.saveAppMetricMutex.Lock() - fake.saveAppMetricArgsForCall = append(fake.saveAppMetricArgsForCall, struct { - appMetric *models.AppMetric - }{appMetric}) - fake.recordInvocation("SaveAppMetric", []interface{}{appMetric}) - fake.saveAppMetricMutex.Unlock() - if fake.SaveAppMetricStub != nil { - return fake.SaveAppMetricStub(appMetric) - } - return fake.saveAppMetricReturns.result1 -} - -func (fake *FakeAppMetricDB) SaveAppMetricCallCount() int { - fake.saveAppMetricMutex.RLock() - defer fake.saveAppMetricMutex.RUnlock() - return len(fake.saveAppMetricArgsForCall) -} - -func (fake *FakeAppMetricDB) SaveAppMetricArgsForCall(i int) *models.AppMetric { - fake.saveAppMetricMutex.RLock() - defer fake.saveAppMetricMutex.RUnlock() - return fake.saveAppMetricArgsForCall[i].appMetric -} - -func (fake *FakeAppMetricDB) SaveAppMetricReturns(result1 error) { - fake.SaveAppMetricStub = nil - fake.saveAppMetricReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeAppMetricDB) SaveAppMetricsInBulk(metrics []*models.AppMetric) error { - var metricsCopy []*models.AppMetric - if metrics != nil { - metricsCopy = make([]*models.AppMetric, len(metrics)) - copy(metricsCopy, metrics) - } - fake.saveAppMetricsInBulkMutex.Lock() - fake.saveAppMetricsInBulkArgsForCall = append(fake.saveAppMetricsInBulkArgsForCall, struct { - metrics []*models.AppMetric - }{metricsCopy}) - fake.recordInvocation("SaveAppMetricsInBulk", []interface{}{metricsCopy}) - fake.saveAppMetricsInBulkMutex.Unlock() - if fake.SaveAppMetricsInBulkStub != nil { - return fake.SaveAppMetricsInBulkStub(metrics) - } - return fake.saveAppMetricsInBulkReturns.result1 -} - -func (fake *FakeAppMetricDB) SaveAppMetricsInBulkCallCount() int { - fake.saveAppMetricsInBulkMutex.RLock() - defer fake.saveAppMetricsInBulkMutex.RUnlock() - return len(fake.saveAppMetricsInBulkArgsForCall) -} - -func (fake *FakeAppMetricDB) SaveAppMetricsInBulkArgsForCall(i int) []*models.AppMetric { - fake.saveAppMetricsInBulkMutex.RLock() - defer fake.saveAppMetricsInBulkMutex.RUnlock() - return fake.saveAppMetricsInBulkArgsForCall[i].metrics -} - -func (fake *FakeAppMetricDB) SaveAppMetricsInBulkReturns(result1 error) { - fake.SaveAppMetricsInBulkStub = nil - fake.saveAppMetricsInBulkReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeAppMetricDB) RetrieveAppMetrics(appId string, metricType string, start int64, end int64, orderType db.OrderType) ([]*models.AppMetric, error) { - fake.retrieveAppMetricsMutex.Lock() - fake.retrieveAppMetricsArgsForCall = append(fake.retrieveAppMetricsArgsForCall, struct { - appId string - metricType string - start int64 - end int64 - orderType db.OrderType - }{appId, metricType, start, end, orderType}) - fake.recordInvocation("RetrieveAppMetrics", []interface{}{appId, metricType, start, end, orderType}) - fake.retrieveAppMetricsMutex.Unlock() - if fake.RetrieveAppMetricsStub != nil { - return fake.RetrieveAppMetricsStub(appId, metricType, start, end, orderType) - } - return fake.retrieveAppMetricsReturns.result1, fake.retrieveAppMetricsReturns.result2 -} - -func (fake *FakeAppMetricDB) RetrieveAppMetricsCallCount() int { - fake.retrieveAppMetricsMutex.RLock() - defer fake.retrieveAppMetricsMutex.RUnlock() - return len(fake.retrieveAppMetricsArgsForCall) -} - -func (fake *FakeAppMetricDB) RetrieveAppMetricsArgsForCall(i int) (string, string, int64, int64, db.OrderType) { - fake.retrieveAppMetricsMutex.RLock() - defer fake.retrieveAppMetricsMutex.RUnlock() - return fake.retrieveAppMetricsArgsForCall[i].appId, fake.retrieveAppMetricsArgsForCall[i].metricType, fake.retrieveAppMetricsArgsForCall[i].start, fake.retrieveAppMetricsArgsForCall[i].end, fake.retrieveAppMetricsArgsForCall[i].orderType -} - -func (fake *FakeAppMetricDB) RetrieveAppMetricsReturns(result1 []*models.AppMetric, result2 error) { - fake.RetrieveAppMetricsStub = nil - fake.retrieveAppMetricsReturns = struct { - result1 []*models.AppMetric - result2 error - }{result1, result2} -} - -func (fake *FakeAppMetricDB) PruneAppMetrics(before int64) error { - fake.pruneAppMetricsMutex.Lock() - fake.pruneAppMetricsArgsForCall = append(fake.pruneAppMetricsArgsForCall, struct { - before int64 - }{before}) - fake.recordInvocation("PruneAppMetrics", []interface{}{before}) - fake.pruneAppMetricsMutex.Unlock() - if fake.PruneAppMetricsStub != nil { - return fake.PruneAppMetricsStub(before) - } - return fake.pruneAppMetricsReturns.result1 -} - -func (fake *FakeAppMetricDB) PruneAppMetricsCallCount() int { - fake.pruneAppMetricsMutex.RLock() - defer fake.pruneAppMetricsMutex.RUnlock() - return len(fake.pruneAppMetricsArgsForCall) -} - -func (fake *FakeAppMetricDB) PruneAppMetricsArgsForCall(i int) int64 { - fake.pruneAppMetricsMutex.RLock() - defer fake.pruneAppMetricsMutex.RUnlock() - return fake.pruneAppMetricsArgsForCall[i].before -} - -func (fake *FakeAppMetricDB) PruneAppMetricsReturns(result1 error) { - fake.PruneAppMetricsStub = nil - fake.pruneAppMetricsReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeAppMetricDB) Close() error { - fake.closeMutex.Lock() - fake.closeArgsForCall = append(fake.closeArgsForCall, struct{}{}) - fake.recordInvocation("Close", []interface{}{}) - fake.closeMutex.Unlock() - if fake.CloseStub != nil { - return fake.CloseStub() - } - return fake.closeReturns.result1 -} - -func (fake *FakeAppMetricDB) CloseCallCount() int { - fake.closeMutex.RLock() - defer fake.closeMutex.RUnlock() - return len(fake.closeArgsForCall) -} - -func (fake *FakeAppMetricDB) CloseReturns(result1 error) { - fake.CloseStub = nil - fake.closeReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeAppMetricDB) Invocations() map[string][][]interface{} { - fake.invocationsMutex.RLock() - defer fake.invocationsMutex.RUnlock() - fake.getDBStatusMutex.RLock() - defer fake.getDBStatusMutex.RUnlock() - fake.saveAppMetricMutex.RLock() - defer fake.saveAppMetricMutex.RUnlock() - fake.saveAppMetricsInBulkMutex.RLock() - defer fake.saveAppMetricsInBulkMutex.RUnlock() - fake.retrieveAppMetricsMutex.RLock() - defer fake.retrieveAppMetricsMutex.RUnlock() - fake.pruneAppMetricsMutex.RLock() - defer fake.pruneAppMetricsMutex.RUnlock() - fake.closeMutex.RLock() - defer fake.closeMutex.RUnlock() - return fake.invocations -} - -func (fake *FakeAppMetricDB) recordInvocation(key string, args []interface{}) { - fake.invocationsMutex.Lock() - defer fake.invocationsMutex.Unlock() - if fake.invocations == nil { - fake.invocations = map[string][][]interface{}{} - } - if fake.invocations[key] == nil { - fake.invocations[key] = [][]interface{}{} - } - fake.invocations[key] = append(fake.invocations[key], args) -} - -var _ db.AppMetricDB = new(FakeAppMetricDB) diff --git a/src/autoscaler/fakes/fake_binding_db.go b/src/autoscaler/fakes/fake_binding_db.go deleted file mode 100644 index 946e6fd1b7..0000000000 --- a/src/autoscaler/fakes/fake_binding_db.go +++ /dev/null @@ -1,1267 +0,0 @@ -// Code generated by counterfeiter. DO NOT EDIT. -package fakes - -import ( - "context" - "database/sql" - "sync" - - "code.cloudfoundry.org/app-autoscaler/src/autoscaler/db" - "code.cloudfoundry.org/app-autoscaler/src/autoscaler/models" -) - -type FakeBindingDB struct { - CheckServiceBindingStub func(string) bool - checkServiceBindingMutex sync.RWMutex - checkServiceBindingArgsForCall []struct { - arg1 string - } - checkServiceBindingReturns struct { - result1 bool - } - checkServiceBindingReturnsOnCall map[int]struct { - result1 bool - } - CloseStub func() error - closeMutex sync.RWMutex - closeArgsForCall []struct { - } - closeReturns struct { - result1 error - } - closeReturnsOnCall map[int]struct { - result1 error - } - CountServiceInstancesInOrgStub func(string) (int, error) - countServiceInstancesInOrgMutex sync.RWMutex - countServiceInstancesInOrgArgsForCall []struct { - arg1 string - } - countServiceInstancesInOrgReturns struct { - result1 int - result2 error - } - countServiceInstancesInOrgReturnsOnCall map[int]struct { - result1 int - result2 error - } - CreateServiceBindingStub func(context.Context, string, string, string) error - createServiceBindingMutex sync.RWMutex - createServiceBindingArgsForCall []struct { - arg1 context.Context - arg2 string - arg3 string - arg4 string - } - createServiceBindingReturns struct { - result1 error - } - createServiceBindingReturnsOnCall map[int]struct { - result1 error - } - CreateServiceInstanceStub func(context.Context, models.ServiceInstance) error - createServiceInstanceMutex sync.RWMutex - createServiceInstanceArgsForCall []struct { - arg1 context.Context - arg2 models.ServiceInstance - } - createServiceInstanceReturns struct { - result1 error - } - createServiceInstanceReturnsOnCall map[int]struct { - result1 error - } - DeleteServiceBindingStub func(context.Context, string) error - deleteServiceBindingMutex sync.RWMutex - deleteServiceBindingArgsForCall []struct { - arg1 context.Context - arg2 string - } - deleteServiceBindingReturns struct { - result1 error - } - deleteServiceBindingReturnsOnCall map[int]struct { - result1 error - } - DeleteServiceBindingByAppIdStub func(context.Context, string) error - deleteServiceBindingByAppIdMutex sync.RWMutex - deleteServiceBindingByAppIdArgsForCall []struct { - arg1 context.Context - arg2 string - } - deleteServiceBindingByAppIdReturns struct { - result1 error - } - deleteServiceBindingByAppIdReturnsOnCall map[int]struct { - result1 error - } - DeleteServiceInstanceStub func(context.Context, string) error - deleteServiceInstanceMutex sync.RWMutex - deleteServiceInstanceArgsForCall []struct { - arg1 context.Context - arg2 string - } - deleteServiceInstanceReturns struct { - result1 error - } - deleteServiceInstanceReturnsOnCall map[int]struct { - result1 error - } - GetAppIdByBindingIdStub func(context.Context, string) (string, error) - getAppIdByBindingIdMutex sync.RWMutex - getAppIdByBindingIdArgsForCall []struct { - arg1 context.Context - arg2 string - } - getAppIdByBindingIdReturns struct { - result1 string - result2 error - } - getAppIdByBindingIdReturnsOnCall map[int]struct { - result1 string - result2 error - } - GetAppIdsByInstanceIdStub func(context.Context, string) ([]string, error) - getAppIdsByInstanceIdMutex sync.RWMutex - getAppIdsByInstanceIdArgsForCall []struct { - arg1 context.Context - arg2 string - } - getAppIdsByInstanceIdReturns struct { - result1 []string - result2 error - } - getAppIdsByInstanceIdReturnsOnCall map[int]struct { - result1 []string - result2 error - } - GetBindingIdsByInstanceIdStub func(context.Context, string) ([]string, error) - getBindingIdsByInstanceIdMutex sync.RWMutex - getBindingIdsByInstanceIdArgsForCall []struct { - arg1 context.Context - arg2 string - } - getBindingIdsByInstanceIdReturns struct { - result1 []string - result2 error - } - getBindingIdsByInstanceIdReturnsOnCall map[int]struct { - result1 []string - result2 error - } - GetDBStatusStub func() sql.DBStats - getDBStatusMutex sync.RWMutex - getDBStatusArgsForCall []struct { - } - getDBStatusReturns struct { - result1 sql.DBStats - } - getDBStatusReturnsOnCall map[int]struct { - result1 sql.DBStats - } - GetServiceBindingStub func(context.Context, string) (*models.ServiceBinding, error) - getServiceBindingMutex sync.RWMutex - getServiceBindingArgsForCall []struct { - arg1 context.Context - arg2 string - } - getServiceBindingReturns struct { - result1 *models.ServiceBinding - result2 error - } - getServiceBindingReturnsOnCall map[int]struct { - result1 *models.ServiceBinding - result2 error - } - GetServiceInstanceStub func(context.Context, string) (*models.ServiceInstance, error) - getServiceInstanceMutex sync.RWMutex - getServiceInstanceArgsForCall []struct { - arg1 context.Context - arg2 string - } - getServiceInstanceReturns struct { - result1 *models.ServiceInstance - result2 error - } - getServiceInstanceReturnsOnCall map[int]struct { - result1 *models.ServiceInstance - result2 error - } - GetServiceInstanceByAppIdStub func(string) (*models.ServiceInstance, error) - getServiceInstanceByAppIdMutex sync.RWMutex - getServiceInstanceByAppIdArgsForCall []struct { - arg1 string - } - getServiceInstanceByAppIdReturns struct { - result1 *models.ServiceInstance - result2 error - } - getServiceInstanceByAppIdReturnsOnCall map[int]struct { - result1 *models.ServiceInstance - result2 error - } - UpdateServiceInstanceStub func(context.Context, models.ServiceInstance) error - updateServiceInstanceMutex sync.RWMutex - updateServiceInstanceArgsForCall []struct { - arg1 context.Context - arg2 models.ServiceInstance - } - updateServiceInstanceReturns struct { - result1 error - } - updateServiceInstanceReturnsOnCall map[int]struct { - result1 error - } - invocations map[string][][]interface{} - invocationsMutex sync.RWMutex -} - -func (fake *FakeBindingDB) CheckServiceBinding(arg1 string) bool { - fake.checkServiceBindingMutex.Lock() - ret, specificReturn := fake.checkServiceBindingReturnsOnCall[len(fake.checkServiceBindingArgsForCall)] - fake.checkServiceBindingArgsForCall = append(fake.checkServiceBindingArgsForCall, struct { - arg1 string - }{arg1}) - stub := fake.CheckServiceBindingStub - fakeReturns := fake.checkServiceBindingReturns - fake.recordInvocation("CheckServiceBinding", []interface{}{arg1}) - fake.checkServiceBindingMutex.Unlock() - if stub != nil { - return stub(arg1) - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeBindingDB) CheckServiceBindingCallCount() int { - fake.checkServiceBindingMutex.RLock() - defer fake.checkServiceBindingMutex.RUnlock() - return len(fake.checkServiceBindingArgsForCall) -} - -func (fake *FakeBindingDB) CheckServiceBindingCalls(stub func(string) bool) { - fake.checkServiceBindingMutex.Lock() - defer fake.checkServiceBindingMutex.Unlock() - fake.CheckServiceBindingStub = stub -} - -func (fake *FakeBindingDB) CheckServiceBindingArgsForCall(i int) string { - fake.checkServiceBindingMutex.RLock() - defer fake.checkServiceBindingMutex.RUnlock() - argsForCall := fake.checkServiceBindingArgsForCall[i] - return argsForCall.arg1 -} - -func (fake *FakeBindingDB) CheckServiceBindingReturns(result1 bool) { - fake.checkServiceBindingMutex.Lock() - defer fake.checkServiceBindingMutex.Unlock() - fake.CheckServiceBindingStub = nil - fake.checkServiceBindingReturns = struct { - result1 bool - }{result1} -} - -func (fake *FakeBindingDB) CheckServiceBindingReturnsOnCall(i int, result1 bool) { - fake.checkServiceBindingMutex.Lock() - defer fake.checkServiceBindingMutex.Unlock() - fake.CheckServiceBindingStub = nil - if fake.checkServiceBindingReturnsOnCall == nil { - fake.checkServiceBindingReturnsOnCall = make(map[int]struct { - result1 bool - }) - } - fake.checkServiceBindingReturnsOnCall[i] = struct { - result1 bool - }{result1} -} - -func (fake *FakeBindingDB) Close() error { - fake.closeMutex.Lock() - ret, specificReturn := fake.closeReturnsOnCall[len(fake.closeArgsForCall)] - fake.closeArgsForCall = append(fake.closeArgsForCall, struct { - }{}) - stub := fake.CloseStub - fakeReturns := fake.closeReturns - fake.recordInvocation("Close", []interface{}{}) - fake.closeMutex.Unlock() - if stub != nil { - return stub() - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeBindingDB) CloseCallCount() int { - fake.closeMutex.RLock() - defer fake.closeMutex.RUnlock() - return len(fake.closeArgsForCall) -} - -func (fake *FakeBindingDB) CloseCalls(stub func() error) { - fake.closeMutex.Lock() - defer fake.closeMutex.Unlock() - fake.CloseStub = stub -} - -func (fake *FakeBindingDB) CloseReturns(result1 error) { - fake.closeMutex.Lock() - defer fake.closeMutex.Unlock() - fake.CloseStub = nil - fake.closeReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeBindingDB) CloseReturnsOnCall(i int, result1 error) { - fake.closeMutex.Lock() - defer fake.closeMutex.Unlock() - fake.CloseStub = nil - if fake.closeReturnsOnCall == nil { - fake.closeReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.closeReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakeBindingDB) CountServiceInstancesInOrg(arg1 string) (int, error) { - fake.countServiceInstancesInOrgMutex.Lock() - ret, specificReturn := fake.countServiceInstancesInOrgReturnsOnCall[len(fake.countServiceInstancesInOrgArgsForCall)] - fake.countServiceInstancesInOrgArgsForCall = append(fake.countServiceInstancesInOrgArgsForCall, struct { - arg1 string - }{arg1}) - stub := fake.CountServiceInstancesInOrgStub - fakeReturns := fake.countServiceInstancesInOrgReturns - fake.recordInvocation("CountServiceInstancesInOrg", []interface{}{arg1}) - fake.countServiceInstancesInOrgMutex.Unlock() - if stub != nil { - return stub(arg1) - } - if specificReturn { - return ret.result1, ret.result2 - } - return fakeReturns.result1, fakeReturns.result2 -} - -func (fake *FakeBindingDB) CountServiceInstancesInOrgCallCount() int { - fake.countServiceInstancesInOrgMutex.RLock() - defer fake.countServiceInstancesInOrgMutex.RUnlock() - return len(fake.countServiceInstancesInOrgArgsForCall) -} - -func (fake *FakeBindingDB) CountServiceInstancesInOrgCalls(stub func(string) (int, error)) { - fake.countServiceInstancesInOrgMutex.Lock() - defer fake.countServiceInstancesInOrgMutex.Unlock() - fake.CountServiceInstancesInOrgStub = stub -} - -func (fake *FakeBindingDB) CountServiceInstancesInOrgArgsForCall(i int) string { - fake.countServiceInstancesInOrgMutex.RLock() - defer fake.countServiceInstancesInOrgMutex.RUnlock() - argsForCall := fake.countServiceInstancesInOrgArgsForCall[i] - return argsForCall.arg1 -} - -func (fake *FakeBindingDB) CountServiceInstancesInOrgReturns(result1 int, result2 error) { - fake.countServiceInstancesInOrgMutex.Lock() - defer fake.countServiceInstancesInOrgMutex.Unlock() - fake.CountServiceInstancesInOrgStub = nil - fake.countServiceInstancesInOrgReturns = struct { - result1 int - result2 error - }{result1, result2} -} - -func (fake *FakeBindingDB) CountServiceInstancesInOrgReturnsOnCall(i int, result1 int, result2 error) { - fake.countServiceInstancesInOrgMutex.Lock() - defer fake.countServiceInstancesInOrgMutex.Unlock() - fake.CountServiceInstancesInOrgStub = nil - if fake.countServiceInstancesInOrgReturnsOnCall == nil { - fake.countServiceInstancesInOrgReturnsOnCall = make(map[int]struct { - result1 int - result2 error - }) - } - fake.countServiceInstancesInOrgReturnsOnCall[i] = struct { - result1 int - result2 error - }{result1, result2} -} - -func (fake *FakeBindingDB) CreateServiceBinding(arg1 context.Context, arg2 string, arg3 string, arg4 string) error { - fake.createServiceBindingMutex.Lock() - ret, specificReturn := fake.createServiceBindingReturnsOnCall[len(fake.createServiceBindingArgsForCall)] - fake.createServiceBindingArgsForCall = append(fake.createServiceBindingArgsForCall, struct { - arg1 context.Context - arg2 string - arg3 string - arg4 string - }{arg1, arg2, arg3, arg4}) - stub := fake.CreateServiceBindingStub - fakeReturns := fake.createServiceBindingReturns - fake.recordInvocation("CreateServiceBinding", []interface{}{arg1, arg2, arg3, arg4}) - fake.createServiceBindingMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3, arg4) - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeBindingDB) CreateServiceBindingCallCount() int { - fake.createServiceBindingMutex.RLock() - defer fake.createServiceBindingMutex.RUnlock() - return len(fake.createServiceBindingArgsForCall) -} - -func (fake *FakeBindingDB) CreateServiceBindingCalls(stub func(context.Context, string, string, string) error) { - fake.createServiceBindingMutex.Lock() - defer fake.createServiceBindingMutex.Unlock() - fake.CreateServiceBindingStub = stub -} - -func (fake *FakeBindingDB) CreateServiceBindingArgsForCall(i int) (context.Context, string, string, string) { - fake.createServiceBindingMutex.RLock() - defer fake.createServiceBindingMutex.RUnlock() - argsForCall := fake.createServiceBindingArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3, argsForCall.arg4 -} - -func (fake *FakeBindingDB) CreateServiceBindingReturns(result1 error) { - fake.createServiceBindingMutex.Lock() - defer fake.createServiceBindingMutex.Unlock() - fake.CreateServiceBindingStub = nil - fake.createServiceBindingReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeBindingDB) CreateServiceBindingReturnsOnCall(i int, result1 error) { - fake.createServiceBindingMutex.Lock() - defer fake.createServiceBindingMutex.Unlock() - fake.CreateServiceBindingStub = nil - if fake.createServiceBindingReturnsOnCall == nil { - fake.createServiceBindingReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.createServiceBindingReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakeBindingDB) CreateServiceInstance(arg1 context.Context, arg2 models.ServiceInstance) error { - fake.createServiceInstanceMutex.Lock() - ret, specificReturn := fake.createServiceInstanceReturnsOnCall[len(fake.createServiceInstanceArgsForCall)] - fake.createServiceInstanceArgsForCall = append(fake.createServiceInstanceArgsForCall, struct { - arg1 context.Context - arg2 models.ServiceInstance - }{arg1, arg2}) - stub := fake.CreateServiceInstanceStub - fakeReturns := fake.createServiceInstanceReturns - fake.recordInvocation("CreateServiceInstance", []interface{}{arg1, arg2}) - fake.createServiceInstanceMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeBindingDB) CreateServiceInstanceCallCount() int { - fake.createServiceInstanceMutex.RLock() - defer fake.createServiceInstanceMutex.RUnlock() - return len(fake.createServiceInstanceArgsForCall) -} - -func (fake *FakeBindingDB) CreateServiceInstanceCalls(stub func(context.Context, models.ServiceInstance) error) { - fake.createServiceInstanceMutex.Lock() - defer fake.createServiceInstanceMutex.Unlock() - fake.CreateServiceInstanceStub = stub -} - -func (fake *FakeBindingDB) CreateServiceInstanceArgsForCall(i int) (context.Context, models.ServiceInstance) { - fake.createServiceInstanceMutex.RLock() - defer fake.createServiceInstanceMutex.RUnlock() - argsForCall := fake.createServiceInstanceArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2 -} - -func (fake *FakeBindingDB) CreateServiceInstanceReturns(result1 error) { - fake.createServiceInstanceMutex.Lock() - defer fake.createServiceInstanceMutex.Unlock() - fake.CreateServiceInstanceStub = nil - fake.createServiceInstanceReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeBindingDB) CreateServiceInstanceReturnsOnCall(i int, result1 error) { - fake.createServiceInstanceMutex.Lock() - defer fake.createServiceInstanceMutex.Unlock() - fake.CreateServiceInstanceStub = nil - if fake.createServiceInstanceReturnsOnCall == nil { - fake.createServiceInstanceReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.createServiceInstanceReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakeBindingDB) DeleteServiceBinding(arg1 context.Context, arg2 string) error { - fake.deleteServiceBindingMutex.Lock() - ret, specificReturn := fake.deleteServiceBindingReturnsOnCall[len(fake.deleteServiceBindingArgsForCall)] - fake.deleteServiceBindingArgsForCall = append(fake.deleteServiceBindingArgsForCall, struct { - arg1 context.Context - arg2 string - }{arg1, arg2}) - stub := fake.DeleteServiceBindingStub - fakeReturns := fake.deleteServiceBindingReturns - fake.recordInvocation("DeleteServiceBinding", []interface{}{arg1, arg2}) - fake.deleteServiceBindingMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeBindingDB) DeleteServiceBindingCallCount() int { - fake.deleteServiceBindingMutex.RLock() - defer fake.deleteServiceBindingMutex.RUnlock() - return len(fake.deleteServiceBindingArgsForCall) -} - -func (fake *FakeBindingDB) DeleteServiceBindingCalls(stub func(context.Context, string) error) { - fake.deleteServiceBindingMutex.Lock() - defer fake.deleteServiceBindingMutex.Unlock() - fake.DeleteServiceBindingStub = stub -} - -func (fake *FakeBindingDB) DeleteServiceBindingArgsForCall(i int) (context.Context, string) { - fake.deleteServiceBindingMutex.RLock() - defer fake.deleteServiceBindingMutex.RUnlock() - argsForCall := fake.deleteServiceBindingArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2 -} - -func (fake *FakeBindingDB) DeleteServiceBindingReturns(result1 error) { - fake.deleteServiceBindingMutex.Lock() - defer fake.deleteServiceBindingMutex.Unlock() - fake.DeleteServiceBindingStub = nil - fake.deleteServiceBindingReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeBindingDB) DeleteServiceBindingReturnsOnCall(i int, result1 error) { - fake.deleteServiceBindingMutex.Lock() - defer fake.deleteServiceBindingMutex.Unlock() - fake.DeleteServiceBindingStub = nil - if fake.deleteServiceBindingReturnsOnCall == nil { - fake.deleteServiceBindingReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.deleteServiceBindingReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakeBindingDB) DeleteServiceBindingByAppId(arg1 context.Context, arg2 string) error { - fake.deleteServiceBindingByAppIdMutex.Lock() - ret, specificReturn := fake.deleteServiceBindingByAppIdReturnsOnCall[len(fake.deleteServiceBindingByAppIdArgsForCall)] - fake.deleteServiceBindingByAppIdArgsForCall = append(fake.deleteServiceBindingByAppIdArgsForCall, struct { - arg1 context.Context - arg2 string - }{arg1, arg2}) - stub := fake.DeleteServiceBindingByAppIdStub - fakeReturns := fake.deleteServiceBindingByAppIdReturns - fake.recordInvocation("DeleteServiceBindingByAppId", []interface{}{arg1, arg2}) - fake.deleteServiceBindingByAppIdMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeBindingDB) DeleteServiceBindingByAppIdCallCount() int { - fake.deleteServiceBindingByAppIdMutex.RLock() - defer fake.deleteServiceBindingByAppIdMutex.RUnlock() - return len(fake.deleteServiceBindingByAppIdArgsForCall) -} - -func (fake *FakeBindingDB) DeleteServiceBindingByAppIdCalls(stub func(context.Context, string) error) { - fake.deleteServiceBindingByAppIdMutex.Lock() - defer fake.deleteServiceBindingByAppIdMutex.Unlock() - fake.DeleteServiceBindingByAppIdStub = stub -} - -func (fake *FakeBindingDB) DeleteServiceBindingByAppIdArgsForCall(i int) (context.Context, string) { - fake.deleteServiceBindingByAppIdMutex.RLock() - defer fake.deleteServiceBindingByAppIdMutex.RUnlock() - argsForCall := fake.deleteServiceBindingByAppIdArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2 -} - -func (fake *FakeBindingDB) DeleteServiceBindingByAppIdReturns(result1 error) { - fake.deleteServiceBindingByAppIdMutex.Lock() - defer fake.deleteServiceBindingByAppIdMutex.Unlock() - fake.DeleteServiceBindingByAppIdStub = nil - fake.deleteServiceBindingByAppIdReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeBindingDB) DeleteServiceBindingByAppIdReturnsOnCall(i int, result1 error) { - fake.deleteServiceBindingByAppIdMutex.Lock() - defer fake.deleteServiceBindingByAppIdMutex.Unlock() - fake.DeleteServiceBindingByAppIdStub = nil - if fake.deleteServiceBindingByAppIdReturnsOnCall == nil { - fake.deleteServiceBindingByAppIdReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.deleteServiceBindingByAppIdReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakeBindingDB) DeleteServiceInstance(arg1 context.Context, arg2 string) error { - fake.deleteServiceInstanceMutex.Lock() - ret, specificReturn := fake.deleteServiceInstanceReturnsOnCall[len(fake.deleteServiceInstanceArgsForCall)] - fake.deleteServiceInstanceArgsForCall = append(fake.deleteServiceInstanceArgsForCall, struct { - arg1 context.Context - arg2 string - }{arg1, arg2}) - stub := fake.DeleteServiceInstanceStub - fakeReturns := fake.deleteServiceInstanceReturns - fake.recordInvocation("DeleteServiceInstance", []interface{}{arg1, arg2}) - fake.deleteServiceInstanceMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeBindingDB) DeleteServiceInstanceCallCount() int { - fake.deleteServiceInstanceMutex.RLock() - defer fake.deleteServiceInstanceMutex.RUnlock() - return len(fake.deleteServiceInstanceArgsForCall) -} - -func (fake *FakeBindingDB) DeleteServiceInstanceCalls(stub func(context.Context, string) error) { - fake.deleteServiceInstanceMutex.Lock() - defer fake.deleteServiceInstanceMutex.Unlock() - fake.DeleteServiceInstanceStub = stub -} - -func (fake *FakeBindingDB) DeleteServiceInstanceArgsForCall(i int) (context.Context, string) { - fake.deleteServiceInstanceMutex.RLock() - defer fake.deleteServiceInstanceMutex.RUnlock() - argsForCall := fake.deleteServiceInstanceArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2 -} - -func (fake *FakeBindingDB) DeleteServiceInstanceReturns(result1 error) { - fake.deleteServiceInstanceMutex.Lock() - defer fake.deleteServiceInstanceMutex.Unlock() - fake.DeleteServiceInstanceStub = nil - fake.deleteServiceInstanceReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeBindingDB) DeleteServiceInstanceReturnsOnCall(i int, result1 error) { - fake.deleteServiceInstanceMutex.Lock() - defer fake.deleteServiceInstanceMutex.Unlock() - fake.DeleteServiceInstanceStub = nil - if fake.deleteServiceInstanceReturnsOnCall == nil { - fake.deleteServiceInstanceReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.deleteServiceInstanceReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakeBindingDB) GetAppIdByBindingId(arg1 context.Context, arg2 string) (string, error) { - fake.getAppIdByBindingIdMutex.Lock() - ret, specificReturn := fake.getAppIdByBindingIdReturnsOnCall[len(fake.getAppIdByBindingIdArgsForCall)] - fake.getAppIdByBindingIdArgsForCall = append(fake.getAppIdByBindingIdArgsForCall, struct { - arg1 context.Context - arg2 string - }{arg1, arg2}) - stub := fake.GetAppIdByBindingIdStub - fakeReturns := fake.getAppIdByBindingIdReturns - fake.recordInvocation("GetAppIdByBindingId", []interface{}{arg1, arg2}) - fake.getAppIdByBindingIdMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) - } - if specificReturn { - return ret.result1, ret.result2 - } - return fakeReturns.result1, fakeReturns.result2 -} - -func (fake *FakeBindingDB) GetAppIdByBindingIdCallCount() int { - fake.getAppIdByBindingIdMutex.RLock() - defer fake.getAppIdByBindingIdMutex.RUnlock() - return len(fake.getAppIdByBindingIdArgsForCall) -} - -func (fake *FakeBindingDB) GetAppIdByBindingIdCalls(stub func(context.Context, string) (string, error)) { - fake.getAppIdByBindingIdMutex.Lock() - defer fake.getAppIdByBindingIdMutex.Unlock() - fake.GetAppIdByBindingIdStub = stub -} - -func (fake *FakeBindingDB) GetAppIdByBindingIdArgsForCall(i int) (context.Context, string) { - fake.getAppIdByBindingIdMutex.RLock() - defer fake.getAppIdByBindingIdMutex.RUnlock() - argsForCall := fake.getAppIdByBindingIdArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2 -} - -func (fake *FakeBindingDB) GetAppIdByBindingIdReturns(result1 string, result2 error) { - fake.getAppIdByBindingIdMutex.Lock() - defer fake.getAppIdByBindingIdMutex.Unlock() - fake.GetAppIdByBindingIdStub = nil - fake.getAppIdByBindingIdReturns = struct { - result1 string - result2 error - }{result1, result2} -} - -func (fake *FakeBindingDB) GetAppIdByBindingIdReturnsOnCall(i int, result1 string, result2 error) { - fake.getAppIdByBindingIdMutex.Lock() - defer fake.getAppIdByBindingIdMutex.Unlock() - fake.GetAppIdByBindingIdStub = nil - if fake.getAppIdByBindingIdReturnsOnCall == nil { - fake.getAppIdByBindingIdReturnsOnCall = make(map[int]struct { - result1 string - result2 error - }) - } - fake.getAppIdByBindingIdReturnsOnCall[i] = struct { - result1 string - result2 error - }{result1, result2} -} - -func (fake *FakeBindingDB) GetAppIdsByInstanceId(arg1 context.Context, arg2 string) ([]string, error) { - fake.getAppIdsByInstanceIdMutex.Lock() - ret, specificReturn := fake.getAppIdsByInstanceIdReturnsOnCall[len(fake.getAppIdsByInstanceIdArgsForCall)] - fake.getAppIdsByInstanceIdArgsForCall = append(fake.getAppIdsByInstanceIdArgsForCall, struct { - arg1 context.Context - arg2 string - }{arg1, arg2}) - stub := fake.GetAppIdsByInstanceIdStub - fakeReturns := fake.getAppIdsByInstanceIdReturns - fake.recordInvocation("GetAppIdsByInstanceId", []interface{}{arg1, arg2}) - fake.getAppIdsByInstanceIdMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) - } - if specificReturn { - return ret.result1, ret.result2 - } - return fakeReturns.result1, fakeReturns.result2 -} - -func (fake *FakeBindingDB) GetAppIdsByInstanceIdCallCount() int { - fake.getAppIdsByInstanceIdMutex.RLock() - defer fake.getAppIdsByInstanceIdMutex.RUnlock() - return len(fake.getAppIdsByInstanceIdArgsForCall) -} - -func (fake *FakeBindingDB) GetAppIdsByInstanceIdCalls(stub func(context.Context, string) ([]string, error)) { - fake.getAppIdsByInstanceIdMutex.Lock() - defer fake.getAppIdsByInstanceIdMutex.Unlock() - fake.GetAppIdsByInstanceIdStub = stub -} - -func (fake *FakeBindingDB) GetAppIdsByInstanceIdArgsForCall(i int) (context.Context, string) { - fake.getAppIdsByInstanceIdMutex.RLock() - defer fake.getAppIdsByInstanceIdMutex.RUnlock() - argsForCall := fake.getAppIdsByInstanceIdArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2 -} - -func (fake *FakeBindingDB) GetAppIdsByInstanceIdReturns(result1 []string, result2 error) { - fake.getAppIdsByInstanceIdMutex.Lock() - defer fake.getAppIdsByInstanceIdMutex.Unlock() - fake.GetAppIdsByInstanceIdStub = nil - fake.getAppIdsByInstanceIdReturns = struct { - result1 []string - result2 error - }{result1, result2} -} - -func (fake *FakeBindingDB) GetAppIdsByInstanceIdReturnsOnCall(i int, result1 []string, result2 error) { - fake.getAppIdsByInstanceIdMutex.Lock() - defer fake.getAppIdsByInstanceIdMutex.Unlock() - fake.GetAppIdsByInstanceIdStub = nil - if fake.getAppIdsByInstanceIdReturnsOnCall == nil { - fake.getAppIdsByInstanceIdReturnsOnCall = make(map[int]struct { - result1 []string - result2 error - }) - } - fake.getAppIdsByInstanceIdReturnsOnCall[i] = struct { - result1 []string - result2 error - }{result1, result2} -} - -func (fake *FakeBindingDB) GetBindingIdsByInstanceId(arg1 context.Context, arg2 string) ([]string, error) { - fake.getBindingIdsByInstanceIdMutex.Lock() - ret, specificReturn := fake.getBindingIdsByInstanceIdReturnsOnCall[len(fake.getBindingIdsByInstanceIdArgsForCall)] - fake.getBindingIdsByInstanceIdArgsForCall = append(fake.getBindingIdsByInstanceIdArgsForCall, struct { - arg1 context.Context - arg2 string - }{arg1, arg2}) - stub := fake.GetBindingIdsByInstanceIdStub - fakeReturns := fake.getBindingIdsByInstanceIdReturns - fake.recordInvocation("GetBindingIdsByInstanceId", []interface{}{arg1, arg2}) - fake.getBindingIdsByInstanceIdMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) - } - if specificReturn { - return ret.result1, ret.result2 - } - return fakeReturns.result1, fakeReturns.result2 -} - -func (fake *FakeBindingDB) GetBindingIdsByInstanceIdCallCount() int { - fake.getBindingIdsByInstanceIdMutex.RLock() - defer fake.getBindingIdsByInstanceIdMutex.RUnlock() - return len(fake.getBindingIdsByInstanceIdArgsForCall) -} - -func (fake *FakeBindingDB) GetBindingIdsByInstanceIdCalls(stub func(context.Context, string) ([]string, error)) { - fake.getBindingIdsByInstanceIdMutex.Lock() - defer fake.getBindingIdsByInstanceIdMutex.Unlock() - fake.GetBindingIdsByInstanceIdStub = stub -} - -func (fake *FakeBindingDB) GetBindingIdsByInstanceIdArgsForCall(i int) (context.Context, string) { - fake.getBindingIdsByInstanceIdMutex.RLock() - defer fake.getBindingIdsByInstanceIdMutex.RUnlock() - argsForCall := fake.getBindingIdsByInstanceIdArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2 -} - -func (fake *FakeBindingDB) GetBindingIdsByInstanceIdReturns(result1 []string, result2 error) { - fake.getBindingIdsByInstanceIdMutex.Lock() - defer fake.getBindingIdsByInstanceIdMutex.Unlock() - fake.GetBindingIdsByInstanceIdStub = nil - fake.getBindingIdsByInstanceIdReturns = struct { - result1 []string - result2 error - }{result1, result2} -} - -func (fake *FakeBindingDB) GetBindingIdsByInstanceIdReturnsOnCall(i int, result1 []string, result2 error) { - fake.getBindingIdsByInstanceIdMutex.Lock() - defer fake.getBindingIdsByInstanceIdMutex.Unlock() - fake.GetBindingIdsByInstanceIdStub = nil - if fake.getBindingIdsByInstanceIdReturnsOnCall == nil { - fake.getBindingIdsByInstanceIdReturnsOnCall = make(map[int]struct { - result1 []string - result2 error - }) - } - fake.getBindingIdsByInstanceIdReturnsOnCall[i] = struct { - result1 []string - result2 error - }{result1, result2} -} - -func (fake *FakeBindingDB) GetDBStatus() sql.DBStats { - fake.getDBStatusMutex.Lock() - ret, specificReturn := fake.getDBStatusReturnsOnCall[len(fake.getDBStatusArgsForCall)] - fake.getDBStatusArgsForCall = append(fake.getDBStatusArgsForCall, struct { - }{}) - stub := fake.GetDBStatusStub - fakeReturns := fake.getDBStatusReturns - fake.recordInvocation("GetDBStatus", []interface{}{}) - fake.getDBStatusMutex.Unlock() - if stub != nil { - return stub() - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeBindingDB) GetDBStatusCallCount() int { - fake.getDBStatusMutex.RLock() - defer fake.getDBStatusMutex.RUnlock() - return len(fake.getDBStatusArgsForCall) -} - -func (fake *FakeBindingDB) GetDBStatusCalls(stub func() sql.DBStats) { - fake.getDBStatusMutex.Lock() - defer fake.getDBStatusMutex.Unlock() - fake.GetDBStatusStub = stub -} - -func (fake *FakeBindingDB) GetDBStatusReturns(result1 sql.DBStats) { - fake.getDBStatusMutex.Lock() - defer fake.getDBStatusMutex.Unlock() - fake.GetDBStatusStub = nil - fake.getDBStatusReturns = struct { - result1 sql.DBStats - }{result1} -} - -func (fake *FakeBindingDB) GetDBStatusReturnsOnCall(i int, result1 sql.DBStats) { - fake.getDBStatusMutex.Lock() - defer fake.getDBStatusMutex.Unlock() - fake.GetDBStatusStub = nil - if fake.getDBStatusReturnsOnCall == nil { - fake.getDBStatusReturnsOnCall = make(map[int]struct { - result1 sql.DBStats - }) - } - fake.getDBStatusReturnsOnCall[i] = struct { - result1 sql.DBStats - }{result1} -} - -func (fake *FakeBindingDB) GetServiceBinding(arg1 context.Context, arg2 string) (*models.ServiceBinding, error) { - fake.getServiceBindingMutex.Lock() - ret, specificReturn := fake.getServiceBindingReturnsOnCall[len(fake.getServiceBindingArgsForCall)] - fake.getServiceBindingArgsForCall = append(fake.getServiceBindingArgsForCall, struct { - arg1 context.Context - arg2 string - }{arg1, arg2}) - stub := fake.GetServiceBindingStub - fakeReturns := fake.getServiceBindingReturns - fake.recordInvocation("GetServiceBinding", []interface{}{arg1, arg2}) - fake.getServiceBindingMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) - } - if specificReturn { - return ret.result1, ret.result2 - } - return fakeReturns.result1, fakeReturns.result2 -} - -func (fake *FakeBindingDB) GetServiceBindingCallCount() int { - fake.getServiceBindingMutex.RLock() - defer fake.getServiceBindingMutex.RUnlock() - return len(fake.getServiceBindingArgsForCall) -} - -func (fake *FakeBindingDB) GetServiceBindingCalls(stub func(context.Context, string) (*models.ServiceBinding, error)) { - fake.getServiceBindingMutex.Lock() - defer fake.getServiceBindingMutex.Unlock() - fake.GetServiceBindingStub = stub -} - -func (fake *FakeBindingDB) GetServiceBindingArgsForCall(i int) (context.Context, string) { - fake.getServiceBindingMutex.RLock() - defer fake.getServiceBindingMutex.RUnlock() - argsForCall := fake.getServiceBindingArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2 -} - -func (fake *FakeBindingDB) GetServiceBindingReturns(result1 *models.ServiceBinding, result2 error) { - fake.getServiceBindingMutex.Lock() - defer fake.getServiceBindingMutex.Unlock() - fake.GetServiceBindingStub = nil - fake.getServiceBindingReturns = struct { - result1 *models.ServiceBinding - result2 error - }{result1, result2} -} - -func (fake *FakeBindingDB) GetServiceBindingReturnsOnCall(i int, result1 *models.ServiceBinding, result2 error) { - fake.getServiceBindingMutex.Lock() - defer fake.getServiceBindingMutex.Unlock() - fake.GetServiceBindingStub = nil - if fake.getServiceBindingReturnsOnCall == nil { - fake.getServiceBindingReturnsOnCall = make(map[int]struct { - result1 *models.ServiceBinding - result2 error - }) - } - fake.getServiceBindingReturnsOnCall[i] = struct { - result1 *models.ServiceBinding - result2 error - }{result1, result2} -} - -func (fake *FakeBindingDB) GetServiceInstance(arg1 context.Context, arg2 string) (*models.ServiceInstance, error) { - fake.getServiceInstanceMutex.Lock() - ret, specificReturn := fake.getServiceInstanceReturnsOnCall[len(fake.getServiceInstanceArgsForCall)] - fake.getServiceInstanceArgsForCall = append(fake.getServiceInstanceArgsForCall, struct { - arg1 context.Context - arg2 string - }{arg1, arg2}) - stub := fake.GetServiceInstanceStub - fakeReturns := fake.getServiceInstanceReturns - fake.recordInvocation("GetServiceInstance", []interface{}{arg1, arg2}) - fake.getServiceInstanceMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) - } - if specificReturn { - return ret.result1, ret.result2 - } - return fakeReturns.result1, fakeReturns.result2 -} - -func (fake *FakeBindingDB) GetServiceInstanceCallCount() int { - fake.getServiceInstanceMutex.RLock() - defer fake.getServiceInstanceMutex.RUnlock() - return len(fake.getServiceInstanceArgsForCall) -} - -func (fake *FakeBindingDB) GetServiceInstanceCalls(stub func(context.Context, string) (*models.ServiceInstance, error)) { - fake.getServiceInstanceMutex.Lock() - defer fake.getServiceInstanceMutex.Unlock() - fake.GetServiceInstanceStub = stub -} - -func (fake *FakeBindingDB) GetServiceInstanceArgsForCall(i int) (context.Context, string) { - fake.getServiceInstanceMutex.RLock() - defer fake.getServiceInstanceMutex.RUnlock() - argsForCall := fake.getServiceInstanceArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2 -} - -func (fake *FakeBindingDB) GetServiceInstanceReturns(result1 *models.ServiceInstance, result2 error) { - fake.getServiceInstanceMutex.Lock() - defer fake.getServiceInstanceMutex.Unlock() - fake.GetServiceInstanceStub = nil - fake.getServiceInstanceReturns = struct { - result1 *models.ServiceInstance - result2 error - }{result1, result2} -} - -func (fake *FakeBindingDB) GetServiceInstanceReturnsOnCall(i int, result1 *models.ServiceInstance, result2 error) { - fake.getServiceInstanceMutex.Lock() - defer fake.getServiceInstanceMutex.Unlock() - fake.GetServiceInstanceStub = nil - if fake.getServiceInstanceReturnsOnCall == nil { - fake.getServiceInstanceReturnsOnCall = make(map[int]struct { - result1 *models.ServiceInstance - result2 error - }) - } - fake.getServiceInstanceReturnsOnCall[i] = struct { - result1 *models.ServiceInstance - result2 error - }{result1, result2} -} - -func (fake *FakeBindingDB) GetServiceInstanceByAppId(arg1 string) (*models.ServiceInstance, error) { - fake.getServiceInstanceByAppIdMutex.Lock() - ret, specificReturn := fake.getServiceInstanceByAppIdReturnsOnCall[len(fake.getServiceInstanceByAppIdArgsForCall)] - fake.getServiceInstanceByAppIdArgsForCall = append(fake.getServiceInstanceByAppIdArgsForCall, struct { - arg1 string - }{arg1}) - stub := fake.GetServiceInstanceByAppIdStub - fakeReturns := fake.getServiceInstanceByAppIdReturns - fake.recordInvocation("GetServiceInstanceByAppId", []interface{}{arg1}) - fake.getServiceInstanceByAppIdMutex.Unlock() - if stub != nil { - return stub(arg1) - } - if specificReturn { - return ret.result1, ret.result2 - } - return fakeReturns.result1, fakeReturns.result2 -} - -func (fake *FakeBindingDB) GetServiceInstanceByAppIdCallCount() int { - fake.getServiceInstanceByAppIdMutex.RLock() - defer fake.getServiceInstanceByAppIdMutex.RUnlock() - return len(fake.getServiceInstanceByAppIdArgsForCall) -} - -func (fake *FakeBindingDB) GetServiceInstanceByAppIdCalls(stub func(string) (*models.ServiceInstance, error)) { - fake.getServiceInstanceByAppIdMutex.Lock() - defer fake.getServiceInstanceByAppIdMutex.Unlock() - fake.GetServiceInstanceByAppIdStub = stub -} - -func (fake *FakeBindingDB) GetServiceInstanceByAppIdArgsForCall(i int) string { - fake.getServiceInstanceByAppIdMutex.RLock() - defer fake.getServiceInstanceByAppIdMutex.RUnlock() - argsForCall := fake.getServiceInstanceByAppIdArgsForCall[i] - return argsForCall.arg1 -} - -func (fake *FakeBindingDB) GetServiceInstanceByAppIdReturns(result1 *models.ServiceInstance, result2 error) { - fake.getServiceInstanceByAppIdMutex.Lock() - defer fake.getServiceInstanceByAppIdMutex.Unlock() - fake.GetServiceInstanceByAppIdStub = nil - fake.getServiceInstanceByAppIdReturns = struct { - result1 *models.ServiceInstance - result2 error - }{result1, result2} -} - -func (fake *FakeBindingDB) GetServiceInstanceByAppIdReturnsOnCall(i int, result1 *models.ServiceInstance, result2 error) { - fake.getServiceInstanceByAppIdMutex.Lock() - defer fake.getServiceInstanceByAppIdMutex.Unlock() - fake.GetServiceInstanceByAppIdStub = nil - if fake.getServiceInstanceByAppIdReturnsOnCall == nil { - fake.getServiceInstanceByAppIdReturnsOnCall = make(map[int]struct { - result1 *models.ServiceInstance - result2 error - }) - } - fake.getServiceInstanceByAppIdReturnsOnCall[i] = struct { - result1 *models.ServiceInstance - result2 error - }{result1, result2} -} - -func (fake *FakeBindingDB) UpdateServiceInstance(arg1 context.Context, arg2 models.ServiceInstance) error { - fake.updateServiceInstanceMutex.Lock() - ret, specificReturn := fake.updateServiceInstanceReturnsOnCall[len(fake.updateServiceInstanceArgsForCall)] - fake.updateServiceInstanceArgsForCall = append(fake.updateServiceInstanceArgsForCall, struct { - arg1 context.Context - arg2 models.ServiceInstance - }{arg1, arg2}) - stub := fake.UpdateServiceInstanceStub - fakeReturns := fake.updateServiceInstanceReturns - fake.recordInvocation("UpdateServiceInstance", []interface{}{arg1, arg2}) - fake.updateServiceInstanceMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeBindingDB) UpdateServiceInstanceCallCount() int { - fake.updateServiceInstanceMutex.RLock() - defer fake.updateServiceInstanceMutex.RUnlock() - return len(fake.updateServiceInstanceArgsForCall) -} - -func (fake *FakeBindingDB) UpdateServiceInstanceCalls(stub func(context.Context, models.ServiceInstance) error) { - fake.updateServiceInstanceMutex.Lock() - defer fake.updateServiceInstanceMutex.Unlock() - fake.UpdateServiceInstanceStub = stub -} - -func (fake *FakeBindingDB) UpdateServiceInstanceArgsForCall(i int) (context.Context, models.ServiceInstance) { - fake.updateServiceInstanceMutex.RLock() - defer fake.updateServiceInstanceMutex.RUnlock() - argsForCall := fake.updateServiceInstanceArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2 -} - -func (fake *FakeBindingDB) UpdateServiceInstanceReturns(result1 error) { - fake.updateServiceInstanceMutex.Lock() - defer fake.updateServiceInstanceMutex.Unlock() - fake.UpdateServiceInstanceStub = nil - fake.updateServiceInstanceReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeBindingDB) UpdateServiceInstanceReturnsOnCall(i int, result1 error) { - fake.updateServiceInstanceMutex.Lock() - defer fake.updateServiceInstanceMutex.Unlock() - fake.UpdateServiceInstanceStub = nil - if fake.updateServiceInstanceReturnsOnCall == nil { - fake.updateServiceInstanceReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.updateServiceInstanceReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakeBindingDB) Invocations() map[string][][]interface{} { - fake.invocationsMutex.RLock() - defer fake.invocationsMutex.RUnlock() - fake.checkServiceBindingMutex.RLock() - defer fake.checkServiceBindingMutex.RUnlock() - fake.closeMutex.RLock() - defer fake.closeMutex.RUnlock() - fake.countServiceInstancesInOrgMutex.RLock() - defer fake.countServiceInstancesInOrgMutex.RUnlock() - fake.createServiceBindingMutex.RLock() - defer fake.createServiceBindingMutex.RUnlock() - fake.createServiceInstanceMutex.RLock() - defer fake.createServiceInstanceMutex.RUnlock() - fake.deleteServiceBindingMutex.RLock() - defer fake.deleteServiceBindingMutex.RUnlock() - fake.deleteServiceBindingByAppIdMutex.RLock() - defer fake.deleteServiceBindingByAppIdMutex.RUnlock() - fake.deleteServiceInstanceMutex.RLock() - defer fake.deleteServiceInstanceMutex.RUnlock() - fake.getAppIdByBindingIdMutex.RLock() - defer fake.getAppIdByBindingIdMutex.RUnlock() - fake.getAppIdsByInstanceIdMutex.RLock() - defer fake.getAppIdsByInstanceIdMutex.RUnlock() - fake.getBindingIdsByInstanceIdMutex.RLock() - defer fake.getBindingIdsByInstanceIdMutex.RUnlock() - fake.getDBStatusMutex.RLock() - defer fake.getDBStatusMutex.RUnlock() - fake.getServiceBindingMutex.RLock() - defer fake.getServiceBindingMutex.RUnlock() - fake.getServiceInstanceMutex.RLock() - defer fake.getServiceInstanceMutex.RUnlock() - fake.getServiceInstanceByAppIdMutex.RLock() - defer fake.getServiceInstanceByAppIdMutex.RUnlock() - fake.updateServiceInstanceMutex.RLock() - defer fake.updateServiceInstanceMutex.RUnlock() - copiedInvocations := map[string][][]interface{}{} - for key, value := range fake.invocations { - copiedInvocations[key] = value - } - return copiedInvocations -} - -func (fake *FakeBindingDB) recordInvocation(key string, args []interface{}) { - fake.invocationsMutex.Lock() - defer fake.invocationsMutex.Unlock() - if fake.invocations == nil { - fake.invocations = map[string][][]interface{}{} - } - if fake.invocations[key] == nil { - fake.invocations[key] = [][]interface{}{} - } - fake.invocations[key] = append(fake.invocations[key], args) -} - -var _ db.BindingDB = new(FakeBindingDB) diff --git a/src/autoscaler/fakes/fake_cf_client.go b/src/autoscaler/fakes/fake_cf_client.go deleted file mode 100644 index 761c57fd52..0000000000 --- a/src/autoscaler/fakes/fake_cf_client.go +++ /dev/null @@ -1,1121 +0,0 @@ -// Code generated by counterfeiter. DO NOT EDIT. -package fakes - -import ( - "sync" - - "code.cloudfoundry.org/app-autoscaler/src/autoscaler/cf" -) - -type FakeCFClient struct { - GetAppStub func(cf.Guid) (*cf.App, error) - getAppMutex sync.RWMutex - getAppArgsForCall []struct { - arg1 cf.Guid - } - getAppReturns struct { - result1 *cf.App - result2 error - } - getAppReturnsOnCall map[int]struct { - result1 *cf.App - result2 error - } - GetAppAndProcessesStub func(cf.Guid) (*cf.AppAndProcesses, error) - getAppAndProcessesMutex sync.RWMutex - getAppAndProcessesArgsForCall []struct { - arg1 cf.Guid - } - getAppAndProcessesReturns struct { - result1 *cf.AppAndProcesses - result2 error - } - getAppAndProcessesReturnsOnCall map[int]struct { - result1 *cf.AppAndProcesses - result2 error - } - GetAppProcessesStub func(cf.Guid, ...string) (cf.Processes, error) - getAppProcessesMutex sync.RWMutex - getAppProcessesArgsForCall []struct { - arg1 cf.Guid - arg2 []string - } - getAppProcessesReturns struct { - result1 cf.Processes - result2 error - } - getAppProcessesReturnsOnCall map[int]struct { - result1 cf.Processes - result2 error - } - GetCtxClientStub func() cf.ContextClient - getCtxClientMutex sync.RWMutex - getCtxClientArgsForCall []struct { - } - getCtxClientReturns struct { - result1 cf.ContextClient - } - getCtxClientReturnsOnCall map[int]struct { - result1 cf.ContextClient - } - GetEndpointsStub func() (cf.Endpoints, error) - getEndpointsMutex sync.RWMutex - getEndpointsArgsForCall []struct { - } - getEndpointsReturns struct { - result1 cf.Endpoints - result2 error - } - getEndpointsReturnsOnCall map[int]struct { - result1 cf.Endpoints - result2 error - } - GetServiceInstanceStub func(string) (*cf.ServiceInstance, error) - getServiceInstanceMutex sync.RWMutex - getServiceInstanceArgsForCall []struct { - arg1 string - } - getServiceInstanceReturns struct { - result1 *cf.ServiceInstance - result2 error - } - getServiceInstanceReturnsOnCall map[int]struct { - result1 *cf.ServiceInstance - result2 error - } - GetServicePlanStub func(string) (*cf.ServicePlan, error) - getServicePlanMutex sync.RWMutex - getServicePlanArgsForCall []struct { - arg1 string - } - getServicePlanReturns struct { - result1 *cf.ServicePlan - result2 error - } - getServicePlanReturnsOnCall map[int]struct { - result1 *cf.ServicePlan - result2 error - } - GetTokensStub func() (cf.Tokens, error) - getTokensMutex sync.RWMutex - getTokensArgsForCall []struct { - } - getTokensReturns struct { - result1 cf.Tokens - result2 error - } - getTokensReturnsOnCall map[int]struct { - result1 cf.Tokens - result2 error - } - InvalidateTokenStub func() - invalidateTokenMutex sync.RWMutex - invalidateTokenArgsForCall []struct { - } - IsTokenAuthorizedStub func(string, string) (bool, error) - isTokenAuthorizedMutex sync.RWMutex - isTokenAuthorizedArgsForCall []struct { - arg1 string - arg2 string - } - isTokenAuthorizedReturns struct { - result1 bool - result2 error - } - isTokenAuthorizedReturnsOnCall map[int]struct { - result1 bool - result2 error - } - IsUserAdminStub func(string) (bool, error) - isUserAdminMutex sync.RWMutex - isUserAdminArgsForCall []struct { - arg1 string - } - isUserAdminReturns struct { - result1 bool - result2 error - } - isUserAdminReturnsOnCall map[int]struct { - result1 bool - result2 error - } - IsUserSpaceDeveloperStub func(string, cf.Guid) (bool, error) - isUserSpaceDeveloperMutex sync.RWMutex - isUserSpaceDeveloperArgsForCall []struct { - arg1 string - arg2 cf.Guid - } - isUserSpaceDeveloperReturns struct { - result1 bool - result2 error - } - isUserSpaceDeveloperReturnsOnCall map[int]struct { - result1 bool - result2 error - } - LoginStub func() error - loginMutex sync.RWMutex - loginArgsForCall []struct { - } - loginReturns struct { - result1 error - } - loginReturnsOnCall map[int]struct { - result1 error - } - RefreshAuthTokenStub func() (cf.Tokens, error) - refreshAuthTokenMutex sync.RWMutex - refreshAuthTokenArgsForCall []struct { - } - refreshAuthTokenReturns struct { - result1 cf.Tokens - result2 error - } - refreshAuthTokenReturnsOnCall map[int]struct { - result1 cf.Tokens - result2 error - } - ScaleAppWebProcessStub func(cf.Guid, int) error - scaleAppWebProcessMutex sync.RWMutex - scaleAppWebProcessArgsForCall []struct { - arg1 cf.Guid - arg2 int - } - scaleAppWebProcessReturns struct { - result1 error - } - scaleAppWebProcessReturnsOnCall map[int]struct { - result1 error - } - invocations map[string][][]interface{} - invocationsMutex sync.RWMutex -} - -func (fake *FakeCFClient) GetApp(arg1 cf.Guid) (*cf.App, error) { - fake.getAppMutex.Lock() - ret, specificReturn := fake.getAppReturnsOnCall[len(fake.getAppArgsForCall)] - fake.getAppArgsForCall = append(fake.getAppArgsForCall, struct { - arg1 cf.Guid - }{arg1}) - stub := fake.GetAppStub - fakeReturns := fake.getAppReturns - fake.recordInvocation("GetApp", []interface{}{arg1}) - fake.getAppMutex.Unlock() - if stub != nil { - return stub(arg1) - } - if specificReturn { - return ret.result1, ret.result2 - } - return fakeReturns.result1, fakeReturns.result2 -} - -func (fake *FakeCFClient) GetAppCallCount() int { - fake.getAppMutex.RLock() - defer fake.getAppMutex.RUnlock() - return len(fake.getAppArgsForCall) -} - -func (fake *FakeCFClient) GetAppCalls(stub func(cf.Guid) (*cf.App, error)) { - fake.getAppMutex.Lock() - defer fake.getAppMutex.Unlock() - fake.GetAppStub = stub -} - -func (fake *FakeCFClient) GetAppArgsForCall(i int) cf.Guid { - fake.getAppMutex.RLock() - defer fake.getAppMutex.RUnlock() - argsForCall := fake.getAppArgsForCall[i] - return argsForCall.arg1 -} - -func (fake *FakeCFClient) GetAppReturns(result1 *cf.App, result2 error) { - fake.getAppMutex.Lock() - defer fake.getAppMutex.Unlock() - fake.GetAppStub = nil - fake.getAppReturns = struct { - result1 *cf.App - result2 error - }{result1, result2} -} - -func (fake *FakeCFClient) GetAppReturnsOnCall(i int, result1 *cf.App, result2 error) { - fake.getAppMutex.Lock() - defer fake.getAppMutex.Unlock() - fake.GetAppStub = nil - if fake.getAppReturnsOnCall == nil { - fake.getAppReturnsOnCall = make(map[int]struct { - result1 *cf.App - result2 error - }) - } - fake.getAppReturnsOnCall[i] = struct { - result1 *cf.App - result2 error - }{result1, result2} -} - -func (fake *FakeCFClient) GetAppAndProcesses(arg1 cf.Guid) (*cf.AppAndProcesses, error) { - fake.getAppAndProcessesMutex.Lock() - ret, specificReturn := fake.getAppAndProcessesReturnsOnCall[len(fake.getAppAndProcessesArgsForCall)] - fake.getAppAndProcessesArgsForCall = append(fake.getAppAndProcessesArgsForCall, struct { - arg1 cf.Guid - }{arg1}) - stub := fake.GetAppAndProcessesStub - fakeReturns := fake.getAppAndProcessesReturns - fake.recordInvocation("GetAppAndProcesses", []interface{}{arg1}) - fake.getAppAndProcessesMutex.Unlock() - if stub != nil { - return stub(arg1) - } - if specificReturn { - return ret.result1, ret.result2 - } - return fakeReturns.result1, fakeReturns.result2 -} - -func (fake *FakeCFClient) GetAppAndProcessesCallCount() int { - fake.getAppAndProcessesMutex.RLock() - defer fake.getAppAndProcessesMutex.RUnlock() - return len(fake.getAppAndProcessesArgsForCall) -} - -func (fake *FakeCFClient) GetAppAndProcessesCalls(stub func(cf.Guid) (*cf.AppAndProcesses, error)) { - fake.getAppAndProcessesMutex.Lock() - defer fake.getAppAndProcessesMutex.Unlock() - fake.GetAppAndProcessesStub = stub -} - -func (fake *FakeCFClient) GetAppAndProcessesArgsForCall(i int) cf.Guid { - fake.getAppAndProcessesMutex.RLock() - defer fake.getAppAndProcessesMutex.RUnlock() - argsForCall := fake.getAppAndProcessesArgsForCall[i] - return argsForCall.arg1 -} - -func (fake *FakeCFClient) GetAppAndProcessesReturns(result1 *cf.AppAndProcesses, result2 error) { - fake.getAppAndProcessesMutex.Lock() - defer fake.getAppAndProcessesMutex.Unlock() - fake.GetAppAndProcessesStub = nil - fake.getAppAndProcessesReturns = struct { - result1 *cf.AppAndProcesses - result2 error - }{result1, result2} -} - -func (fake *FakeCFClient) GetAppAndProcessesReturnsOnCall(i int, result1 *cf.AppAndProcesses, result2 error) { - fake.getAppAndProcessesMutex.Lock() - defer fake.getAppAndProcessesMutex.Unlock() - fake.GetAppAndProcessesStub = nil - if fake.getAppAndProcessesReturnsOnCall == nil { - fake.getAppAndProcessesReturnsOnCall = make(map[int]struct { - result1 *cf.AppAndProcesses - result2 error - }) - } - fake.getAppAndProcessesReturnsOnCall[i] = struct { - result1 *cf.AppAndProcesses - result2 error - }{result1, result2} -} - -func (fake *FakeCFClient) GetAppProcesses(arg1 cf.Guid, arg2 ...string) (cf.Processes, error) { - fake.getAppProcessesMutex.Lock() - ret, specificReturn := fake.getAppProcessesReturnsOnCall[len(fake.getAppProcessesArgsForCall)] - fake.getAppProcessesArgsForCall = append(fake.getAppProcessesArgsForCall, struct { - arg1 cf.Guid - arg2 []string - }{arg1, arg2}) - stub := fake.GetAppProcessesStub - fakeReturns := fake.getAppProcessesReturns - fake.recordInvocation("GetAppProcesses", []interface{}{arg1, arg2}) - fake.getAppProcessesMutex.Unlock() - if stub != nil { - return stub(arg1, arg2...) - } - if specificReturn { - return ret.result1, ret.result2 - } - return fakeReturns.result1, fakeReturns.result2 -} - -func (fake *FakeCFClient) GetAppProcessesCallCount() int { - fake.getAppProcessesMutex.RLock() - defer fake.getAppProcessesMutex.RUnlock() - return len(fake.getAppProcessesArgsForCall) -} - -func (fake *FakeCFClient) GetAppProcessesCalls(stub func(cf.Guid, ...string) (cf.Processes, error)) { - fake.getAppProcessesMutex.Lock() - defer fake.getAppProcessesMutex.Unlock() - fake.GetAppProcessesStub = stub -} - -func (fake *FakeCFClient) GetAppProcessesArgsForCall(i int) (cf.Guid, []string) { - fake.getAppProcessesMutex.RLock() - defer fake.getAppProcessesMutex.RUnlock() - argsForCall := fake.getAppProcessesArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2 -} - -func (fake *FakeCFClient) GetAppProcessesReturns(result1 cf.Processes, result2 error) { - fake.getAppProcessesMutex.Lock() - defer fake.getAppProcessesMutex.Unlock() - fake.GetAppProcessesStub = nil - fake.getAppProcessesReturns = struct { - result1 cf.Processes - result2 error - }{result1, result2} -} - -func (fake *FakeCFClient) GetAppProcessesReturnsOnCall(i int, result1 cf.Processes, result2 error) { - fake.getAppProcessesMutex.Lock() - defer fake.getAppProcessesMutex.Unlock() - fake.GetAppProcessesStub = nil - if fake.getAppProcessesReturnsOnCall == nil { - fake.getAppProcessesReturnsOnCall = make(map[int]struct { - result1 cf.Processes - result2 error - }) - } - fake.getAppProcessesReturnsOnCall[i] = struct { - result1 cf.Processes - result2 error - }{result1, result2} -} - -func (fake *FakeCFClient) GetCtxClient() cf.ContextClient { - fake.getCtxClientMutex.Lock() - ret, specificReturn := fake.getCtxClientReturnsOnCall[len(fake.getCtxClientArgsForCall)] - fake.getCtxClientArgsForCall = append(fake.getCtxClientArgsForCall, struct { - }{}) - stub := fake.GetCtxClientStub - fakeReturns := fake.getCtxClientReturns - fake.recordInvocation("GetCtxClient", []interface{}{}) - fake.getCtxClientMutex.Unlock() - if stub != nil { - return stub() - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeCFClient) GetCtxClientCallCount() int { - fake.getCtxClientMutex.RLock() - defer fake.getCtxClientMutex.RUnlock() - return len(fake.getCtxClientArgsForCall) -} - -func (fake *FakeCFClient) GetCtxClientCalls(stub func() cf.ContextClient) { - fake.getCtxClientMutex.Lock() - defer fake.getCtxClientMutex.Unlock() - fake.GetCtxClientStub = stub -} - -func (fake *FakeCFClient) GetCtxClientReturns(result1 cf.ContextClient) { - fake.getCtxClientMutex.Lock() - defer fake.getCtxClientMutex.Unlock() - fake.GetCtxClientStub = nil - fake.getCtxClientReturns = struct { - result1 cf.ContextClient - }{result1} -} - -func (fake *FakeCFClient) GetCtxClientReturnsOnCall(i int, result1 cf.ContextClient) { - fake.getCtxClientMutex.Lock() - defer fake.getCtxClientMutex.Unlock() - fake.GetCtxClientStub = nil - if fake.getCtxClientReturnsOnCall == nil { - fake.getCtxClientReturnsOnCall = make(map[int]struct { - result1 cf.ContextClient - }) - } - fake.getCtxClientReturnsOnCall[i] = struct { - result1 cf.ContextClient - }{result1} -} - -func (fake *FakeCFClient) GetEndpoints() (cf.Endpoints, error) { - fake.getEndpointsMutex.Lock() - ret, specificReturn := fake.getEndpointsReturnsOnCall[len(fake.getEndpointsArgsForCall)] - fake.getEndpointsArgsForCall = append(fake.getEndpointsArgsForCall, struct { - }{}) - stub := fake.GetEndpointsStub - fakeReturns := fake.getEndpointsReturns - fake.recordInvocation("GetEndpoints", []interface{}{}) - fake.getEndpointsMutex.Unlock() - if stub != nil { - return stub() - } - if specificReturn { - return ret.result1, ret.result2 - } - return fakeReturns.result1, fakeReturns.result2 -} - -func (fake *FakeCFClient) GetEndpointsCallCount() int { - fake.getEndpointsMutex.RLock() - defer fake.getEndpointsMutex.RUnlock() - return len(fake.getEndpointsArgsForCall) -} - -func (fake *FakeCFClient) GetEndpointsCalls(stub func() (cf.Endpoints, error)) { - fake.getEndpointsMutex.Lock() - defer fake.getEndpointsMutex.Unlock() - fake.GetEndpointsStub = stub -} - -func (fake *FakeCFClient) GetEndpointsReturns(result1 cf.Endpoints, result2 error) { - fake.getEndpointsMutex.Lock() - defer fake.getEndpointsMutex.Unlock() - fake.GetEndpointsStub = nil - fake.getEndpointsReturns = struct { - result1 cf.Endpoints - result2 error - }{result1, result2} -} - -func (fake *FakeCFClient) GetEndpointsReturnsOnCall(i int, result1 cf.Endpoints, result2 error) { - fake.getEndpointsMutex.Lock() - defer fake.getEndpointsMutex.Unlock() - fake.GetEndpointsStub = nil - if fake.getEndpointsReturnsOnCall == nil { - fake.getEndpointsReturnsOnCall = make(map[int]struct { - result1 cf.Endpoints - result2 error - }) - } - fake.getEndpointsReturnsOnCall[i] = struct { - result1 cf.Endpoints - result2 error - }{result1, result2} -} - -func (fake *FakeCFClient) GetServiceInstance(arg1 string) (*cf.ServiceInstance, error) { - fake.getServiceInstanceMutex.Lock() - ret, specificReturn := fake.getServiceInstanceReturnsOnCall[len(fake.getServiceInstanceArgsForCall)] - fake.getServiceInstanceArgsForCall = append(fake.getServiceInstanceArgsForCall, struct { - arg1 string - }{arg1}) - stub := fake.GetServiceInstanceStub - fakeReturns := fake.getServiceInstanceReturns - fake.recordInvocation("GetServiceInstance", []interface{}{arg1}) - fake.getServiceInstanceMutex.Unlock() - if stub != nil { - return stub(arg1) - } - if specificReturn { - return ret.result1, ret.result2 - } - return fakeReturns.result1, fakeReturns.result2 -} - -func (fake *FakeCFClient) GetServiceInstanceCallCount() int { - fake.getServiceInstanceMutex.RLock() - defer fake.getServiceInstanceMutex.RUnlock() - return len(fake.getServiceInstanceArgsForCall) -} - -func (fake *FakeCFClient) GetServiceInstanceCalls(stub func(string) (*cf.ServiceInstance, error)) { - fake.getServiceInstanceMutex.Lock() - defer fake.getServiceInstanceMutex.Unlock() - fake.GetServiceInstanceStub = stub -} - -func (fake *FakeCFClient) GetServiceInstanceArgsForCall(i int) string { - fake.getServiceInstanceMutex.RLock() - defer fake.getServiceInstanceMutex.RUnlock() - argsForCall := fake.getServiceInstanceArgsForCall[i] - return argsForCall.arg1 -} - -func (fake *FakeCFClient) GetServiceInstanceReturns(result1 *cf.ServiceInstance, result2 error) { - fake.getServiceInstanceMutex.Lock() - defer fake.getServiceInstanceMutex.Unlock() - fake.GetServiceInstanceStub = nil - fake.getServiceInstanceReturns = struct { - result1 *cf.ServiceInstance - result2 error - }{result1, result2} -} - -func (fake *FakeCFClient) GetServiceInstanceReturnsOnCall(i int, result1 *cf.ServiceInstance, result2 error) { - fake.getServiceInstanceMutex.Lock() - defer fake.getServiceInstanceMutex.Unlock() - fake.GetServiceInstanceStub = nil - if fake.getServiceInstanceReturnsOnCall == nil { - fake.getServiceInstanceReturnsOnCall = make(map[int]struct { - result1 *cf.ServiceInstance - result2 error - }) - } - fake.getServiceInstanceReturnsOnCall[i] = struct { - result1 *cf.ServiceInstance - result2 error - }{result1, result2} -} - -func (fake *FakeCFClient) GetServicePlan(arg1 string) (*cf.ServicePlan, error) { - fake.getServicePlanMutex.Lock() - ret, specificReturn := fake.getServicePlanReturnsOnCall[len(fake.getServicePlanArgsForCall)] - fake.getServicePlanArgsForCall = append(fake.getServicePlanArgsForCall, struct { - arg1 string - }{arg1}) - stub := fake.GetServicePlanStub - fakeReturns := fake.getServicePlanReturns - fake.recordInvocation("GetServicePlan", []interface{}{arg1}) - fake.getServicePlanMutex.Unlock() - if stub != nil { - return stub(arg1) - } - if specificReturn { - return ret.result1, ret.result2 - } - return fakeReturns.result1, fakeReturns.result2 -} - -func (fake *FakeCFClient) GetServicePlanCallCount() int { - fake.getServicePlanMutex.RLock() - defer fake.getServicePlanMutex.RUnlock() - return len(fake.getServicePlanArgsForCall) -} - -func (fake *FakeCFClient) GetServicePlanCalls(stub func(string) (*cf.ServicePlan, error)) { - fake.getServicePlanMutex.Lock() - defer fake.getServicePlanMutex.Unlock() - fake.GetServicePlanStub = stub -} - -func (fake *FakeCFClient) GetServicePlanArgsForCall(i int) string { - fake.getServicePlanMutex.RLock() - defer fake.getServicePlanMutex.RUnlock() - argsForCall := fake.getServicePlanArgsForCall[i] - return argsForCall.arg1 -} - -func (fake *FakeCFClient) GetServicePlanReturns(result1 *cf.ServicePlan, result2 error) { - fake.getServicePlanMutex.Lock() - defer fake.getServicePlanMutex.Unlock() - fake.GetServicePlanStub = nil - fake.getServicePlanReturns = struct { - result1 *cf.ServicePlan - result2 error - }{result1, result2} -} - -func (fake *FakeCFClient) GetServicePlanReturnsOnCall(i int, result1 *cf.ServicePlan, result2 error) { - fake.getServicePlanMutex.Lock() - defer fake.getServicePlanMutex.Unlock() - fake.GetServicePlanStub = nil - if fake.getServicePlanReturnsOnCall == nil { - fake.getServicePlanReturnsOnCall = make(map[int]struct { - result1 *cf.ServicePlan - result2 error - }) - } - fake.getServicePlanReturnsOnCall[i] = struct { - result1 *cf.ServicePlan - result2 error - }{result1, result2} -} - -func (fake *FakeCFClient) GetTokens() (cf.Tokens, error) { - fake.getTokensMutex.Lock() - ret, specificReturn := fake.getTokensReturnsOnCall[len(fake.getTokensArgsForCall)] - fake.getTokensArgsForCall = append(fake.getTokensArgsForCall, struct { - }{}) - stub := fake.GetTokensStub - fakeReturns := fake.getTokensReturns - fake.recordInvocation("GetTokens", []interface{}{}) - fake.getTokensMutex.Unlock() - if stub != nil { - return stub() - } - if specificReturn { - return ret.result1, ret.result2 - } - return fakeReturns.result1, fakeReturns.result2 -} - -func (fake *FakeCFClient) GetTokensCallCount() int { - fake.getTokensMutex.RLock() - defer fake.getTokensMutex.RUnlock() - return len(fake.getTokensArgsForCall) -} - -func (fake *FakeCFClient) GetTokensCalls(stub func() (cf.Tokens, error)) { - fake.getTokensMutex.Lock() - defer fake.getTokensMutex.Unlock() - fake.GetTokensStub = stub -} - -func (fake *FakeCFClient) GetTokensReturns(result1 cf.Tokens, result2 error) { - fake.getTokensMutex.Lock() - defer fake.getTokensMutex.Unlock() - fake.GetTokensStub = nil - fake.getTokensReturns = struct { - result1 cf.Tokens - result2 error - }{result1, result2} -} - -func (fake *FakeCFClient) GetTokensReturnsOnCall(i int, result1 cf.Tokens, result2 error) { - fake.getTokensMutex.Lock() - defer fake.getTokensMutex.Unlock() - fake.GetTokensStub = nil - if fake.getTokensReturnsOnCall == nil { - fake.getTokensReturnsOnCall = make(map[int]struct { - result1 cf.Tokens - result2 error - }) - } - fake.getTokensReturnsOnCall[i] = struct { - result1 cf.Tokens - result2 error - }{result1, result2} -} - -func (fake *FakeCFClient) InvalidateToken() { - fake.invalidateTokenMutex.Lock() - fake.invalidateTokenArgsForCall = append(fake.invalidateTokenArgsForCall, struct { - }{}) - stub := fake.InvalidateTokenStub - fake.recordInvocation("InvalidateToken", []interface{}{}) - fake.invalidateTokenMutex.Unlock() - if stub != nil { - fake.InvalidateTokenStub() - } -} - -func (fake *FakeCFClient) InvalidateTokenCallCount() int { - fake.invalidateTokenMutex.RLock() - defer fake.invalidateTokenMutex.RUnlock() - return len(fake.invalidateTokenArgsForCall) -} - -func (fake *FakeCFClient) InvalidateTokenCalls(stub func()) { - fake.invalidateTokenMutex.Lock() - defer fake.invalidateTokenMutex.Unlock() - fake.InvalidateTokenStub = stub -} - -func (fake *FakeCFClient) IsTokenAuthorized(arg1 string, arg2 string) (bool, error) { - fake.isTokenAuthorizedMutex.Lock() - ret, specificReturn := fake.isTokenAuthorizedReturnsOnCall[len(fake.isTokenAuthorizedArgsForCall)] - fake.isTokenAuthorizedArgsForCall = append(fake.isTokenAuthorizedArgsForCall, struct { - arg1 string - arg2 string - }{arg1, arg2}) - stub := fake.IsTokenAuthorizedStub - fakeReturns := fake.isTokenAuthorizedReturns - fake.recordInvocation("IsTokenAuthorized", []interface{}{arg1, arg2}) - fake.isTokenAuthorizedMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) - } - if specificReturn { - return ret.result1, ret.result2 - } - return fakeReturns.result1, fakeReturns.result2 -} - -func (fake *FakeCFClient) IsTokenAuthorizedCallCount() int { - fake.isTokenAuthorizedMutex.RLock() - defer fake.isTokenAuthorizedMutex.RUnlock() - return len(fake.isTokenAuthorizedArgsForCall) -} - -func (fake *FakeCFClient) IsTokenAuthorizedCalls(stub func(string, string) (bool, error)) { - fake.isTokenAuthorizedMutex.Lock() - defer fake.isTokenAuthorizedMutex.Unlock() - fake.IsTokenAuthorizedStub = stub -} - -func (fake *FakeCFClient) IsTokenAuthorizedArgsForCall(i int) (string, string) { - fake.isTokenAuthorizedMutex.RLock() - defer fake.isTokenAuthorizedMutex.RUnlock() - argsForCall := fake.isTokenAuthorizedArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2 -} - -func (fake *FakeCFClient) IsTokenAuthorizedReturns(result1 bool, result2 error) { - fake.isTokenAuthorizedMutex.Lock() - defer fake.isTokenAuthorizedMutex.Unlock() - fake.IsTokenAuthorizedStub = nil - fake.isTokenAuthorizedReturns = struct { - result1 bool - result2 error - }{result1, result2} -} - -func (fake *FakeCFClient) IsTokenAuthorizedReturnsOnCall(i int, result1 bool, result2 error) { - fake.isTokenAuthorizedMutex.Lock() - defer fake.isTokenAuthorizedMutex.Unlock() - fake.IsTokenAuthorizedStub = nil - if fake.isTokenAuthorizedReturnsOnCall == nil { - fake.isTokenAuthorizedReturnsOnCall = make(map[int]struct { - result1 bool - result2 error - }) - } - fake.isTokenAuthorizedReturnsOnCall[i] = struct { - result1 bool - result2 error - }{result1, result2} -} - -func (fake *FakeCFClient) IsUserAdmin(arg1 string) (bool, error) { - fake.isUserAdminMutex.Lock() - ret, specificReturn := fake.isUserAdminReturnsOnCall[len(fake.isUserAdminArgsForCall)] - fake.isUserAdminArgsForCall = append(fake.isUserAdminArgsForCall, struct { - arg1 string - }{arg1}) - stub := fake.IsUserAdminStub - fakeReturns := fake.isUserAdminReturns - fake.recordInvocation("IsUserAdmin", []interface{}{arg1}) - fake.isUserAdminMutex.Unlock() - if stub != nil { - return stub(arg1) - } - if specificReturn { - return ret.result1, ret.result2 - } - return fakeReturns.result1, fakeReturns.result2 -} - -func (fake *FakeCFClient) IsUserAdminCallCount() int { - fake.isUserAdminMutex.RLock() - defer fake.isUserAdminMutex.RUnlock() - return len(fake.isUserAdminArgsForCall) -} - -func (fake *FakeCFClient) IsUserAdminCalls(stub func(string) (bool, error)) { - fake.isUserAdminMutex.Lock() - defer fake.isUserAdminMutex.Unlock() - fake.IsUserAdminStub = stub -} - -func (fake *FakeCFClient) IsUserAdminArgsForCall(i int) string { - fake.isUserAdminMutex.RLock() - defer fake.isUserAdminMutex.RUnlock() - argsForCall := fake.isUserAdminArgsForCall[i] - return argsForCall.arg1 -} - -func (fake *FakeCFClient) IsUserAdminReturns(result1 bool, result2 error) { - fake.isUserAdminMutex.Lock() - defer fake.isUserAdminMutex.Unlock() - fake.IsUserAdminStub = nil - fake.isUserAdminReturns = struct { - result1 bool - result2 error - }{result1, result2} -} - -func (fake *FakeCFClient) IsUserAdminReturnsOnCall(i int, result1 bool, result2 error) { - fake.isUserAdminMutex.Lock() - defer fake.isUserAdminMutex.Unlock() - fake.IsUserAdminStub = nil - if fake.isUserAdminReturnsOnCall == nil { - fake.isUserAdminReturnsOnCall = make(map[int]struct { - result1 bool - result2 error - }) - } - fake.isUserAdminReturnsOnCall[i] = struct { - result1 bool - result2 error - }{result1, result2} -} - -func (fake *FakeCFClient) IsUserSpaceDeveloper(arg1 string, arg2 cf.Guid) (bool, error) { - fake.isUserSpaceDeveloperMutex.Lock() - ret, specificReturn := fake.isUserSpaceDeveloperReturnsOnCall[len(fake.isUserSpaceDeveloperArgsForCall)] - fake.isUserSpaceDeveloperArgsForCall = append(fake.isUserSpaceDeveloperArgsForCall, struct { - arg1 string - arg2 cf.Guid - }{arg1, arg2}) - stub := fake.IsUserSpaceDeveloperStub - fakeReturns := fake.isUserSpaceDeveloperReturns - fake.recordInvocation("IsUserSpaceDeveloper", []interface{}{arg1, arg2}) - fake.isUserSpaceDeveloperMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) - } - if specificReturn { - return ret.result1, ret.result2 - } - return fakeReturns.result1, fakeReturns.result2 -} - -func (fake *FakeCFClient) IsUserSpaceDeveloperCallCount() int { - fake.isUserSpaceDeveloperMutex.RLock() - defer fake.isUserSpaceDeveloperMutex.RUnlock() - return len(fake.isUserSpaceDeveloperArgsForCall) -} - -func (fake *FakeCFClient) IsUserSpaceDeveloperCalls(stub func(string, cf.Guid) (bool, error)) { - fake.isUserSpaceDeveloperMutex.Lock() - defer fake.isUserSpaceDeveloperMutex.Unlock() - fake.IsUserSpaceDeveloperStub = stub -} - -func (fake *FakeCFClient) IsUserSpaceDeveloperArgsForCall(i int) (string, cf.Guid) { - fake.isUserSpaceDeveloperMutex.RLock() - defer fake.isUserSpaceDeveloperMutex.RUnlock() - argsForCall := fake.isUserSpaceDeveloperArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2 -} - -func (fake *FakeCFClient) IsUserSpaceDeveloperReturns(result1 bool, result2 error) { - fake.isUserSpaceDeveloperMutex.Lock() - defer fake.isUserSpaceDeveloperMutex.Unlock() - fake.IsUserSpaceDeveloperStub = nil - fake.isUserSpaceDeveloperReturns = struct { - result1 bool - result2 error - }{result1, result2} -} - -func (fake *FakeCFClient) IsUserSpaceDeveloperReturnsOnCall(i int, result1 bool, result2 error) { - fake.isUserSpaceDeveloperMutex.Lock() - defer fake.isUserSpaceDeveloperMutex.Unlock() - fake.IsUserSpaceDeveloperStub = nil - if fake.isUserSpaceDeveloperReturnsOnCall == nil { - fake.isUserSpaceDeveloperReturnsOnCall = make(map[int]struct { - result1 bool - result2 error - }) - } - fake.isUserSpaceDeveloperReturnsOnCall[i] = struct { - result1 bool - result2 error - }{result1, result2} -} - -func (fake *FakeCFClient) Login() error { - fake.loginMutex.Lock() - ret, specificReturn := fake.loginReturnsOnCall[len(fake.loginArgsForCall)] - fake.loginArgsForCall = append(fake.loginArgsForCall, struct { - }{}) - stub := fake.LoginStub - fakeReturns := fake.loginReturns - fake.recordInvocation("Login", []interface{}{}) - fake.loginMutex.Unlock() - if stub != nil { - return stub() - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeCFClient) LoginCallCount() int { - fake.loginMutex.RLock() - defer fake.loginMutex.RUnlock() - return len(fake.loginArgsForCall) -} - -func (fake *FakeCFClient) LoginCalls(stub func() error) { - fake.loginMutex.Lock() - defer fake.loginMutex.Unlock() - fake.LoginStub = stub -} - -func (fake *FakeCFClient) LoginReturns(result1 error) { - fake.loginMutex.Lock() - defer fake.loginMutex.Unlock() - fake.LoginStub = nil - fake.loginReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeCFClient) LoginReturnsOnCall(i int, result1 error) { - fake.loginMutex.Lock() - defer fake.loginMutex.Unlock() - fake.LoginStub = nil - if fake.loginReturnsOnCall == nil { - fake.loginReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.loginReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakeCFClient) RefreshAuthToken() (cf.Tokens, error) { - fake.refreshAuthTokenMutex.Lock() - ret, specificReturn := fake.refreshAuthTokenReturnsOnCall[len(fake.refreshAuthTokenArgsForCall)] - fake.refreshAuthTokenArgsForCall = append(fake.refreshAuthTokenArgsForCall, struct { - }{}) - stub := fake.RefreshAuthTokenStub - fakeReturns := fake.refreshAuthTokenReturns - fake.recordInvocation("RefreshAuthToken", []interface{}{}) - fake.refreshAuthTokenMutex.Unlock() - if stub != nil { - return stub() - } - if specificReturn { - return ret.result1, ret.result2 - } - return fakeReturns.result1, fakeReturns.result2 -} - -func (fake *FakeCFClient) RefreshAuthTokenCallCount() int { - fake.refreshAuthTokenMutex.RLock() - defer fake.refreshAuthTokenMutex.RUnlock() - return len(fake.refreshAuthTokenArgsForCall) -} - -func (fake *FakeCFClient) RefreshAuthTokenCalls(stub func() (cf.Tokens, error)) { - fake.refreshAuthTokenMutex.Lock() - defer fake.refreshAuthTokenMutex.Unlock() - fake.RefreshAuthTokenStub = stub -} - -func (fake *FakeCFClient) RefreshAuthTokenReturns(result1 cf.Tokens, result2 error) { - fake.refreshAuthTokenMutex.Lock() - defer fake.refreshAuthTokenMutex.Unlock() - fake.RefreshAuthTokenStub = nil - fake.refreshAuthTokenReturns = struct { - result1 cf.Tokens - result2 error - }{result1, result2} -} - -func (fake *FakeCFClient) RefreshAuthTokenReturnsOnCall(i int, result1 cf.Tokens, result2 error) { - fake.refreshAuthTokenMutex.Lock() - defer fake.refreshAuthTokenMutex.Unlock() - fake.RefreshAuthTokenStub = nil - if fake.refreshAuthTokenReturnsOnCall == nil { - fake.refreshAuthTokenReturnsOnCall = make(map[int]struct { - result1 cf.Tokens - result2 error - }) - } - fake.refreshAuthTokenReturnsOnCall[i] = struct { - result1 cf.Tokens - result2 error - }{result1, result2} -} - -func (fake *FakeCFClient) ScaleAppWebProcess(arg1 cf.Guid, arg2 int) error { - fake.scaleAppWebProcessMutex.Lock() - ret, specificReturn := fake.scaleAppWebProcessReturnsOnCall[len(fake.scaleAppWebProcessArgsForCall)] - fake.scaleAppWebProcessArgsForCall = append(fake.scaleAppWebProcessArgsForCall, struct { - arg1 cf.Guid - arg2 int - }{arg1, arg2}) - stub := fake.ScaleAppWebProcessStub - fakeReturns := fake.scaleAppWebProcessReturns - fake.recordInvocation("ScaleAppWebProcess", []interface{}{arg1, arg2}) - fake.scaleAppWebProcessMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeCFClient) ScaleAppWebProcessCallCount() int { - fake.scaleAppWebProcessMutex.RLock() - defer fake.scaleAppWebProcessMutex.RUnlock() - return len(fake.scaleAppWebProcessArgsForCall) -} - -func (fake *FakeCFClient) ScaleAppWebProcessCalls(stub func(cf.Guid, int) error) { - fake.scaleAppWebProcessMutex.Lock() - defer fake.scaleAppWebProcessMutex.Unlock() - fake.ScaleAppWebProcessStub = stub -} - -func (fake *FakeCFClient) ScaleAppWebProcessArgsForCall(i int) (cf.Guid, int) { - fake.scaleAppWebProcessMutex.RLock() - defer fake.scaleAppWebProcessMutex.RUnlock() - argsForCall := fake.scaleAppWebProcessArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2 -} - -func (fake *FakeCFClient) ScaleAppWebProcessReturns(result1 error) { - fake.scaleAppWebProcessMutex.Lock() - defer fake.scaleAppWebProcessMutex.Unlock() - fake.ScaleAppWebProcessStub = nil - fake.scaleAppWebProcessReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeCFClient) ScaleAppWebProcessReturnsOnCall(i int, result1 error) { - fake.scaleAppWebProcessMutex.Lock() - defer fake.scaleAppWebProcessMutex.Unlock() - fake.ScaleAppWebProcessStub = nil - if fake.scaleAppWebProcessReturnsOnCall == nil { - fake.scaleAppWebProcessReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.scaleAppWebProcessReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakeCFClient) Invocations() map[string][][]interface{} { - fake.invocationsMutex.RLock() - defer fake.invocationsMutex.RUnlock() - fake.getAppMutex.RLock() - defer fake.getAppMutex.RUnlock() - fake.getAppAndProcessesMutex.RLock() - defer fake.getAppAndProcessesMutex.RUnlock() - fake.getAppProcessesMutex.RLock() - defer fake.getAppProcessesMutex.RUnlock() - fake.getCtxClientMutex.RLock() - defer fake.getCtxClientMutex.RUnlock() - fake.getEndpointsMutex.RLock() - defer fake.getEndpointsMutex.RUnlock() - fake.getServiceInstanceMutex.RLock() - defer fake.getServiceInstanceMutex.RUnlock() - fake.getServicePlanMutex.RLock() - defer fake.getServicePlanMutex.RUnlock() - fake.getTokensMutex.RLock() - defer fake.getTokensMutex.RUnlock() - fake.invalidateTokenMutex.RLock() - defer fake.invalidateTokenMutex.RUnlock() - fake.isTokenAuthorizedMutex.RLock() - defer fake.isTokenAuthorizedMutex.RUnlock() - fake.isUserAdminMutex.RLock() - defer fake.isUserAdminMutex.RUnlock() - fake.isUserSpaceDeveloperMutex.RLock() - defer fake.isUserSpaceDeveloperMutex.RUnlock() - fake.loginMutex.RLock() - defer fake.loginMutex.RUnlock() - fake.refreshAuthTokenMutex.RLock() - defer fake.refreshAuthTokenMutex.RUnlock() - fake.scaleAppWebProcessMutex.RLock() - defer fake.scaleAppWebProcessMutex.RUnlock() - copiedInvocations := map[string][][]interface{}{} - for key, value := range fake.invocations { - copiedInvocations[key] = value - } - return copiedInvocations -} - -func (fake *FakeCFClient) recordInvocation(key string, args []interface{}) { - fake.invocationsMutex.Lock() - defer fake.invocationsMutex.Unlock() - if fake.invocations == nil { - fake.invocations = map[string][][]interface{}{} - } - if fake.invocations[key] == nil { - fake.invocations[key] = [][]interface{}{} - } - fake.invocations[key] = append(fake.invocations[key], args) -} - -var _ cf.CFClient = new(FakeCFClient) diff --git a/src/autoscaler/fakes/fake_credentials.go b/src/autoscaler/fakes/fake_credentials.go deleted file mode 100644 index fc87314cec..0000000000 --- a/src/autoscaler/fakes/fake_credentials.go +++ /dev/null @@ -1,411 +0,0 @@ -// Code generated by counterfeiter. DO NOT EDIT. -package fakes - -import ( - "context" - "sync" - - "code.cloudfoundry.org/app-autoscaler/src/autoscaler/cred_helper" - "code.cloudfoundry.org/app-autoscaler/src/autoscaler/models" -) - -type FakeCredentials struct { - CloseStub func() error - closeMutex sync.RWMutex - closeArgsForCall []struct { - } - closeReturns struct { - result1 error - } - closeReturnsOnCall map[int]struct { - result1 error - } - CreateStub func(context.Context, string, *models.Credential) (*models.Credential, error) - createMutex sync.RWMutex - createArgsForCall []struct { - arg1 context.Context - arg2 string - arg3 *models.Credential - } - createReturns struct { - result1 *models.Credential - result2 error - } - createReturnsOnCall map[int]struct { - result1 *models.Credential - result2 error - } - DeleteStub func(context.Context, string) error - deleteMutex sync.RWMutex - deleteArgsForCall []struct { - arg1 context.Context - arg2 string - } - deleteReturns struct { - result1 error - } - deleteReturnsOnCall map[int]struct { - result1 error - } - PingStub func() error - pingMutex sync.RWMutex - pingArgsForCall []struct { - } - pingReturns struct { - result1 error - } - pingReturnsOnCall map[int]struct { - result1 error - } - ValidateStub func(context.Context, string, models.Credential) (bool, error) - validateMutex sync.RWMutex - validateArgsForCall []struct { - arg1 context.Context - arg2 string - arg3 models.Credential - } - validateReturns struct { - result1 bool - result2 error - } - validateReturnsOnCall map[int]struct { - result1 bool - result2 error - } - invocations map[string][][]interface{} - invocationsMutex sync.RWMutex -} - -func (fake *FakeCredentials) Close() error { - fake.closeMutex.Lock() - ret, specificReturn := fake.closeReturnsOnCall[len(fake.closeArgsForCall)] - fake.closeArgsForCall = append(fake.closeArgsForCall, struct { - }{}) - stub := fake.CloseStub - fakeReturns := fake.closeReturns - fake.recordInvocation("Close", []interface{}{}) - fake.closeMutex.Unlock() - if stub != nil { - return stub() - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeCredentials) CloseCallCount() int { - fake.closeMutex.RLock() - defer fake.closeMutex.RUnlock() - return len(fake.closeArgsForCall) -} - -func (fake *FakeCredentials) CloseCalls(stub func() error) { - fake.closeMutex.Lock() - defer fake.closeMutex.Unlock() - fake.CloseStub = stub -} - -func (fake *FakeCredentials) CloseReturns(result1 error) { - fake.closeMutex.Lock() - defer fake.closeMutex.Unlock() - fake.CloseStub = nil - fake.closeReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeCredentials) CloseReturnsOnCall(i int, result1 error) { - fake.closeMutex.Lock() - defer fake.closeMutex.Unlock() - fake.CloseStub = nil - if fake.closeReturnsOnCall == nil { - fake.closeReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.closeReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakeCredentials) Create(arg1 context.Context, arg2 string, arg3 *models.Credential) (*models.Credential, error) { - fake.createMutex.Lock() - ret, specificReturn := fake.createReturnsOnCall[len(fake.createArgsForCall)] - fake.createArgsForCall = append(fake.createArgsForCall, struct { - arg1 context.Context - arg2 string - arg3 *models.Credential - }{arg1, arg2, arg3}) - stub := fake.CreateStub - fakeReturns := fake.createReturns - fake.recordInvocation("Create", []interface{}{arg1, arg2, arg3}) - fake.createMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3) - } - if specificReturn { - return ret.result1, ret.result2 - } - return fakeReturns.result1, fakeReturns.result2 -} - -func (fake *FakeCredentials) CreateCallCount() int { - fake.createMutex.RLock() - defer fake.createMutex.RUnlock() - return len(fake.createArgsForCall) -} - -func (fake *FakeCredentials) CreateCalls(stub func(context.Context, string, *models.Credential) (*models.Credential, error)) { - fake.createMutex.Lock() - defer fake.createMutex.Unlock() - fake.CreateStub = stub -} - -func (fake *FakeCredentials) CreateArgsForCall(i int) (context.Context, string, *models.Credential) { - fake.createMutex.RLock() - defer fake.createMutex.RUnlock() - argsForCall := fake.createArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3 -} - -func (fake *FakeCredentials) CreateReturns(result1 *models.Credential, result2 error) { - fake.createMutex.Lock() - defer fake.createMutex.Unlock() - fake.CreateStub = nil - fake.createReturns = struct { - result1 *models.Credential - result2 error - }{result1, result2} -} - -func (fake *FakeCredentials) CreateReturnsOnCall(i int, result1 *models.Credential, result2 error) { - fake.createMutex.Lock() - defer fake.createMutex.Unlock() - fake.CreateStub = nil - if fake.createReturnsOnCall == nil { - fake.createReturnsOnCall = make(map[int]struct { - result1 *models.Credential - result2 error - }) - } - fake.createReturnsOnCall[i] = struct { - result1 *models.Credential - result2 error - }{result1, result2} -} - -func (fake *FakeCredentials) Delete(arg1 context.Context, arg2 string) error { - fake.deleteMutex.Lock() - ret, specificReturn := fake.deleteReturnsOnCall[len(fake.deleteArgsForCall)] - fake.deleteArgsForCall = append(fake.deleteArgsForCall, struct { - arg1 context.Context - arg2 string - }{arg1, arg2}) - stub := fake.DeleteStub - fakeReturns := fake.deleteReturns - fake.recordInvocation("Delete", []interface{}{arg1, arg2}) - fake.deleteMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeCredentials) DeleteCallCount() int { - fake.deleteMutex.RLock() - defer fake.deleteMutex.RUnlock() - return len(fake.deleteArgsForCall) -} - -func (fake *FakeCredentials) DeleteCalls(stub func(context.Context, string) error) { - fake.deleteMutex.Lock() - defer fake.deleteMutex.Unlock() - fake.DeleteStub = stub -} - -func (fake *FakeCredentials) DeleteArgsForCall(i int) (context.Context, string) { - fake.deleteMutex.RLock() - defer fake.deleteMutex.RUnlock() - argsForCall := fake.deleteArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2 -} - -func (fake *FakeCredentials) DeleteReturns(result1 error) { - fake.deleteMutex.Lock() - defer fake.deleteMutex.Unlock() - fake.DeleteStub = nil - fake.deleteReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeCredentials) DeleteReturnsOnCall(i int, result1 error) { - fake.deleteMutex.Lock() - defer fake.deleteMutex.Unlock() - fake.DeleteStub = nil - if fake.deleteReturnsOnCall == nil { - fake.deleteReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.deleteReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakeCredentials) Ping() error { - fake.pingMutex.Lock() - ret, specificReturn := fake.pingReturnsOnCall[len(fake.pingArgsForCall)] - fake.pingArgsForCall = append(fake.pingArgsForCall, struct { - }{}) - stub := fake.PingStub - fakeReturns := fake.pingReturns - fake.recordInvocation("Ping", []interface{}{}) - fake.pingMutex.Unlock() - if stub != nil { - return stub() - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeCredentials) PingCallCount() int { - fake.pingMutex.RLock() - defer fake.pingMutex.RUnlock() - return len(fake.pingArgsForCall) -} - -func (fake *FakeCredentials) PingCalls(stub func() error) { - fake.pingMutex.Lock() - defer fake.pingMutex.Unlock() - fake.PingStub = stub -} - -func (fake *FakeCredentials) PingReturns(result1 error) { - fake.pingMutex.Lock() - defer fake.pingMutex.Unlock() - fake.PingStub = nil - fake.pingReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeCredentials) PingReturnsOnCall(i int, result1 error) { - fake.pingMutex.Lock() - defer fake.pingMutex.Unlock() - fake.PingStub = nil - if fake.pingReturnsOnCall == nil { - fake.pingReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.pingReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakeCredentials) Validate(arg1 context.Context, arg2 string, arg3 models.Credential) (bool, error) { - fake.validateMutex.Lock() - ret, specificReturn := fake.validateReturnsOnCall[len(fake.validateArgsForCall)] - fake.validateArgsForCall = append(fake.validateArgsForCall, struct { - arg1 context.Context - arg2 string - arg3 models.Credential - }{arg1, arg2, arg3}) - stub := fake.ValidateStub - fakeReturns := fake.validateReturns - fake.recordInvocation("Validate", []interface{}{arg1, arg2, arg3}) - fake.validateMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3) - } - if specificReturn { - return ret.result1, ret.result2 - } - return fakeReturns.result1, fakeReturns.result2 -} - -func (fake *FakeCredentials) ValidateCallCount() int { - fake.validateMutex.RLock() - defer fake.validateMutex.RUnlock() - return len(fake.validateArgsForCall) -} - -func (fake *FakeCredentials) ValidateCalls(stub func(context.Context, string, models.Credential) (bool, error)) { - fake.validateMutex.Lock() - defer fake.validateMutex.Unlock() - fake.ValidateStub = stub -} - -func (fake *FakeCredentials) ValidateArgsForCall(i int) (context.Context, string, models.Credential) { - fake.validateMutex.RLock() - defer fake.validateMutex.RUnlock() - argsForCall := fake.validateArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3 -} - -func (fake *FakeCredentials) ValidateReturns(result1 bool, result2 error) { - fake.validateMutex.Lock() - defer fake.validateMutex.Unlock() - fake.ValidateStub = nil - fake.validateReturns = struct { - result1 bool - result2 error - }{result1, result2} -} - -func (fake *FakeCredentials) ValidateReturnsOnCall(i int, result1 bool, result2 error) { - fake.validateMutex.Lock() - defer fake.validateMutex.Unlock() - fake.ValidateStub = nil - if fake.validateReturnsOnCall == nil { - fake.validateReturnsOnCall = make(map[int]struct { - result1 bool - result2 error - }) - } - fake.validateReturnsOnCall[i] = struct { - result1 bool - result2 error - }{result1, result2} -} - -func (fake *FakeCredentials) Invocations() map[string][][]interface{} { - fake.invocationsMutex.RLock() - defer fake.invocationsMutex.RUnlock() - fake.closeMutex.RLock() - defer fake.closeMutex.RUnlock() - fake.createMutex.RLock() - defer fake.createMutex.RUnlock() - fake.deleteMutex.RLock() - defer fake.deleteMutex.RUnlock() - fake.pingMutex.RLock() - defer fake.pingMutex.RUnlock() - fake.validateMutex.RLock() - defer fake.validateMutex.RUnlock() - copiedInvocations := map[string][][]interface{}{} - for key, value := range fake.invocations { - copiedInvocations[key] = value - } - return copiedInvocations -} - -func (fake *FakeCredentials) recordInvocation(key string, args []interface{}) { - fake.invocationsMutex.Lock() - defer fake.invocationsMutex.Unlock() - if fake.invocations == nil { - fake.invocations = map[string][][]interface{}{} - } - if fake.invocations[key] == nil { - fake.invocations[key] = [][]interface{}{} - } - fake.invocations[key] = append(fake.invocations[key], args) -} - -var _ cred_helper.Credentials = new(FakeCredentials) diff --git a/src/autoscaler/fakes/fake_database_status.go b/src/autoscaler/fakes/fake_database_status.go deleted file mode 100644 index 4005998dfa..0000000000 --- a/src/autoscaler/fakes/fake_database_status.go +++ /dev/null @@ -1,103 +0,0 @@ -// Code generated by counterfeiter. DO NOT EDIT. -package fakes - -import ( - "database/sql" - "sync" - - "code.cloudfoundry.org/app-autoscaler/src/autoscaler/healthendpoint" -) - -type FakeDatabaseStatus struct { - GetDBStatusStub func() sql.DBStats - getDBStatusMutex sync.RWMutex - getDBStatusArgsForCall []struct { - } - getDBStatusReturns struct { - result1 sql.DBStats - } - getDBStatusReturnsOnCall map[int]struct { - result1 sql.DBStats - } - invocations map[string][][]interface{} - invocationsMutex sync.RWMutex -} - -func (fake *FakeDatabaseStatus) GetDBStatus() sql.DBStats { - fake.getDBStatusMutex.Lock() - ret, specificReturn := fake.getDBStatusReturnsOnCall[len(fake.getDBStatusArgsForCall)] - fake.getDBStatusArgsForCall = append(fake.getDBStatusArgsForCall, struct { - }{}) - stub := fake.GetDBStatusStub - fakeReturns := fake.getDBStatusReturns - fake.recordInvocation("GetDBStatus", []interface{}{}) - fake.getDBStatusMutex.Unlock() - if stub != nil { - return stub() - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeDatabaseStatus) GetDBStatusCallCount() int { - fake.getDBStatusMutex.RLock() - defer fake.getDBStatusMutex.RUnlock() - return len(fake.getDBStatusArgsForCall) -} - -func (fake *FakeDatabaseStatus) GetDBStatusCalls(stub func() sql.DBStats) { - fake.getDBStatusMutex.Lock() - defer fake.getDBStatusMutex.Unlock() - fake.GetDBStatusStub = stub -} - -func (fake *FakeDatabaseStatus) GetDBStatusReturns(result1 sql.DBStats) { - fake.getDBStatusMutex.Lock() - defer fake.getDBStatusMutex.Unlock() - fake.GetDBStatusStub = nil - fake.getDBStatusReturns = struct { - result1 sql.DBStats - }{result1} -} - -func (fake *FakeDatabaseStatus) GetDBStatusReturnsOnCall(i int, result1 sql.DBStats) { - fake.getDBStatusMutex.Lock() - defer fake.getDBStatusMutex.Unlock() - fake.GetDBStatusStub = nil - if fake.getDBStatusReturnsOnCall == nil { - fake.getDBStatusReturnsOnCall = make(map[int]struct { - result1 sql.DBStats - }) - } - fake.getDBStatusReturnsOnCall[i] = struct { - result1 sql.DBStats - }{result1} -} - -func (fake *FakeDatabaseStatus) Invocations() map[string][][]interface{} { - fake.invocationsMutex.RLock() - defer fake.invocationsMutex.RUnlock() - fake.getDBStatusMutex.RLock() - defer fake.getDBStatusMutex.RUnlock() - copiedInvocations := map[string][][]interface{}{} - for key, value := range fake.invocations { - copiedInvocations[key] = value - } - return copiedInvocations -} - -func (fake *FakeDatabaseStatus) recordInvocation(key string, args []interface{}) { - fake.invocationsMutex.Lock() - defer fake.invocationsMutex.Unlock() - if fake.invocations == nil { - fake.invocations = map[string][][]interface{}{} - } - if fake.invocations[key] == nil { - fake.invocations[key] = [][]interface{}{} - } - fake.invocations[key] = append(fake.invocations[key], args) -} - -var _ healthendpoint.DatabaseStatus = new(FakeDatabaseStatus) diff --git a/src/autoscaler/fakes/fake_emitter.go b/src/autoscaler/fakes/fake_emitter.go deleted file mode 100644 index f4b4a64fe9..0000000000 --- a/src/autoscaler/fakes/fake_emitter.go +++ /dev/null @@ -1,161 +0,0 @@ -// This file was generated by counterfeiter -package fakes - -import ( - "sync" - - "code.cloudfoundry.org/app-autoscaler/src/autoscaler/metricsgateway" - - "code.cloudfoundry.org/go-loggregator/v9/rpc/loggregator_v2" -) - -type FakeEmitter struct { - AcceptStub func(envelope *loggregator_v2.Envelope) - acceptMutex sync.RWMutex - acceptArgsForCall []struct { - envelope *loggregator_v2.Envelope - } - EmitStub func(envelope *loggregator_v2.Envelope) error - emitMutex sync.RWMutex - emitArgsForCall []struct { - envelope *loggregator_v2.Envelope - } - emitReturns struct { - result1 error - } - StartStub func() error - startMutex sync.RWMutex - startArgsForCall []struct{} - startReturns struct { - result1 error - } - StopStub func() - stopMutex sync.RWMutex - stopArgsForCall []struct{} - invocations map[string][][]interface{} - invocationsMutex sync.RWMutex -} - -func (fake *FakeEmitter) Accept(envelope *loggregator_v2.Envelope) { - fake.acceptMutex.Lock() - fake.acceptArgsForCall = append(fake.acceptArgsForCall, struct { - envelope *loggregator_v2.Envelope - }{envelope}) - fake.recordInvocation("Accept", []interface{}{envelope}) - fake.acceptMutex.Unlock() - if fake.AcceptStub != nil { - fake.AcceptStub(envelope) - } -} - -func (fake *FakeEmitter) AcceptCallCount() int { - fake.acceptMutex.RLock() - defer fake.acceptMutex.RUnlock() - return len(fake.acceptArgsForCall) -} - -func (fake *FakeEmitter) AcceptArgsForCall(i int) *loggregator_v2.Envelope { - fake.acceptMutex.RLock() - defer fake.acceptMutex.RUnlock() - return fake.acceptArgsForCall[i].envelope -} - -func (fake *FakeEmitter) Emit(envelope *loggregator_v2.Envelope) error { - fake.emitMutex.Lock() - fake.emitArgsForCall = append(fake.emitArgsForCall, struct { - envelope *loggregator_v2.Envelope - }{envelope}) - fake.recordInvocation("Emit", []interface{}{envelope}) - fake.emitMutex.Unlock() - if fake.EmitStub != nil { - return fake.EmitStub(envelope) - } - return fake.emitReturns.result1 -} - -func (fake *FakeEmitter) EmitCallCount() int { - fake.emitMutex.RLock() - defer fake.emitMutex.RUnlock() - return len(fake.emitArgsForCall) -} - -func (fake *FakeEmitter) EmitArgsForCall(i int) *loggregator_v2.Envelope { - fake.emitMutex.RLock() - defer fake.emitMutex.RUnlock() - return fake.emitArgsForCall[i].envelope -} - -func (fake *FakeEmitter) EmitReturns(result1 error) { - fake.EmitStub = nil - fake.emitReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeEmitter) Start() error { - fake.startMutex.Lock() - fake.startArgsForCall = append(fake.startArgsForCall, struct{}{}) - fake.recordInvocation("Start", []interface{}{}) - fake.startMutex.Unlock() - if fake.StartStub != nil { - return fake.StartStub() - } - return fake.startReturns.result1 -} - -func (fake *FakeEmitter) StartCallCount() int { - fake.startMutex.RLock() - defer fake.startMutex.RUnlock() - return len(fake.startArgsForCall) -} - -func (fake *FakeEmitter) StartReturns(result1 error) { - fake.StartStub = nil - fake.startReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeEmitter) Stop() { - fake.stopMutex.Lock() - fake.stopArgsForCall = append(fake.stopArgsForCall, struct{}{}) - fake.recordInvocation("Stop", []interface{}{}) - fake.stopMutex.Unlock() - if fake.StopStub != nil { - fake.StopStub() - } -} - -func (fake *FakeEmitter) StopCallCount() int { - fake.stopMutex.RLock() - defer fake.stopMutex.RUnlock() - return len(fake.stopArgsForCall) -} - -func (fake *FakeEmitter) Invocations() map[string][][]interface{} { - fake.invocationsMutex.RLock() - defer fake.invocationsMutex.RUnlock() - fake.acceptMutex.RLock() - defer fake.acceptMutex.RUnlock() - fake.emitMutex.RLock() - defer fake.emitMutex.RUnlock() - fake.startMutex.RLock() - defer fake.startMutex.RUnlock() - fake.stopMutex.RLock() - defer fake.stopMutex.RUnlock() - return fake.invocations -} - -func (fake *FakeEmitter) recordInvocation(key string, args []interface{}) { - fake.invocationsMutex.Lock() - defer fake.invocationsMutex.Unlock() - if fake.invocations == nil { - fake.invocations = map[string][][]interface{}{} - } - if fake.invocations[key] == nil { - fake.invocations[key] = [][]interface{}{} - } - fake.invocations[key] = append(fake.invocations[key], args) -} - -var _ metricsgateway.Emitter = new(FakeEmitter) diff --git a/src/autoscaler/fakes/fake_envelope_processor.go b/src/autoscaler/fakes/fake_envelope_processor.go deleted file mode 100644 index 36f8483994..0000000000 --- a/src/autoscaler/fakes/fake_envelope_processor.go +++ /dev/null @@ -1,208 +0,0 @@ -// Code generated by counterfeiter. DO NOT EDIT. -package fakes - -import ( - "sync" - - "code.cloudfoundry.org/app-autoscaler/src/autoscaler/envelopeprocessor" - "code.cloudfoundry.org/app-autoscaler/src/autoscaler/models" - "code.cloudfoundry.org/go-loggregator/v9/rpc/loggregator_v2" -) - -type FakeEnvelopeProcessor struct { - GetGaugeMetricsStub func([]*loggregator_v2.Envelope, int64) ([]models.AppInstanceMetric, error) - getGaugeMetricsMutex sync.RWMutex - getGaugeMetricsArgsForCall []struct { - arg1 []*loggregator_v2.Envelope - arg2 int64 - } - getGaugeMetricsReturns struct { - result1 []models.AppInstanceMetric - result2 error - } - getGaugeMetricsReturnsOnCall map[int]struct { - result1 []models.AppInstanceMetric - result2 error - } - GetTimerMetricsStub func([]*loggregator_v2.Envelope, string, int64) []models.AppInstanceMetric - getTimerMetricsMutex sync.RWMutex - getTimerMetricsArgsForCall []struct { - arg1 []*loggregator_v2.Envelope - arg2 string - arg3 int64 - } - getTimerMetricsReturns struct { - result1 []models.AppInstanceMetric - } - getTimerMetricsReturnsOnCall map[int]struct { - result1 []models.AppInstanceMetric - } - invocations map[string][][]interface{} - invocationsMutex sync.RWMutex -} - -func (fake *FakeEnvelopeProcessor) GetGaugeMetrics(arg1 []*loggregator_v2.Envelope, arg2 int64) ([]models.AppInstanceMetric, error) { - var arg1Copy []*loggregator_v2.Envelope - if arg1 != nil { - arg1Copy = make([]*loggregator_v2.Envelope, len(arg1)) - copy(arg1Copy, arg1) - } - fake.getGaugeMetricsMutex.Lock() - ret, specificReturn := fake.getGaugeMetricsReturnsOnCall[len(fake.getGaugeMetricsArgsForCall)] - fake.getGaugeMetricsArgsForCall = append(fake.getGaugeMetricsArgsForCall, struct { - arg1 []*loggregator_v2.Envelope - arg2 int64 - }{arg1Copy, arg2}) - stub := fake.GetGaugeMetricsStub - fakeReturns := fake.getGaugeMetricsReturns - fake.recordInvocation("GetGaugeMetrics", []interface{}{arg1Copy, arg2}) - fake.getGaugeMetricsMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) - } - if specificReturn { - return ret.result1, ret.result2 - } - return fakeReturns.result1, fakeReturns.result2 -} - -func (fake *FakeEnvelopeProcessor) GetGaugeMetricsCallCount() int { - fake.getGaugeMetricsMutex.RLock() - defer fake.getGaugeMetricsMutex.RUnlock() - return len(fake.getGaugeMetricsArgsForCall) -} - -func (fake *FakeEnvelopeProcessor) GetGaugeMetricsCalls(stub func([]*loggregator_v2.Envelope, int64) ([]models.AppInstanceMetric, error)) { - fake.getGaugeMetricsMutex.Lock() - defer fake.getGaugeMetricsMutex.Unlock() - fake.GetGaugeMetricsStub = stub -} - -func (fake *FakeEnvelopeProcessor) GetGaugeMetricsArgsForCall(i int) ([]*loggregator_v2.Envelope, int64) { - fake.getGaugeMetricsMutex.RLock() - defer fake.getGaugeMetricsMutex.RUnlock() - argsForCall := fake.getGaugeMetricsArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2 -} - -func (fake *FakeEnvelopeProcessor) GetGaugeMetricsReturns(result1 []models.AppInstanceMetric, result2 error) { - fake.getGaugeMetricsMutex.Lock() - defer fake.getGaugeMetricsMutex.Unlock() - fake.GetGaugeMetricsStub = nil - fake.getGaugeMetricsReturns = struct { - result1 []models.AppInstanceMetric - result2 error - }{result1, result2} -} - -func (fake *FakeEnvelopeProcessor) GetGaugeMetricsReturnsOnCall(i int, result1 []models.AppInstanceMetric, result2 error) { - fake.getGaugeMetricsMutex.Lock() - defer fake.getGaugeMetricsMutex.Unlock() - fake.GetGaugeMetricsStub = nil - if fake.getGaugeMetricsReturnsOnCall == nil { - fake.getGaugeMetricsReturnsOnCall = make(map[int]struct { - result1 []models.AppInstanceMetric - result2 error - }) - } - fake.getGaugeMetricsReturnsOnCall[i] = struct { - result1 []models.AppInstanceMetric - result2 error - }{result1, result2} -} - -func (fake *FakeEnvelopeProcessor) GetTimerMetrics(arg1 []*loggregator_v2.Envelope, arg2 string, arg3 int64) []models.AppInstanceMetric { - var arg1Copy []*loggregator_v2.Envelope - if arg1 != nil { - arg1Copy = make([]*loggregator_v2.Envelope, len(arg1)) - copy(arg1Copy, arg1) - } - fake.getTimerMetricsMutex.Lock() - ret, specificReturn := fake.getTimerMetricsReturnsOnCall[len(fake.getTimerMetricsArgsForCall)] - fake.getTimerMetricsArgsForCall = append(fake.getTimerMetricsArgsForCall, struct { - arg1 []*loggregator_v2.Envelope - arg2 string - arg3 int64 - }{arg1Copy, arg2, arg3}) - stub := fake.GetTimerMetricsStub - fakeReturns := fake.getTimerMetricsReturns - fake.recordInvocation("GetTimerMetrics", []interface{}{arg1Copy, arg2, arg3}) - fake.getTimerMetricsMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3) - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeEnvelopeProcessor) GetTimerMetricsCallCount() int { - fake.getTimerMetricsMutex.RLock() - defer fake.getTimerMetricsMutex.RUnlock() - return len(fake.getTimerMetricsArgsForCall) -} - -func (fake *FakeEnvelopeProcessor) GetTimerMetricsCalls(stub func([]*loggregator_v2.Envelope, string, int64) []models.AppInstanceMetric) { - fake.getTimerMetricsMutex.Lock() - defer fake.getTimerMetricsMutex.Unlock() - fake.GetTimerMetricsStub = stub -} - -func (fake *FakeEnvelopeProcessor) GetTimerMetricsArgsForCall(i int) ([]*loggregator_v2.Envelope, string, int64) { - fake.getTimerMetricsMutex.RLock() - defer fake.getTimerMetricsMutex.RUnlock() - argsForCall := fake.getTimerMetricsArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3 -} - -func (fake *FakeEnvelopeProcessor) GetTimerMetricsReturns(result1 []models.AppInstanceMetric) { - fake.getTimerMetricsMutex.Lock() - defer fake.getTimerMetricsMutex.Unlock() - fake.GetTimerMetricsStub = nil - fake.getTimerMetricsReturns = struct { - result1 []models.AppInstanceMetric - }{result1} -} - -func (fake *FakeEnvelopeProcessor) GetTimerMetricsReturnsOnCall(i int, result1 []models.AppInstanceMetric) { - fake.getTimerMetricsMutex.Lock() - defer fake.getTimerMetricsMutex.Unlock() - fake.GetTimerMetricsStub = nil - if fake.getTimerMetricsReturnsOnCall == nil { - fake.getTimerMetricsReturnsOnCall = make(map[int]struct { - result1 []models.AppInstanceMetric - }) - } - fake.getTimerMetricsReturnsOnCall[i] = struct { - result1 []models.AppInstanceMetric - }{result1} -} - -func (fake *FakeEnvelopeProcessor) Invocations() map[string][][]interface{} { - fake.invocationsMutex.RLock() - defer fake.invocationsMutex.RUnlock() - fake.getGaugeMetricsMutex.RLock() - defer fake.getGaugeMetricsMutex.RUnlock() - fake.getTimerMetricsMutex.RLock() - defer fake.getTimerMetricsMutex.RUnlock() - copiedInvocations := map[string][][]interface{}{} - for key, value := range fake.invocations { - copiedInvocations[key] = value - } - return copiedInvocations -} - -func (fake *FakeEnvelopeProcessor) recordInvocation(key string, args []interface{}) { - fake.invocationsMutex.Lock() - defer fake.invocationsMutex.Unlock() - if fake.invocations == nil { - fake.invocations = map[string][][]interface{}{} - } - if fake.invocations[key] == nil { - fake.invocations[key] = [][]interface{}{} - } - fake.invocations[key] = append(fake.invocations[key], args) -} - -var _ envelopeprocessor.EnvelopeProcessor = new(FakeEnvelopeProcessor) diff --git a/src/autoscaler/fakes/fake_envelope_processor_creator.go b/src/autoscaler/fakes/fake_envelope_processor_creator.go deleted file mode 100644 index ee9e7c7e75..0000000000 --- a/src/autoscaler/fakes/fake_envelope_processor_creator.go +++ /dev/null @@ -1,115 +0,0 @@ -// Code generated by counterfeiter. DO NOT EDIT. -package fakes - -import ( - "sync" - "time" - - "code.cloudfoundry.org/app-autoscaler/src/autoscaler/envelopeprocessor" - lager "code.cloudfoundry.org/lager/v3" -) - -type FakeEnvelopeProcessorCreator struct { - NewProcessorStub func(lager.Logger, time.Duration) envelopeprocessor.Processor - newProcessorMutex sync.RWMutex - newProcessorArgsForCall []struct { - arg1 lager.Logger - arg2 time.Duration - } - newProcessorReturns struct { - result1 envelopeprocessor.Processor - } - newProcessorReturnsOnCall map[int]struct { - result1 envelopeprocessor.Processor - } - invocations map[string][][]interface{} - invocationsMutex sync.RWMutex -} - -func (fake *FakeEnvelopeProcessorCreator) NewProcessor(arg1 lager.Logger, arg2 time.Duration) envelopeprocessor.Processor { - fake.newProcessorMutex.Lock() - ret, specificReturn := fake.newProcessorReturnsOnCall[len(fake.newProcessorArgsForCall)] - fake.newProcessorArgsForCall = append(fake.newProcessorArgsForCall, struct { - arg1 lager.Logger - arg2 time.Duration - }{arg1, arg2}) - stub := fake.NewProcessorStub - fakeReturns := fake.newProcessorReturns - fake.recordInvocation("NewProcessor", []interface{}{arg1, arg2}) - fake.newProcessorMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeEnvelopeProcessorCreator) NewProcessorCallCount() int { - fake.newProcessorMutex.RLock() - defer fake.newProcessorMutex.RUnlock() - return len(fake.newProcessorArgsForCall) -} - -func (fake *FakeEnvelopeProcessorCreator) NewProcessorCalls(stub func(lager.Logger, time.Duration) envelopeprocessor.Processor) { - fake.newProcessorMutex.Lock() - defer fake.newProcessorMutex.Unlock() - fake.NewProcessorStub = stub -} - -func (fake *FakeEnvelopeProcessorCreator) NewProcessorArgsForCall(i int) (lager.Logger, time.Duration) { - fake.newProcessorMutex.RLock() - defer fake.newProcessorMutex.RUnlock() - argsForCall := fake.newProcessorArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2 -} - -func (fake *FakeEnvelopeProcessorCreator) NewProcessorReturns(result1 envelopeprocessor.Processor) { - fake.newProcessorMutex.Lock() - defer fake.newProcessorMutex.Unlock() - fake.NewProcessorStub = nil - fake.newProcessorReturns = struct { - result1 envelopeprocessor.Processor - }{result1} -} - -func (fake *FakeEnvelopeProcessorCreator) NewProcessorReturnsOnCall(i int, result1 envelopeprocessor.Processor) { - fake.newProcessorMutex.Lock() - defer fake.newProcessorMutex.Unlock() - fake.NewProcessorStub = nil - if fake.newProcessorReturnsOnCall == nil { - fake.newProcessorReturnsOnCall = make(map[int]struct { - result1 envelopeprocessor.Processor - }) - } - fake.newProcessorReturnsOnCall[i] = struct { - result1 envelopeprocessor.Processor - }{result1} -} - -func (fake *FakeEnvelopeProcessorCreator) Invocations() map[string][][]interface{} { - fake.invocationsMutex.RLock() - defer fake.invocationsMutex.RUnlock() - fake.newProcessorMutex.RLock() - defer fake.newProcessorMutex.RUnlock() - copiedInvocations := map[string][][]interface{}{} - for key, value := range fake.invocations { - copiedInvocations[key] = value - } - return copiedInvocations -} - -func (fake *FakeEnvelopeProcessorCreator) recordInvocation(key string, args []interface{}) { - fake.invocationsMutex.Lock() - defer fake.invocationsMutex.Unlock() - if fake.invocations == nil { - fake.invocations = map[string][][]interface{}{} - } - if fake.invocations[key] == nil { - fake.invocations[key] = [][]interface{}{} - } - fake.invocations[key] = append(fake.invocations[key], args) -} - -var _ envelopeprocessor.EnvelopeProcessorCreator = new(FakeEnvelopeProcessorCreator) diff --git a/src/autoscaler/fakes/fake_go_log_cache_client.go b/src/autoscaler/fakes/fake_go_log_cache_client.go deleted file mode 100644 index 93f57c750a..0000000000 --- a/src/autoscaler/fakes/fake_go_log_cache_client.go +++ /dev/null @@ -1,417 +0,0 @@ -// Code generated by counterfeiter. DO NOT EDIT. -package fakes - -import ( - "sync" - - "code.cloudfoundry.org/app-autoscaler/src/autoscaler/eventgenerator/client" - clienta "code.cloudfoundry.org/go-log-cache" - "google.golang.org/grpc" -) - -type FakeGoLogCacheClient struct { - NewClientStub func(string, ...clienta.ClientOption) *clienta.Client - newClientMutex sync.RWMutex - newClientArgsForCall []struct { - arg1 string - arg2 []clienta.ClientOption - } - newClientReturns struct { - result1 *clienta.Client - } - newClientReturnsOnCall map[int]struct { - result1 *clienta.Client - } - NewOauth2HTTPClientStub func(string, string, string, ...clienta.Oauth2Option) *clienta.Oauth2HTTPClient - newOauth2HTTPClientMutex sync.RWMutex - newOauth2HTTPClientArgsForCall []struct { - arg1 string - arg2 string - arg3 string - arg4 []clienta.Oauth2Option - } - newOauth2HTTPClientReturns struct { - result1 *clienta.Oauth2HTTPClient - } - newOauth2HTTPClientReturnsOnCall map[int]struct { - result1 *clienta.Oauth2HTTPClient - } - WithHTTPClientStub func(clienta.HTTPClient) clienta.ClientOption - withHTTPClientMutex sync.RWMutex - withHTTPClientArgsForCall []struct { - arg1 clienta.HTTPClient - } - withHTTPClientReturns struct { - result1 clienta.ClientOption - } - withHTTPClientReturnsOnCall map[int]struct { - result1 clienta.ClientOption - } - WithOauth2HTTPClientStub func(clienta.HTTPClient) clienta.Oauth2Option - withOauth2HTTPClientMutex sync.RWMutex - withOauth2HTTPClientArgsForCall []struct { - arg1 clienta.HTTPClient - } - withOauth2HTTPClientReturns struct { - result1 clienta.Oauth2Option - } - withOauth2HTTPClientReturnsOnCall map[int]struct { - result1 clienta.Oauth2Option - } - WithViaGRPCStub func(...grpc.DialOption) clienta.ClientOption - withViaGRPCMutex sync.RWMutex - withViaGRPCArgsForCall []struct { - arg1 []grpc.DialOption - } - withViaGRPCReturns struct { - result1 clienta.ClientOption - } - withViaGRPCReturnsOnCall map[int]struct { - result1 clienta.ClientOption - } - invocations map[string][][]interface{} - invocationsMutex sync.RWMutex -} - -func (fake *FakeGoLogCacheClient) NewClient(arg1 string, arg2 ...clienta.ClientOption) *clienta.Client { - fake.newClientMutex.Lock() - ret, specificReturn := fake.newClientReturnsOnCall[len(fake.newClientArgsForCall)] - fake.newClientArgsForCall = append(fake.newClientArgsForCall, struct { - arg1 string - arg2 []clienta.ClientOption - }{arg1, arg2}) - stub := fake.NewClientStub - fakeReturns := fake.newClientReturns - fake.recordInvocation("NewClient", []interface{}{arg1, arg2}) - fake.newClientMutex.Unlock() - if stub != nil { - return stub(arg1, arg2...) - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeGoLogCacheClient) NewClientCallCount() int { - fake.newClientMutex.RLock() - defer fake.newClientMutex.RUnlock() - return len(fake.newClientArgsForCall) -} - -func (fake *FakeGoLogCacheClient) NewClientCalls(stub func(string, ...clienta.ClientOption) *clienta.Client) { - fake.newClientMutex.Lock() - defer fake.newClientMutex.Unlock() - fake.NewClientStub = stub -} - -func (fake *FakeGoLogCacheClient) NewClientArgsForCall(i int) (string, []clienta.ClientOption) { - fake.newClientMutex.RLock() - defer fake.newClientMutex.RUnlock() - argsForCall := fake.newClientArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2 -} - -func (fake *FakeGoLogCacheClient) NewClientReturns(result1 *clienta.Client) { - fake.newClientMutex.Lock() - defer fake.newClientMutex.Unlock() - fake.NewClientStub = nil - fake.newClientReturns = struct { - result1 *clienta.Client - }{result1} -} - -func (fake *FakeGoLogCacheClient) NewClientReturnsOnCall(i int, result1 *clienta.Client) { - fake.newClientMutex.Lock() - defer fake.newClientMutex.Unlock() - fake.NewClientStub = nil - if fake.newClientReturnsOnCall == nil { - fake.newClientReturnsOnCall = make(map[int]struct { - result1 *clienta.Client - }) - } - fake.newClientReturnsOnCall[i] = struct { - result1 *clienta.Client - }{result1} -} - -func (fake *FakeGoLogCacheClient) NewOauth2HTTPClient(arg1 string, arg2 string, arg3 string, arg4 ...clienta.Oauth2Option) *clienta.Oauth2HTTPClient { - fake.newOauth2HTTPClientMutex.Lock() - ret, specificReturn := fake.newOauth2HTTPClientReturnsOnCall[len(fake.newOauth2HTTPClientArgsForCall)] - fake.newOauth2HTTPClientArgsForCall = append(fake.newOauth2HTTPClientArgsForCall, struct { - arg1 string - arg2 string - arg3 string - arg4 []clienta.Oauth2Option - }{arg1, arg2, arg3, arg4}) - stub := fake.NewOauth2HTTPClientStub - fakeReturns := fake.newOauth2HTTPClientReturns - fake.recordInvocation("NewOauth2HTTPClient", []interface{}{arg1, arg2, arg3, arg4}) - fake.newOauth2HTTPClientMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3, arg4...) - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeGoLogCacheClient) NewOauth2HTTPClientCallCount() int { - fake.newOauth2HTTPClientMutex.RLock() - defer fake.newOauth2HTTPClientMutex.RUnlock() - return len(fake.newOauth2HTTPClientArgsForCall) -} - -func (fake *FakeGoLogCacheClient) NewOauth2HTTPClientCalls(stub func(string, string, string, ...clienta.Oauth2Option) *clienta.Oauth2HTTPClient) { - fake.newOauth2HTTPClientMutex.Lock() - defer fake.newOauth2HTTPClientMutex.Unlock() - fake.NewOauth2HTTPClientStub = stub -} - -func (fake *FakeGoLogCacheClient) NewOauth2HTTPClientArgsForCall(i int) (string, string, string, []clienta.Oauth2Option) { - fake.newOauth2HTTPClientMutex.RLock() - defer fake.newOauth2HTTPClientMutex.RUnlock() - argsForCall := fake.newOauth2HTTPClientArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3, argsForCall.arg4 -} - -func (fake *FakeGoLogCacheClient) NewOauth2HTTPClientReturns(result1 *clienta.Oauth2HTTPClient) { - fake.newOauth2HTTPClientMutex.Lock() - defer fake.newOauth2HTTPClientMutex.Unlock() - fake.NewOauth2HTTPClientStub = nil - fake.newOauth2HTTPClientReturns = struct { - result1 *clienta.Oauth2HTTPClient - }{result1} -} - -func (fake *FakeGoLogCacheClient) NewOauth2HTTPClientReturnsOnCall(i int, result1 *clienta.Oauth2HTTPClient) { - fake.newOauth2HTTPClientMutex.Lock() - defer fake.newOauth2HTTPClientMutex.Unlock() - fake.NewOauth2HTTPClientStub = nil - if fake.newOauth2HTTPClientReturnsOnCall == nil { - fake.newOauth2HTTPClientReturnsOnCall = make(map[int]struct { - result1 *clienta.Oauth2HTTPClient - }) - } - fake.newOauth2HTTPClientReturnsOnCall[i] = struct { - result1 *clienta.Oauth2HTTPClient - }{result1} -} - -func (fake *FakeGoLogCacheClient) WithHTTPClient(arg1 clienta.HTTPClient) clienta.ClientOption { - fake.withHTTPClientMutex.Lock() - ret, specificReturn := fake.withHTTPClientReturnsOnCall[len(fake.withHTTPClientArgsForCall)] - fake.withHTTPClientArgsForCall = append(fake.withHTTPClientArgsForCall, struct { - arg1 clienta.HTTPClient - }{arg1}) - stub := fake.WithHTTPClientStub - fakeReturns := fake.withHTTPClientReturns - fake.recordInvocation("WithHTTPClient", []interface{}{arg1}) - fake.withHTTPClientMutex.Unlock() - if stub != nil { - return stub(arg1) - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeGoLogCacheClient) WithHTTPClientCallCount() int { - fake.withHTTPClientMutex.RLock() - defer fake.withHTTPClientMutex.RUnlock() - return len(fake.withHTTPClientArgsForCall) -} - -func (fake *FakeGoLogCacheClient) WithHTTPClientCalls(stub func(clienta.HTTPClient) clienta.ClientOption) { - fake.withHTTPClientMutex.Lock() - defer fake.withHTTPClientMutex.Unlock() - fake.WithHTTPClientStub = stub -} - -func (fake *FakeGoLogCacheClient) WithHTTPClientArgsForCall(i int) clienta.HTTPClient { - fake.withHTTPClientMutex.RLock() - defer fake.withHTTPClientMutex.RUnlock() - argsForCall := fake.withHTTPClientArgsForCall[i] - return argsForCall.arg1 -} - -func (fake *FakeGoLogCacheClient) WithHTTPClientReturns(result1 clienta.ClientOption) { - fake.withHTTPClientMutex.Lock() - defer fake.withHTTPClientMutex.Unlock() - fake.WithHTTPClientStub = nil - fake.withHTTPClientReturns = struct { - result1 clienta.ClientOption - }{result1} -} - -func (fake *FakeGoLogCacheClient) WithHTTPClientReturnsOnCall(i int, result1 clienta.ClientOption) { - fake.withHTTPClientMutex.Lock() - defer fake.withHTTPClientMutex.Unlock() - fake.WithHTTPClientStub = nil - if fake.withHTTPClientReturnsOnCall == nil { - fake.withHTTPClientReturnsOnCall = make(map[int]struct { - result1 clienta.ClientOption - }) - } - fake.withHTTPClientReturnsOnCall[i] = struct { - result1 clienta.ClientOption - }{result1} -} - -func (fake *FakeGoLogCacheClient) WithOauth2HTTPClient(arg1 clienta.HTTPClient) clienta.Oauth2Option { - fake.withOauth2HTTPClientMutex.Lock() - ret, specificReturn := fake.withOauth2HTTPClientReturnsOnCall[len(fake.withOauth2HTTPClientArgsForCall)] - fake.withOauth2HTTPClientArgsForCall = append(fake.withOauth2HTTPClientArgsForCall, struct { - arg1 clienta.HTTPClient - }{arg1}) - stub := fake.WithOauth2HTTPClientStub - fakeReturns := fake.withOauth2HTTPClientReturns - fake.recordInvocation("WithOauth2HTTPClient", []interface{}{arg1}) - fake.withOauth2HTTPClientMutex.Unlock() - if stub != nil { - return stub(arg1) - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeGoLogCacheClient) WithOauth2HTTPClientCallCount() int { - fake.withOauth2HTTPClientMutex.RLock() - defer fake.withOauth2HTTPClientMutex.RUnlock() - return len(fake.withOauth2HTTPClientArgsForCall) -} - -func (fake *FakeGoLogCacheClient) WithOauth2HTTPClientCalls(stub func(clienta.HTTPClient) clienta.Oauth2Option) { - fake.withOauth2HTTPClientMutex.Lock() - defer fake.withOauth2HTTPClientMutex.Unlock() - fake.WithOauth2HTTPClientStub = stub -} - -func (fake *FakeGoLogCacheClient) WithOauth2HTTPClientArgsForCall(i int) clienta.HTTPClient { - fake.withOauth2HTTPClientMutex.RLock() - defer fake.withOauth2HTTPClientMutex.RUnlock() - argsForCall := fake.withOauth2HTTPClientArgsForCall[i] - return argsForCall.arg1 -} - -func (fake *FakeGoLogCacheClient) WithOauth2HTTPClientReturns(result1 clienta.Oauth2Option) { - fake.withOauth2HTTPClientMutex.Lock() - defer fake.withOauth2HTTPClientMutex.Unlock() - fake.WithOauth2HTTPClientStub = nil - fake.withOauth2HTTPClientReturns = struct { - result1 clienta.Oauth2Option - }{result1} -} - -func (fake *FakeGoLogCacheClient) WithOauth2HTTPClientReturnsOnCall(i int, result1 clienta.Oauth2Option) { - fake.withOauth2HTTPClientMutex.Lock() - defer fake.withOauth2HTTPClientMutex.Unlock() - fake.WithOauth2HTTPClientStub = nil - if fake.withOauth2HTTPClientReturnsOnCall == nil { - fake.withOauth2HTTPClientReturnsOnCall = make(map[int]struct { - result1 clienta.Oauth2Option - }) - } - fake.withOauth2HTTPClientReturnsOnCall[i] = struct { - result1 clienta.Oauth2Option - }{result1} -} - -func (fake *FakeGoLogCacheClient) WithViaGRPC(arg1 ...grpc.DialOption) clienta.ClientOption { - fake.withViaGRPCMutex.Lock() - ret, specificReturn := fake.withViaGRPCReturnsOnCall[len(fake.withViaGRPCArgsForCall)] - fake.withViaGRPCArgsForCall = append(fake.withViaGRPCArgsForCall, struct { - arg1 []grpc.DialOption - }{arg1}) - stub := fake.WithViaGRPCStub - fakeReturns := fake.withViaGRPCReturns - fake.recordInvocation("WithViaGRPC", []interface{}{arg1}) - fake.withViaGRPCMutex.Unlock() - if stub != nil { - return stub(arg1...) - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeGoLogCacheClient) WithViaGRPCCallCount() int { - fake.withViaGRPCMutex.RLock() - defer fake.withViaGRPCMutex.RUnlock() - return len(fake.withViaGRPCArgsForCall) -} - -func (fake *FakeGoLogCacheClient) WithViaGRPCCalls(stub func(...grpc.DialOption) clienta.ClientOption) { - fake.withViaGRPCMutex.Lock() - defer fake.withViaGRPCMutex.Unlock() - fake.WithViaGRPCStub = stub -} - -func (fake *FakeGoLogCacheClient) WithViaGRPCArgsForCall(i int) []grpc.DialOption { - fake.withViaGRPCMutex.RLock() - defer fake.withViaGRPCMutex.RUnlock() - argsForCall := fake.withViaGRPCArgsForCall[i] - return argsForCall.arg1 -} - -func (fake *FakeGoLogCacheClient) WithViaGRPCReturns(result1 clienta.ClientOption) { - fake.withViaGRPCMutex.Lock() - defer fake.withViaGRPCMutex.Unlock() - fake.WithViaGRPCStub = nil - fake.withViaGRPCReturns = struct { - result1 clienta.ClientOption - }{result1} -} - -func (fake *FakeGoLogCacheClient) WithViaGRPCReturnsOnCall(i int, result1 clienta.ClientOption) { - fake.withViaGRPCMutex.Lock() - defer fake.withViaGRPCMutex.Unlock() - fake.WithViaGRPCStub = nil - if fake.withViaGRPCReturnsOnCall == nil { - fake.withViaGRPCReturnsOnCall = make(map[int]struct { - result1 clienta.ClientOption - }) - } - fake.withViaGRPCReturnsOnCall[i] = struct { - result1 clienta.ClientOption - }{result1} -} - -func (fake *FakeGoLogCacheClient) Invocations() map[string][][]interface{} { - fake.invocationsMutex.RLock() - defer fake.invocationsMutex.RUnlock() - fake.newClientMutex.RLock() - defer fake.newClientMutex.RUnlock() - fake.newOauth2HTTPClientMutex.RLock() - defer fake.newOauth2HTTPClientMutex.RUnlock() - fake.withHTTPClientMutex.RLock() - defer fake.withHTTPClientMutex.RUnlock() - fake.withOauth2HTTPClientMutex.RLock() - defer fake.withOauth2HTTPClientMutex.RUnlock() - fake.withViaGRPCMutex.RLock() - defer fake.withViaGRPCMutex.RUnlock() - copiedInvocations := map[string][][]interface{}{} - for key, value := range fake.invocations { - copiedInvocations[key] = value - } - return copiedInvocations -} - -func (fake *FakeGoLogCacheClient) recordInvocation(key string, args []interface{}) { - fake.invocationsMutex.Lock() - defer fake.invocationsMutex.Unlock() - if fake.invocations == nil { - fake.invocations = map[string][][]interface{}{} - } - if fake.invocations[key] == nil { - fake.invocations[key] = [][]interface{}{} - } - fake.invocations[key] = append(fake.invocations[key], args) -} - -var _ client.GoLogCacheClient = new(FakeGoLogCacheClient) diff --git a/src/autoscaler/fakes/fake_grpc.go b/src/autoscaler/fakes/fake_grpc.go deleted file mode 100644 index 6c21dcd033..0000000000 --- a/src/autoscaler/fakes/fake_grpc.go +++ /dev/null @@ -1,113 +0,0 @@ -// Code generated by counterfeiter. DO NOT EDIT. -package fakes - -import ( - "sync" - - "code.cloudfoundry.org/app-autoscaler/src/autoscaler/eventgenerator/client" - "google.golang.org/grpc" - "google.golang.org/grpc/credentials" -) - -type FakeGRPCOptions struct { - WithTransportCredentialsStub func(credentials.TransportCredentials) grpc.DialOption - withTransportCredentialsMutex sync.RWMutex - withTransportCredentialsArgsForCall []struct { - arg1 credentials.TransportCredentials - } - withTransportCredentialsReturns struct { - result1 grpc.DialOption - } - withTransportCredentialsReturnsOnCall map[int]struct { - result1 grpc.DialOption - } - invocations map[string][][]interface{} - invocationsMutex sync.RWMutex -} - -func (fake *FakeGRPCOptions) WithTransportCredentials(arg1 credentials.TransportCredentials) grpc.DialOption { - fake.withTransportCredentialsMutex.Lock() - ret, specificReturn := fake.withTransportCredentialsReturnsOnCall[len(fake.withTransportCredentialsArgsForCall)] - fake.withTransportCredentialsArgsForCall = append(fake.withTransportCredentialsArgsForCall, struct { - arg1 credentials.TransportCredentials - }{arg1}) - stub := fake.WithTransportCredentialsStub - fakeReturns := fake.withTransportCredentialsReturns - fake.recordInvocation("WithTransportCredentials", []interface{}{arg1}) - fake.withTransportCredentialsMutex.Unlock() - if stub != nil { - return stub(arg1) - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeGRPCOptions) WithTransportCredentialsCallCount() int { - fake.withTransportCredentialsMutex.RLock() - defer fake.withTransportCredentialsMutex.RUnlock() - return len(fake.withTransportCredentialsArgsForCall) -} - -func (fake *FakeGRPCOptions) WithTransportCredentialsCalls(stub func(credentials.TransportCredentials) grpc.DialOption) { - fake.withTransportCredentialsMutex.Lock() - defer fake.withTransportCredentialsMutex.Unlock() - fake.WithTransportCredentialsStub = stub -} - -func (fake *FakeGRPCOptions) WithTransportCredentialsArgsForCall(i int) credentials.TransportCredentials { - fake.withTransportCredentialsMutex.RLock() - defer fake.withTransportCredentialsMutex.RUnlock() - argsForCall := fake.withTransportCredentialsArgsForCall[i] - return argsForCall.arg1 -} - -func (fake *FakeGRPCOptions) WithTransportCredentialsReturns(result1 grpc.DialOption) { - fake.withTransportCredentialsMutex.Lock() - defer fake.withTransportCredentialsMutex.Unlock() - fake.WithTransportCredentialsStub = nil - fake.withTransportCredentialsReturns = struct { - result1 grpc.DialOption - }{result1} -} - -func (fake *FakeGRPCOptions) WithTransportCredentialsReturnsOnCall(i int, result1 grpc.DialOption) { - fake.withTransportCredentialsMutex.Lock() - defer fake.withTransportCredentialsMutex.Unlock() - fake.WithTransportCredentialsStub = nil - if fake.withTransportCredentialsReturnsOnCall == nil { - fake.withTransportCredentialsReturnsOnCall = make(map[int]struct { - result1 grpc.DialOption - }) - } - fake.withTransportCredentialsReturnsOnCall[i] = struct { - result1 grpc.DialOption - }{result1} -} - -func (fake *FakeGRPCOptions) Invocations() map[string][][]interface{} { - fake.invocationsMutex.RLock() - defer fake.invocationsMutex.RUnlock() - fake.withTransportCredentialsMutex.RLock() - defer fake.withTransportCredentialsMutex.RUnlock() - copiedInvocations := map[string][][]interface{}{} - for key, value := range fake.invocations { - copiedInvocations[key] = value - } - return copiedInvocations -} - -func (fake *FakeGRPCOptions) recordInvocation(key string, args []interface{}) { - fake.invocationsMutex.Lock() - defer fake.invocationsMutex.Unlock() - if fake.invocations == nil { - fake.invocations = map[string][][]interface{}{} - } - if fake.invocations[key] == nil { - fake.invocations[key] = [][]interface{}{} - } - fake.invocations[key] = append(fake.invocations[key], args) -} - -var _ client.GRPCOptions = new(FakeGRPCOptions) diff --git a/src/autoscaler/fakes/fake_httpstatus_collector.go b/src/autoscaler/fakes/fake_httpstatus_collector.go deleted file mode 100644 index a7eb3ae8d5..0000000000 --- a/src/autoscaler/fakes/fake_httpstatus_collector.go +++ /dev/null @@ -1,139 +0,0 @@ -// This file was generated by counterfeiter -package fakes - -import ( - "sync" - - "code.cloudfoundry.org/app-autoscaler/src/autoscaler/healthendpoint" - - "github.com/prometheus/client_golang/prometheus" -) - -type FakeHTTPStatusCollector struct { - DescribeStub func(chan<- *prometheus.Desc) - describeMutex sync.RWMutex - describeArgsForCall []struct { - arg1 chan<- *prometheus.Desc - } - CollectStub func(chan<- prometheus.Metric) - collectMutex sync.RWMutex - collectArgsForCall []struct { - arg1 chan<- prometheus.Metric - } - IncConcurrentHTTPRequestStub func() - incConcurrentHTTPRequestMutex sync.RWMutex - incConcurrentHTTPRequestArgsForCall []struct{} - DecConcurrentHTTPRequestStub func() - decConcurrentHTTPRequestMutex sync.RWMutex - decConcurrentHTTPRequestArgsForCall []struct{} - invocations map[string][][]interface{} - invocationsMutex sync.RWMutex -} - -func (fake *FakeHTTPStatusCollector) Describe(arg1 chan<- *prometheus.Desc) { - fake.describeMutex.Lock() - fake.describeArgsForCall = append(fake.describeArgsForCall, struct { - arg1 chan<- *prometheus.Desc - }{arg1}) - fake.recordInvocation("Describe", []interface{}{arg1}) - fake.describeMutex.Unlock() - if fake.DescribeStub != nil { - fake.DescribeStub(arg1) - } -} - -func (fake *FakeHTTPStatusCollector) DescribeCallCount() int { - fake.describeMutex.RLock() - defer fake.describeMutex.RUnlock() - return len(fake.describeArgsForCall) -} - -func (fake *FakeHTTPStatusCollector) DescribeArgsForCall(i int) chan<- *prometheus.Desc { - fake.describeMutex.RLock() - defer fake.describeMutex.RUnlock() - return fake.describeArgsForCall[i].arg1 -} - -func (fake *FakeHTTPStatusCollector) Collect(arg1 chan<- prometheus.Metric) { - fake.collectMutex.Lock() - fake.collectArgsForCall = append(fake.collectArgsForCall, struct { - arg1 chan<- prometheus.Metric - }{arg1}) - fake.recordInvocation("Collect", []interface{}{arg1}) - fake.collectMutex.Unlock() - if fake.CollectStub != nil { - fake.CollectStub(arg1) - } -} - -func (fake *FakeHTTPStatusCollector) CollectCallCount() int { - fake.collectMutex.RLock() - defer fake.collectMutex.RUnlock() - return len(fake.collectArgsForCall) -} - -func (fake *FakeHTTPStatusCollector) CollectArgsForCall(i int) chan<- prometheus.Metric { - fake.collectMutex.RLock() - defer fake.collectMutex.RUnlock() - return fake.collectArgsForCall[i].arg1 -} - -func (fake *FakeHTTPStatusCollector) IncConcurrentHTTPRequest() { - fake.incConcurrentHTTPRequestMutex.Lock() - fake.incConcurrentHTTPRequestArgsForCall = append(fake.incConcurrentHTTPRequestArgsForCall, struct{}{}) - fake.recordInvocation("IncConcurrentHTTPRequest", []interface{}{}) - fake.incConcurrentHTTPRequestMutex.Unlock() - if fake.IncConcurrentHTTPRequestStub != nil { - fake.IncConcurrentHTTPRequestStub() - } -} - -func (fake *FakeHTTPStatusCollector) IncConcurrentHTTPRequestCallCount() int { - fake.incConcurrentHTTPRequestMutex.RLock() - defer fake.incConcurrentHTTPRequestMutex.RUnlock() - return len(fake.incConcurrentHTTPRequestArgsForCall) -} - -func (fake *FakeHTTPStatusCollector) DecConcurrentHTTPRequest() { - fake.decConcurrentHTTPRequestMutex.Lock() - fake.decConcurrentHTTPRequestArgsForCall = append(fake.decConcurrentHTTPRequestArgsForCall, struct{}{}) - fake.recordInvocation("DecConcurrentHTTPRequest", []interface{}{}) - fake.decConcurrentHTTPRequestMutex.Unlock() - if fake.DecConcurrentHTTPRequestStub != nil { - fake.DecConcurrentHTTPRequestStub() - } -} - -func (fake *FakeHTTPStatusCollector) DecConcurrentHTTPRequestCallCount() int { - fake.decConcurrentHTTPRequestMutex.RLock() - defer fake.decConcurrentHTTPRequestMutex.RUnlock() - return len(fake.decConcurrentHTTPRequestArgsForCall) -} - -func (fake *FakeHTTPStatusCollector) Invocations() map[string][][]interface{} { - fake.invocationsMutex.RLock() - defer fake.invocationsMutex.RUnlock() - fake.describeMutex.RLock() - defer fake.describeMutex.RUnlock() - fake.collectMutex.RLock() - defer fake.collectMutex.RUnlock() - fake.incConcurrentHTTPRequestMutex.RLock() - defer fake.incConcurrentHTTPRequestMutex.RUnlock() - fake.decConcurrentHTTPRequestMutex.RLock() - defer fake.decConcurrentHTTPRequestMutex.RUnlock() - return fake.invocations -} - -func (fake *FakeHTTPStatusCollector) recordInvocation(key string, args []interface{}) { - fake.invocationsMutex.Lock() - defer fake.invocationsMutex.Unlock() - if fake.invocations == nil { - fake.invocations = map[string][][]interface{}{} - } - if fake.invocations[key] == nil { - fake.invocations[key] = [][]interface{}{} - } - fake.invocations[key] = append(fake.invocations[key], args) -} - -var _ healthendpoint.HTTPStatusCollector = new(FakeHTTPStatusCollector) diff --git a/src/autoscaler/fakes/fake_instancemetrics_db.go b/src/autoscaler/fakes/fake_instancemetrics_db.go deleted file mode 100644 index e9b6c466c1..0000000000 --- a/src/autoscaler/fakes/fake_instancemetrics_db.go +++ /dev/null @@ -1,284 +0,0 @@ -// This file was generated by counterfeiter -package fakes - -import ( - "database/sql" - "sync" - - "code.cloudfoundry.org/app-autoscaler/src/autoscaler/db" - "code.cloudfoundry.org/app-autoscaler/src/autoscaler/models" -) - -type FakeInstanceMetricsDB struct { - GetDBStatusStub func() sql.DBStats - getDBStatusMutex sync.RWMutex - getDBStatusArgsForCall []struct{} - getDBStatusReturns struct { - result1 sql.DBStats - } - RetrieveInstanceMetricsStub func(appid string, instanceIndex int, name string, start int64, end int64, orderType db.OrderType) ([]*models.AppInstanceMetric, error) - retrieveInstanceMetricsMutex sync.RWMutex - retrieveInstanceMetricsArgsForCall []struct { - appid string - instanceIndex int - name string - start int64 - end int64 - orderType db.OrderType - } - retrieveInstanceMetricsReturns struct { - result1 []*models.AppInstanceMetric - result2 error - } - SaveMetricStub func(metric *models.AppInstanceMetric) error - saveMetricMutex sync.RWMutex - saveMetricArgsForCall []struct { - metric *models.AppInstanceMetric - } - saveMetricReturns struct { - result1 error - } - SaveMetricsInBulkStub func(metrics []*models.AppInstanceMetric) error - saveMetricsInBulkMutex sync.RWMutex - saveMetricsInBulkArgsForCall []struct { - metrics []*models.AppInstanceMetric - } - saveMetricsInBulkReturns struct { - result1 error - } - PruneInstanceMetricsStub func(before int64) error - pruneInstanceMetricsMutex sync.RWMutex - pruneInstanceMetricsArgsForCall []struct { - before int64 - } - pruneInstanceMetricsReturns struct { - result1 error - } - CloseStub func() error - closeMutex sync.RWMutex - closeArgsForCall []struct{} - closeReturns struct { - result1 error - } - invocations map[string][][]interface{} - invocationsMutex sync.RWMutex -} - -func (fake *FakeInstanceMetricsDB) GetDBStatus() sql.DBStats { - fake.getDBStatusMutex.Lock() - fake.getDBStatusArgsForCall = append(fake.getDBStatusArgsForCall, struct{}{}) - fake.recordInvocation("GetDBStatus", []interface{}{}) - fake.getDBStatusMutex.Unlock() - if fake.GetDBStatusStub != nil { - return fake.GetDBStatusStub() - } - return fake.getDBStatusReturns.result1 -} - -func (fake *FakeInstanceMetricsDB) GetDBStatusCallCount() int { - fake.getDBStatusMutex.RLock() - defer fake.getDBStatusMutex.RUnlock() - return len(fake.getDBStatusArgsForCall) -} - -func (fake *FakeInstanceMetricsDB) GetDBStatusReturns(result1 sql.DBStats) { - fake.GetDBStatusStub = nil - fake.getDBStatusReturns = struct { - result1 sql.DBStats - }{result1} -} - -func (fake *FakeInstanceMetricsDB) RetrieveInstanceMetrics(appid string, instanceIndex int, name string, start int64, end int64, orderType db.OrderType) ([]*models.AppInstanceMetric, error) { - fake.retrieveInstanceMetricsMutex.Lock() - fake.retrieveInstanceMetricsArgsForCall = append(fake.retrieveInstanceMetricsArgsForCall, struct { - appid string - instanceIndex int - name string - start int64 - end int64 - orderType db.OrderType - }{appid, instanceIndex, name, start, end, orderType}) - fake.recordInvocation("RetrieveInstanceMetrics", []interface{}{appid, instanceIndex, name, start, end, orderType}) - fake.retrieveInstanceMetricsMutex.Unlock() - if fake.RetrieveInstanceMetricsStub != nil { - return fake.RetrieveInstanceMetricsStub(appid, instanceIndex, name, start, end, orderType) - } - return fake.retrieveInstanceMetricsReturns.result1, fake.retrieveInstanceMetricsReturns.result2 -} - -func (fake *FakeInstanceMetricsDB) RetrieveInstanceMetricsCallCount() int { - fake.retrieveInstanceMetricsMutex.RLock() - defer fake.retrieveInstanceMetricsMutex.RUnlock() - return len(fake.retrieveInstanceMetricsArgsForCall) -} - -func (fake *FakeInstanceMetricsDB) RetrieveInstanceMetricsArgsForCall(i int) (string, int, string, int64, int64, db.OrderType) { - fake.retrieveInstanceMetricsMutex.RLock() - defer fake.retrieveInstanceMetricsMutex.RUnlock() - return fake.retrieveInstanceMetricsArgsForCall[i].appid, fake.retrieveInstanceMetricsArgsForCall[i].instanceIndex, fake.retrieveInstanceMetricsArgsForCall[i].name, fake.retrieveInstanceMetricsArgsForCall[i].start, fake.retrieveInstanceMetricsArgsForCall[i].end, fake.retrieveInstanceMetricsArgsForCall[i].orderType -} - -func (fake *FakeInstanceMetricsDB) RetrieveInstanceMetricsReturns(result1 []*models.AppInstanceMetric, result2 error) { - fake.RetrieveInstanceMetricsStub = nil - fake.retrieveInstanceMetricsReturns = struct { - result1 []*models.AppInstanceMetric - result2 error - }{result1, result2} -} - -func (fake *FakeInstanceMetricsDB) SaveMetric(metric *models.AppInstanceMetric) error { - fake.saveMetricMutex.Lock() - fake.saveMetricArgsForCall = append(fake.saveMetricArgsForCall, struct { - metric *models.AppInstanceMetric - }{metric}) - fake.recordInvocation("SaveMetric", []interface{}{metric}) - fake.saveMetricMutex.Unlock() - if fake.SaveMetricStub != nil { - return fake.SaveMetricStub(metric) - } - return fake.saveMetricReturns.result1 -} - -func (fake *FakeInstanceMetricsDB) SaveMetricCallCount() int { - fake.saveMetricMutex.RLock() - defer fake.saveMetricMutex.RUnlock() - return len(fake.saveMetricArgsForCall) -} - -func (fake *FakeInstanceMetricsDB) SaveMetricArgsForCall(i int) *models.AppInstanceMetric { - fake.saveMetricMutex.RLock() - defer fake.saveMetricMutex.RUnlock() - return fake.saveMetricArgsForCall[i].metric -} - -func (fake *FakeInstanceMetricsDB) SaveMetricReturns(result1 error) { - fake.SaveMetricStub = nil - fake.saveMetricReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeInstanceMetricsDB) SaveMetricsInBulk(metrics []*models.AppInstanceMetric) error { - var metricsCopy []*models.AppInstanceMetric - if metrics != nil { - metricsCopy = make([]*models.AppInstanceMetric, len(metrics)) - copy(metricsCopy, metrics) - } - fake.saveMetricsInBulkMutex.Lock() - fake.saveMetricsInBulkArgsForCall = append(fake.saveMetricsInBulkArgsForCall, struct { - metrics []*models.AppInstanceMetric - }{metricsCopy}) - fake.recordInvocation("SaveMetricsInBulk", []interface{}{metricsCopy}) - fake.saveMetricsInBulkMutex.Unlock() - if fake.SaveMetricsInBulkStub != nil { - return fake.SaveMetricsInBulkStub(metrics) - } - return fake.saveMetricsInBulkReturns.result1 -} - -func (fake *FakeInstanceMetricsDB) SaveMetricsInBulkCallCount() int { - fake.saveMetricsInBulkMutex.RLock() - defer fake.saveMetricsInBulkMutex.RUnlock() - return len(fake.saveMetricsInBulkArgsForCall) -} - -func (fake *FakeInstanceMetricsDB) SaveMetricsInBulkArgsForCall(i int) []*models.AppInstanceMetric { - fake.saveMetricsInBulkMutex.RLock() - defer fake.saveMetricsInBulkMutex.RUnlock() - return fake.saveMetricsInBulkArgsForCall[i].metrics -} - -func (fake *FakeInstanceMetricsDB) SaveMetricsInBulkReturns(result1 error) { - fake.SaveMetricsInBulkStub = nil - fake.saveMetricsInBulkReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeInstanceMetricsDB) PruneInstanceMetrics(before int64) error { - fake.pruneInstanceMetricsMutex.Lock() - fake.pruneInstanceMetricsArgsForCall = append(fake.pruneInstanceMetricsArgsForCall, struct { - before int64 - }{before}) - fake.recordInvocation("PruneInstanceMetrics", []interface{}{before}) - fake.pruneInstanceMetricsMutex.Unlock() - if fake.PruneInstanceMetricsStub != nil { - return fake.PruneInstanceMetricsStub(before) - } - return fake.pruneInstanceMetricsReturns.result1 -} - -func (fake *FakeInstanceMetricsDB) PruneInstanceMetricsCallCount() int { - fake.pruneInstanceMetricsMutex.RLock() - defer fake.pruneInstanceMetricsMutex.RUnlock() - return len(fake.pruneInstanceMetricsArgsForCall) -} - -func (fake *FakeInstanceMetricsDB) PruneInstanceMetricsArgsForCall(i int) int64 { - fake.pruneInstanceMetricsMutex.RLock() - defer fake.pruneInstanceMetricsMutex.RUnlock() - return fake.pruneInstanceMetricsArgsForCall[i].before -} - -func (fake *FakeInstanceMetricsDB) PruneInstanceMetricsReturns(result1 error) { - fake.PruneInstanceMetricsStub = nil - fake.pruneInstanceMetricsReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeInstanceMetricsDB) Close() error { - fake.closeMutex.Lock() - fake.closeArgsForCall = append(fake.closeArgsForCall, struct{}{}) - fake.recordInvocation("Close", []interface{}{}) - fake.closeMutex.Unlock() - if fake.CloseStub != nil { - return fake.CloseStub() - } - return fake.closeReturns.result1 -} - -func (fake *FakeInstanceMetricsDB) CloseCallCount() int { - fake.closeMutex.RLock() - defer fake.closeMutex.RUnlock() - return len(fake.closeArgsForCall) -} - -func (fake *FakeInstanceMetricsDB) CloseReturns(result1 error) { - fake.CloseStub = nil - fake.closeReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeInstanceMetricsDB) Invocations() map[string][][]interface{} { - fake.invocationsMutex.RLock() - defer fake.invocationsMutex.RUnlock() - fake.getDBStatusMutex.RLock() - defer fake.getDBStatusMutex.RUnlock() - fake.retrieveInstanceMetricsMutex.RLock() - defer fake.retrieveInstanceMetricsMutex.RUnlock() - fake.saveMetricMutex.RLock() - defer fake.saveMetricMutex.RUnlock() - fake.saveMetricsInBulkMutex.RLock() - defer fake.saveMetricsInBulkMutex.RUnlock() - fake.pruneInstanceMetricsMutex.RLock() - defer fake.pruneInstanceMetricsMutex.RUnlock() - fake.closeMutex.RLock() - defer fake.closeMutex.RUnlock() - return fake.invocations -} - -func (fake *FakeInstanceMetricsDB) recordInvocation(key string, args []interface{}) { - fake.invocationsMutex.Lock() - defer fake.invocationsMutex.Unlock() - if fake.invocations == nil { - fake.invocations = map[string][][]interface{}{} - } - if fake.invocations[key] == nil { - fake.invocations[key] = [][]interface{}{} - } - fake.invocations[key] = append(fake.invocations[key], args) -} - -var _ db.InstanceMetricsDB = new(FakeInstanceMetricsDB) diff --git a/src/autoscaler/fakes/fake_log_cache_client.go b/src/autoscaler/fakes/fake_log_cache_client.go deleted file mode 100644 index 9dcfbf366e..0000000000 --- a/src/autoscaler/fakes/fake_log_cache_client.go +++ /dev/null @@ -1,126 +0,0 @@ -// Code generated by counterfeiter. DO NOT EDIT. -package fakes - -import ( - "context" - "sync" - "time" - - "code.cloudfoundry.org/app-autoscaler/src/autoscaler/eventgenerator/client" - clienta "code.cloudfoundry.org/go-log-cache" - "code.cloudfoundry.org/go-loggregator/v9/rpc/loggregator_v2" -) - -type FakeLogCacheClientReader struct { - ReadStub func(context.Context, string, time.Time, ...clienta.ReadOption) ([]*loggregator_v2.Envelope, error) - readMutex sync.RWMutex - readArgsForCall []struct { - arg1 context.Context - arg2 string - arg3 time.Time - arg4 []clienta.ReadOption - } - readReturns struct { - result1 []*loggregator_v2.Envelope - result2 error - } - readReturnsOnCall map[int]struct { - result1 []*loggregator_v2.Envelope - result2 error - } - invocations map[string][][]interface{} - invocationsMutex sync.RWMutex -} - -func (fake *FakeLogCacheClientReader) Read(arg1 context.Context, arg2 string, arg3 time.Time, arg4 ...clienta.ReadOption) ([]*loggregator_v2.Envelope, error) { - fake.readMutex.Lock() - ret, specificReturn := fake.readReturnsOnCall[len(fake.readArgsForCall)] - fake.readArgsForCall = append(fake.readArgsForCall, struct { - arg1 context.Context - arg2 string - arg3 time.Time - arg4 []clienta.ReadOption - }{arg1, arg2, arg3, arg4}) - stub := fake.ReadStub - fakeReturns := fake.readReturns - fake.recordInvocation("Read", []interface{}{arg1, arg2, arg3, arg4}) - fake.readMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3, arg4...) - } - if specificReturn { - return ret.result1, ret.result2 - } - return fakeReturns.result1, fakeReturns.result2 -} - -func (fake *FakeLogCacheClientReader) ReadCallCount() int { - fake.readMutex.RLock() - defer fake.readMutex.RUnlock() - return len(fake.readArgsForCall) -} - -func (fake *FakeLogCacheClientReader) ReadCalls(stub func(context.Context, string, time.Time, ...clienta.ReadOption) ([]*loggregator_v2.Envelope, error)) { - fake.readMutex.Lock() - defer fake.readMutex.Unlock() - fake.ReadStub = stub -} - -func (fake *FakeLogCacheClientReader) ReadArgsForCall(i int) (context.Context, string, time.Time, []clienta.ReadOption) { - fake.readMutex.RLock() - defer fake.readMutex.RUnlock() - argsForCall := fake.readArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3, argsForCall.arg4 -} - -func (fake *FakeLogCacheClientReader) ReadReturns(result1 []*loggregator_v2.Envelope, result2 error) { - fake.readMutex.Lock() - defer fake.readMutex.Unlock() - fake.ReadStub = nil - fake.readReturns = struct { - result1 []*loggregator_v2.Envelope - result2 error - }{result1, result2} -} - -func (fake *FakeLogCacheClientReader) ReadReturnsOnCall(i int, result1 []*loggregator_v2.Envelope, result2 error) { - fake.readMutex.Lock() - defer fake.readMutex.Unlock() - fake.ReadStub = nil - if fake.readReturnsOnCall == nil { - fake.readReturnsOnCall = make(map[int]struct { - result1 []*loggregator_v2.Envelope - result2 error - }) - } - fake.readReturnsOnCall[i] = struct { - result1 []*loggregator_v2.Envelope - result2 error - }{result1, result2} -} - -func (fake *FakeLogCacheClientReader) Invocations() map[string][][]interface{} { - fake.invocationsMutex.RLock() - defer fake.invocationsMutex.RUnlock() - fake.readMutex.RLock() - defer fake.readMutex.RUnlock() - copiedInvocations := map[string][][]interface{}{} - for key, value := range fake.invocations { - copiedInvocations[key] = value - } - return copiedInvocations -} - -func (fake *FakeLogCacheClientReader) recordInvocation(key string, args []interface{}) { - fake.invocationsMutex.Lock() - defer fake.invocationsMutex.Unlock() - if fake.invocations == nil { - fake.invocations = map[string][][]interface{}{} - } - if fake.invocations[key] == nil { - fake.invocations[key] = [][]interface{}{} - } - fake.invocations[key] = append(fake.invocations[key], args) -} - -var _ client.LogCacheClientReader = new(FakeLogCacheClientReader) diff --git a/src/autoscaler/fakes/fake_log_cache_creator.go b/src/autoscaler/fakes/fake_log_cache_creator.go deleted file mode 100644 index ab48eb60a4..0000000000 --- a/src/autoscaler/fakes/fake_log_cache_creator.go +++ /dev/null @@ -1,120 +0,0 @@ -// Code generated by counterfeiter. DO NOT EDIT. -package fakes - -import ( - "sync" - "time" - - "code.cloudfoundry.org/app-autoscaler/src/autoscaler/envelopeprocessor" - "code.cloudfoundry.org/app-autoscaler/src/autoscaler/eventgenerator/client" - lager "code.cloudfoundry.org/lager/v3" -) - -type FakeLogCacheClientCreator struct { - NewLogCacheClientStub func(lager.Logger, func() time.Time, envelopeprocessor.EnvelopeProcessor, string) client.MetricClient - newLogCacheClientMutex sync.RWMutex - newLogCacheClientArgsForCall []struct { - arg1 lager.Logger - arg2 func() time.Time - arg3 envelopeprocessor.EnvelopeProcessor - arg4 string - } - newLogCacheClientReturns struct { - result1 client.MetricClient - } - newLogCacheClientReturnsOnCall map[int]struct { - result1 client.MetricClient - } - invocations map[string][][]interface{} - invocationsMutex sync.RWMutex -} - -func (fake *FakeLogCacheClientCreator) NewLogCacheClient(arg1 lager.Logger, arg2 func() time.Time, arg3 envelopeprocessor.EnvelopeProcessor, arg4 string) client.MetricClient { - fake.newLogCacheClientMutex.Lock() - ret, specificReturn := fake.newLogCacheClientReturnsOnCall[len(fake.newLogCacheClientArgsForCall)] - fake.newLogCacheClientArgsForCall = append(fake.newLogCacheClientArgsForCall, struct { - arg1 lager.Logger - arg2 func() time.Time - arg3 envelopeprocessor.EnvelopeProcessor - arg4 string - }{arg1, arg2, arg3, arg4}) - stub := fake.NewLogCacheClientStub - fakeReturns := fake.newLogCacheClientReturns - fake.recordInvocation("NewLogCacheClient", []interface{}{arg1, arg2, arg3, arg4}) - fake.newLogCacheClientMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3, arg4) - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeLogCacheClientCreator) NewLogCacheClientCallCount() int { - fake.newLogCacheClientMutex.RLock() - defer fake.newLogCacheClientMutex.RUnlock() - return len(fake.newLogCacheClientArgsForCall) -} - -func (fake *FakeLogCacheClientCreator) NewLogCacheClientCalls(stub func(lager.Logger, func() time.Time, envelopeprocessor.EnvelopeProcessor, string) client.MetricClient) { - fake.newLogCacheClientMutex.Lock() - defer fake.newLogCacheClientMutex.Unlock() - fake.NewLogCacheClientStub = stub -} - -func (fake *FakeLogCacheClientCreator) NewLogCacheClientArgsForCall(i int) (lager.Logger, func() time.Time, envelopeprocessor.EnvelopeProcessor, string) { - fake.newLogCacheClientMutex.RLock() - defer fake.newLogCacheClientMutex.RUnlock() - argsForCall := fake.newLogCacheClientArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3, argsForCall.arg4 -} - -func (fake *FakeLogCacheClientCreator) NewLogCacheClientReturns(result1 client.MetricClient) { - fake.newLogCacheClientMutex.Lock() - defer fake.newLogCacheClientMutex.Unlock() - fake.NewLogCacheClientStub = nil - fake.newLogCacheClientReturns = struct { - result1 client.MetricClient - }{result1} -} - -func (fake *FakeLogCacheClientCreator) NewLogCacheClientReturnsOnCall(i int, result1 client.MetricClient) { - fake.newLogCacheClientMutex.Lock() - defer fake.newLogCacheClientMutex.Unlock() - fake.NewLogCacheClientStub = nil - if fake.newLogCacheClientReturnsOnCall == nil { - fake.newLogCacheClientReturnsOnCall = make(map[int]struct { - result1 client.MetricClient - }) - } - fake.newLogCacheClientReturnsOnCall[i] = struct { - result1 client.MetricClient - }{result1} -} - -func (fake *FakeLogCacheClientCreator) Invocations() map[string][][]interface{} { - fake.invocationsMutex.RLock() - defer fake.invocationsMutex.RUnlock() - fake.newLogCacheClientMutex.RLock() - defer fake.newLogCacheClientMutex.RUnlock() - copiedInvocations := map[string][][]interface{}{} - for key, value := range fake.invocations { - copiedInvocations[key] = value - } - return copiedInvocations -} - -func (fake *FakeLogCacheClientCreator) recordInvocation(key string, args []interface{}) { - fake.invocationsMutex.Lock() - defer fake.invocationsMutex.Unlock() - if fake.invocations == nil { - fake.invocations = map[string][][]interface{}{} - } - if fake.invocations[key] == nil { - fake.invocations[key] = [][]interface{}{} - } - fake.invocations[key] = append(fake.invocations[key], args) -} - -var _ client.LogCacheClientCreator = new(FakeLogCacheClientCreator) diff --git a/src/autoscaler/fakes/fake_metric_forwarder.go b/src/autoscaler/fakes/fake_metric_forwarder.go deleted file mode 100644 index 5354c4ef9a..0000000000 --- a/src/autoscaler/fakes/fake_metric_forwarder.go +++ /dev/null @@ -1,77 +0,0 @@ -// Code generated by counterfeiter. DO NOT EDIT. -package fakes - -import ( - "sync" - - "code.cloudfoundry.org/app-autoscaler/src/autoscaler/metricsforwarder/forwarder" - "code.cloudfoundry.org/app-autoscaler/src/autoscaler/models" -) - -type FakeMetricForwarder struct { - EmitMetricStub func(*models.CustomMetric) - emitMetricMutex sync.RWMutex - emitMetricArgsForCall []struct { - arg1 *models.CustomMetric - } - invocations map[string][][]interface{} - invocationsMutex sync.RWMutex -} - -func (fake *FakeMetricForwarder) EmitMetric(arg1 *models.CustomMetric) { - fake.emitMetricMutex.Lock() - fake.emitMetricArgsForCall = append(fake.emitMetricArgsForCall, struct { - arg1 *models.CustomMetric - }{arg1}) - stub := fake.EmitMetricStub - fake.recordInvocation("EmitMetric", []interface{}{arg1}) - fake.emitMetricMutex.Unlock() - if stub != nil { - fake.EmitMetricStub(arg1) - } -} - -func (fake *FakeMetricForwarder) EmitMetricCallCount() int { - fake.emitMetricMutex.RLock() - defer fake.emitMetricMutex.RUnlock() - return len(fake.emitMetricArgsForCall) -} - -func (fake *FakeMetricForwarder) EmitMetricCalls(stub func(*models.CustomMetric)) { - fake.emitMetricMutex.Lock() - defer fake.emitMetricMutex.Unlock() - fake.EmitMetricStub = stub -} - -func (fake *FakeMetricForwarder) EmitMetricArgsForCall(i int) *models.CustomMetric { - fake.emitMetricMutex.RLock() - defer fake.emitMetricMutex.RUnlock() - argsForCall := fake.emitMetricArgsForCall[i] - return argsForCall.arg1 -} - -func (fake *FakeMetricForwarder) Invocations() map[string][][]interface{} { - fake.invocationsMutex.RLock() - defer fake.invocationsMutex.RUnlock() - fake.emitMetricMutex.RLock() - defer fake.emitMetricMutex.RUnlock() - copiedInvocations := map[string][][]interface{}{} - for key, value := range fake.invocations { - copiedInvocations[key] = value - } - return copiedInvocations -} - -func (fake *FakeMetricForwarder) recordInvocation(key string, args []interface{}) { - fake.invocationsMutex.Lock() - defer fake.invocationsMutex.Unlock() - if fake.invocations == nil { - fake.invocations = map[string][][]interface{}{} - } - if fake.invocations[key] == nil { - fake.invocations[key] = [][]interface{}{} - } - fake.invocations[key] = append(fake.invocations[key], args) -} - -var _ forwarder.MetricForwarder = new(FakeMetricForwarder) diff --git a/src/autoscaler/fakes/fake_metric_server_creator_creator.go b/src/autoscaler/fakes/fake_metric_server_creator_creator.go deleted file mode 100644 index fa7e696361..0000000000 --- a/src/autoscaler/fakes/fake_metric_server_creator_creator.go +++ /dev/null @@ -1,117 +0,0 @@ -// Code generated by counterfeiter. DO NOT EDIT. -package fakes - -import ( - "net/http" - "sync" - - "code.cloudfoundry.org/app-autoscaler/src/autoscaler/eventgenerator/client" - lager "code.cloudfoundry.org/lager/v3" -) - -type FakeMetricServerClientCreator struct { - NewMetricServerClientStub func(lager.Logger, string, *http.Client) client.MetricClient - newMetricServerClientMutex sync.RWMutex - newMetricServerClientArgsForCall []struct { - arg1 lager.Logger - arg2 string - arg3 *http.Client - } - newMetricServerClientReturns struct { - result1 client.MetricClient - } - newMetricServerClientReturnsOnCall map[int]struct { - result1 client.MetricClient - } - invocations map[string][][]interface{} - invocationsMutex sync.RWMutex -} - -func (fake *FakeMetricServerClientCreator) NewMetricServerClient(arg1 lager.Logger, arg2 string, arg3 *http.Client) client.MetricClient { - fake.newMetricServerClientMutex.Lock() - ret, specificReturn := fake.newMetricServerClientReturnsOnCall[len(fake.newMetricServerClientArgsForCall)] - fake.newMetricServerClientArgsForCall = append(fake.newMetricServerClientArgsForCall, struct { - arg1 lager.Logger - arg2 string - arg3 *http.Client - }{arg1, arg2, arg3}) - stub := fake.NewMetricServerClientStub - fakeReturns := fake.newMetricServerClientReturns - fake.recordInvocation("NewMetricServerClient", []interface{}{arg1, arg2, arg3}) - fake.newMetricServerClientMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3) - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeMetricServerClientCreator) NewMetricServerClientCallCount() int { - fake.newMetricServerClientMutex.RLock() - defer fake.newMetricServerClientMutex.RUnlock() - return len(fake.newMetricServerClientArgsForCall) -} - -func (fake *FakeMetricServerClientCreator) NewMetricServerClientCalls(stub func(lager.Logger, string, *http.Client) client.MetricClient) { - fake.newMetricServerClientMutex.Lock() - defer fake.newMetricServerClientMutex.Unlock() - fake.NewMetricServerClientStub = stub -} - -func (fake *FakeMetricServerClientCreator) NewMetricServerClientArgsForCall(i int) (lager.Logger, string, *http.Client) { - fake.newMetricServerClientMutex.RLock() - defer fake.newMetricServerClientMutex.RUnlock() - argsForCall := fake.newMetricServerClientArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3 -} - -func (fake *FakeMetricServerClientCreator) NewMetricServerClientReturns(result1 client.MetricClient) { - fake.newMetricServerClientMutex.Lock() - defer fake.newMetricServerClientMutex.Unlock() - fake.NewMetricServerClientStub = nil - fake.newMetricServerClientReturns = struct { - result1 client.MetricClient - }{result1} -} - -func (fake *FakeMetricServerClientCreator) NewMetricServerClientReturnsOnCall(i int, result1 client.MetricClient) { - fake.newMetricServerClientMutex.Lock() - defer fake.newMetricServerClientMutex.Unlock() - fake.NewMetricServerClientStub = nil - if fake.newMetricServerClientReturnsOnCall == nil { - fake.newMetricServerClientReturnsOnCall = make(map[int]struct { - result1 client.MetricClient - }) - } - fake.newMetricServerClientReturnsOnCall[i] = struct { - result1 client.MetricClient - }{result1} -} - -func (fake *FakeMetricServerClientCreator) Invocations() map[string][][]interface{} { - fake.invocationsMutex.RLock() - defer fake.invocationsMutex.RUnlock() - fake.newMetricServerClientMutex.RLock() - defer fake.newMetricServerClientMutex.RUnlock() - copiedInvocations := map[string][][]interface{}{} - for key, value := range fake.invocations { - copiedInvocations[key] = value - } - return copiedInvocations -} - -func (fake *FakeMetricServerClientCreator) recordInvocation(key string, args []interface{}) { - fake.invocationsMutex.Lock() - defer fake.invocationsMutex.Unlock() - if fake.invocations == nil { - fake.invocations = map[string][][]interface{}{} - } - if fake.invocations[key] == nil { - fake.invocations[key] = [][]interface{}{} - } - fake.invocations[key] = append(fake.invocations[key], args) -} - -var _ client.MetricServerClientCreator = new(FakeMetricServerClientCreator) diff --git a/src/autoscaler/fakes/fake_operator.go b/src/autoscaler/fakes/fake_operator.go deleted file mode 100644 index 4ea8f3c722..0000000000 --- a/src/autoscaler/fakes/fake_operator.go +++ /dev/null @@ -1,57 +0,0 @@ -// Code generated by counterfeiter. DO NOT EDIT. -package fakes - -import ( - "code.cloudfoundry.org/app-autoscaler/src/autoscaler/operator" - "sync" -) - -type FakeOperator struct { - OperateStub func() - operateMutex sync.RWMutex - operateArgsForCall []struct{} - invocations map[string][][]interface{} - invocationsMutex sync.RWMutex -} - -func (fake *FakeOperator) Operate() { - fake.operateMutex.Lock() - fake.operateArgsForCall = append(fake.operateArgsForCall, struct{}{}) - fake.recordInvocation("Operate", []interface{}{}) - fake.operateMutex.Unlock() - if fake.OperateStub != nil { - fake.OperateStub() - } -} - -func (fake *FakeOperator) OperateCallCount() int { - fake.operateMutex.RLock() - defer fake.operateMutex.RUnlock() - return len(fake.operateArgsForCall) -} - -func (fake *FakeOperator) Invocations() map[string][][]interface{} { - fake.invocationsMutex.RLock() - defer fake.invocationsMutex.RUnlock() - fake.operateMutex.RLock() - defer fake.operateMutex.RUnlock() - copiedInvocations := map[string][][]interface{}{} - for key, value := range fake.invocations { - copiedInvocations[key] = value - } - return copiedInvocations -} - -func (fake *FakeOperator) recordInvocation(key string, args []interface{}) { - fake.invocationsMutex.Lock() - defer fake.invocationsMutex.Unlock() - if fake.invocations == nil { - fake.invocations = map[string][][]interface{}{} - } - if fake.invocations[key] == nil { - fake.invocations[key] = [][]interface{}{} - } - fake.invocations[key] = append(fake.invocations[key], args) -} - -var _ operator.Operator = new(FakeOperator) diff --git a/src/autoscaler/fakes/fake_plan_checker.go b/src/autoscaler/fakes/fake_plan_checker.go deleted file mode 100644 index 700493ca5f..0000000000 --- a/src/autoscaler/fakes/fake_plan_checker.go +++ /dev/null @@ -1,203 +0,0 @@ -// Code generated by counterfeiter. DO NOT EDIT. -package fakes - -import ( - "sync" - - "code.cloudfoundry.org/app-autoscaler/src/autoscaler/api/plancheck" - "code.cloudfoundry.org/app-autoscaler/src/autoscaler/models" -) - -type FakePlanChecker struct { - CheckPlanStub func(*models.ScalingPolicy, string) (bool, string, error) - checkPlanMutex sync.RWMutex - checkPlanArgsForCall []struct { - arg1 *models.ScalingPolicy - arg2 string - } - checkPlanReturns struct { - result1 bool - result2 string - result3 error - } - checkPlanReturnsOnCall map[int]struct { - result1 bool - result2 string - result3 error - } - IsPlanUpdatableStub func(string) (bool, error) - isPlanUpdatableMutex sync.RWMutex - isPlanUpdatableArgsForCall []struct { - arg1 string - } - isPlanUpdatableReturns struct { - result1 bool - result2 error - } - isPlanUpdatableReturnsOnCall map[int]struct { - result1 bool - result2 error - } - invocations map[string][][]interface{} - invocationsMutex sync.RWMutex -} - -func (fake *FakePlanChecker) CheckPlan(arg1 *models.ScalingPolicy, arg2 string) (bool, string, error) { - fake.checkPlanMutex.Lock() - ret, specificReturn := fake.checkPlanReturnsOnCall[len(fake.checkPlanArgsForCall)] - fake.checkPlanArgsForCall = append(fake.checkPlanArgsForCall, struct { - arg1 *models.ScalingPolicy - arg2 string - }{arg1, arg2}) - stub := fake.CheckPlanStub - fakeReturns := fake.checkPlanReturns - fake.recordInvocation("CheckPlan", []interface{}{arg1, arg2}) - fake.checkPlanMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) - } - if specificReturn { - return ret.result1, ret.result2, ret.result3 - } - return fakeReturns.result1, fakeReturns.result2, fakeReturns.result3 -} - -func (fake *FakePlanChecker) CheckPlanCallCount() int { - fake.checkPlanMutex.RLock() - defer fake.checkPlanMutex.RUnlock() - return len(fake.checkPlanArgsForCall) -} - -func (fake *FakePlanChecker) CheckPlanCalls(stub func(*models.ScalingPolicy, string) (bool, string, error)) { - fake.checkPlanMutex.Lock() - defer fake.checkPlanMutex.Unlock() - fake.CheckPlanStub = stub -} - -func (fake *FakePlanChecker) CheckPlanArgsForCall(i int) (*models.ScalingPolicy, string) { - fake.checkPlanMutex.RLock() - defer fake.checkPlanMutex.RUnlock() - argsForCall := fake.checkPlanArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2 -} - -func (fake *FakePlanChecker) CheckPlanReturns(result1 bool, result2 string, result3 error) { - fake.checkPlanMutex.Lock() - defer fake.checkPlanMutex.Unlock() - fake.CheckPlanStub = nil - fake.checkPlanReturns = struct { - result1 bool - result2 string - result3 error - }{result1, result2, result3} -} - -func (fake *FakePlanChecker) CheckPlanReturnsOnCall(i int, result1 bool, result2 string, result3 error) { - fake.checkPlanMutex.Lock() - defer fake.checkPlanMutex.Unlock() - fake.CheckPlanStub = nil - if fake.checkPlanReturnsOnCall == nil { - fake.checkPlanReturnsOnCall = make(map[int]struct { - result1 bool - result2 string - result3 error - }) - } - fake.checkPlanReturnsOnCall[i] = struct { - result1 bool - result2 string - result3 error - }{result1, result2, result3} -} - -func (fake *FakePlanChecker) IsPlanUpdatable(arg1 string) (bool, error) { - fake.isPlanUpdatableMutex.Lock() - ret, specificReturn := fake.isPlanUpdatableReturnsOnCall[len(fake.isPlanUpdatableArgsForCall)] - fake.isPlanUpdatableArgsForCall = append(fake.isPlanUpdatableArgsForCall, struct { - arg1 string - }{arg1}) - stub := fake.IsPlanUpdatableStub - fakeReturns := fake.isPlanUpdatableReturns - fake.recordInvocation("IsPlanUpdatable", []interface{}{arg1}) - fake.isPlanUpdatableMutex.Unlock() - if stub != nil { - return stub(arg1) - } - if specificReturn { - return ret.result1, ret.result2 - } - return fakeReturns.result1, fakeReturns.result2 -} - -func (fake *FakePlanChecker) IsPlanUpdatableCallCount() int { - fake.isPlanUpdatableMutex.RLock() - defer fake.isPlanUpdatableMutex.RUnlock() - return len(fake.isPlanUpdatableArgsForCall) -} - -func (fake *FakePlanChecker) IsPlanUpdatableCalls(stub func(string) (bool, error)) { - fake.isPlanUpdatableMutex.Lock() - defer fake.isPlanUpdatableMutex.Unlock() - fake.IsPlanUpdatableStub = stub -} - -func (fake *FakePlanChecker) IsPlanUpdatableArgsForCall(i int) string { - fake.isPlanUpdatableMutex.RLock() - defer fake.isPlanUpdatableMutex.RUnlock() - argsForCall := fake.isPlanUpdatableArgsForCall[i] - return argsForCall.arg1 -} - -func (fake *FakePlanChecker) IsPlanUpdatableReturns(result1 bool, result2 error) { - fake.isPlanUpdatableMutex.Lock() - defer fake.isPlanUpdatableMutex.Unlock() - fake.IsPlanUpdatableStub = nil - fake.isPlanUpdatableReturns = struct { - result1 bool - result2 error - }{result1, result2} -} - -func (fake *FakePlanChecker) IsPlanUpdatableReturnsOnCall(i int, result1 bool, result2 error) { - fake.isPlanUpdatableMutex.Lock() - defer fake.isPlanUpdatableMutex.Unlock() - fake.IsPlanUpdatableStub = nil - if fake.isPlanUpdatableReturnsOnCall == nil { - fake.isPlanUpdatableReturnsOnCall = make(map[int]struct { - result1 bool - result2 error - }) - } - fake.isPlanUpdatableReturnsOnCall[i] = struct { - result1 bool - result2 error - }{result1, result2} -} - -func (fake *FakePlanChecker) Invocations() map[string][][]interface{} { - fake.invocationsMutex.RLock() - defer fake.invocationsMutex.RUnlock() - fake.checkPlanMutex.RLock() - defer fake.checkPlanMutex.RUnlock() - fake.isPlanUpdatableMutex.RLock() - defer fake.isPlanUpdatableMutex.RUnlock() - copiedInvocations := map[string][][]interface{}{} - for key, value := range fake.invocations { - copiedInvocations[key] = value - } - return copiedInvocations -} - -func (fake *FakePlanChecker) recordInvocation(key string, args []interface{}) { - fake.invocationsMutex.Lock() - defer fake.invocationsMutex.Unlock() - if fake.invocations == nil { - fake.invocations = map[string][][]interface{}{} - } - if fake.invocations[key] == nil { - fake.invocations[key] = [][]interface{}{} - } - fake.invocations[key] = append(fake.invocations[key], args) -} - -var _ plancheck.PlanChecker = new(FakePlanChecker) diff --git a/src/autoscaler/fakes/fake_policy_db.go b/src/autoscaler/fakes/fake_policy_db.go deleted file mode 100644 index bb17d7b499..0000000000 --- a/src/autoscaler/fakes/fake_policy_db.go +++ /dev/null @@ -1,1018 +0,0 @@ -// Code generated by counterfeiter. DO NOT EDIT. -package fakes - -import ( - "context" - "database/sql" - "sync" - - "code.cloudfoundry.org/app-autoscaler/src/autoscaler/db" - "code.cloudfoundry.org/app-autoscaler/src/autoscaler/models" -) - -type FakePolicyDB struct { - CloseStub func() error - closeMutex sync.RWMutex - closeArgsForCall []struct { - } - closeReturns struct { - result1 error - } - closeReturnsOnCall map[int]struct { - result1 error - } - DeleteCredentialStub func(context.Context, string) error - deleteCredentialMutex sync.RWMutex - deleteCredentialArgsForCall []struct { - arg1 context.Context - arg2 string - } - deleteCredentialReturns struct { - result1 error - } - deleteCredentialReturnsOnCall map[int]struct { - result1 error - } - DeletePoliciesByPolicyGuidStub func(context.Context, string) ([]string, error) - deletePoliciesByPolicyGuidMutex sync.RWMutex - deletePoliciesByPolicyGuidArgsForCall []struct { - arg1 context.Context - arg2 string - } - deletePoliciesByPolicyGuidReturns struct { - result1 []string - result2 error - } - deletePoliciesByPolicyGuidReturnsOnCall map[int]struct { - result1 []string - result2 error - } - DeletePolicyStub func(context.Context, string) error - deletePolicyMutex sync.RWMutex - deletePolicyArgsForCall []struct { - arg1 context.Context - arg2 string - } - deletePolicyReturns struct { - result1 error - } - deletePolicyReturnsOnCall map[int]struct { - result1 error - } - GetAppIdsStub func() (map[string]bool, error) - getAppIdsMutex sync.RWMutex - getAppIdsArgsForCall []struct { - } - getAppIdsReturns struct { - result1 map[string]bool - result2 error - } - getAppIdsReturnsOnCall map[int]struct { - result1 map[string]bool - result2 error - } - GetAppPolicyStub func(context.Context, string) (*models.ScalingPolicy, error) - getAppPolicyMutex sync.RWMutex - getAppPolicyArgsForCall []struct { - arg1 context.Context - arg2 string - } - getAppPolicyReturns struct { - result1 *models.ScalingPolicy - result2 error - } - getAppPolicyReturnsOnCall map[int]struct { - result1 *models.ScalingPolicy - result2 error - } - GetCredentialStub func(string) (*models.Credential, error) - getCredentialMutex sync.RWMutex - getCredentialArgsForCall []struct { - arg1 string - } - getCredentialReturns struct { - result1 *models.Credential - result2 error - } - getCredentialReturnsOnCall map[int]struct { - result1 *models.Credential - result2 error - } - GetDBStatusStub func() sql.DBStats - getDBStatusMutex sync.RWMutex - getDBStatusArgsForCall []struct { - } - getDBStatusReturns struct { - result1 sql.DBStats - } - getDBStatusReturnsOnCall map[int]struct { - result1 sql.DBStats - } - PingStub func() error - pingMutex sync.RWMutex - pingArgsForCall []struct { - } - pingReturns struct { - result1 error - } - pingReturnsOnCall map[int]struct { - result1 error - } - RetrievePoliciesStub func() ([]*models.PolicyJson, error) - retrievePoliciesMutex sync.RWMutex - retrievePoliciesArgsForCall []struct { - } - retrievePoliciesReturns struct { - result1 []*models.PolicyJson - result2 error - } - retrievePoliciesReturnsOnCall map[int]struct { - result1 []*models.PolicyJson - result2 error - } - SaveAppPolicyStub func(context.Context, string, *models.ScalingPolicy, string) error - saveAppPolicyMutex sync.RWMutex - saveAppPolicyArgsForCall []struct { - arg1 context.Context - arg2 string - arg3 *models.ScalingPolicy - arg4 string - } - saveAppPolicyReturns struct { - result1 error - } - saveAppPolicyReturnsOnCall map[int]struct { - result1 error - } - SaveCredentialStub func(context.Context, string, models.Credential) error - saveCredentialMutex sync.RWMutex - saveCredentialArgsForCall []struct { - arg1 context.Context - arg2 string - arg3 models.Credential - } - saveCredentialReturns struct { - result1 error - } - saveCredentialReturnsOnCall map[int]struct { - result1 error - } - SetOrUpdateDefaultAppPolicyStub func(context.Context, []string, string, *models.ScalingPolicy, string) ([]string, error) - setOrUpdateDefaultAppPolicyMutex sync.RWMutex - setOrUpdateDefaultAppPolicyArgsForCall []struct { - arg1 context.Context - arg2 []string - arg3 string - arg4 *models.ScalingPolicy - arg5 string - } - setOrUpdateDefaultAppPolicyReturns struct { - result1 []string - result2 error - } - setOrUpdateDefaultAppPolicyReturnsOnCall map[int]struct { - result1 []string - result2 error - } - invocations map[string][][]interface{} - invocationsMutex sync.RWMutex -} - -func (fake *FakePolicyDB) Close() error { - fake.closeMutex.Lock() - ret, specificReturn := fake.closeReturnsOnCall[len(fake.closeArgsForCall)] - fake.closeArgsForCall = append(fake.closeArgsForCall, struct { - }{}) - stub := fake.CloseStub - fakeReturns := fake.closeReturns - fake.recordInvocation("Close", []interface{}{}) - fake.closeMutex.Unlock() - if stub != nil { - return stub() - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakePolicyDB) CloseCallCount() int { - fake.closeMutex.RLock() - defer fake.closeMutex.RUnlock() - return len(fake.closeArgsForCall) -} - -func (fake *FakePolicyDB) CloseCalls(stub func() error) { - fake.closeMutex.Lock() - defer fake.closeMutex.Unlock() - fake.CloseStub = stub -} - -func (fake *FakePolicyDB) CloseReturns(result1 error) { - fake.closeMutex.Lock() - defer fake.closeMutex.Unlock() - fake.CloseStub = nil - fake.closeReturns = struct { - result1 error - }{result1} -} - -func (fake *FakePolicyDB) CloseReturnsOnCall(i int, result1 error) { - fake.closeMutex.Lock() - defer fake.closeMutex.Unlock() - fake.CloseStub = nil - if fake.closeReturnsOnCall == nil { - fake.closeReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.closeReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakePolicyDB) DeleteCredential(arg1 context.Context, arg2 string) error { - fake.deleteCredentialMutex.Lock() - ret, specificReturn := fake.deleteCredentialReturnsOnCall[len(fake.deleteCredentialArgsForCall)] - fake.deleteCredentialArgsForCall = append(fake.deleteCredentialArgsForCall, struct { - arg1 context.Context - arg2 string - }{arg1, arg2}) - stub := fake.DeleteCredentialStub - fakeReturns := fake.deleteCredentialReturns - fake.recordInvocation("DeleteCredential", []interface{}{arg1, arg2}) - fake.deleteCredentialMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakePolicyDB) DeleteCredentialCallCount() int { - fake.deleteCredentialMutex.RLock() - defer fake.deleteCredentialMutex.RUnlock() - return len(fake.deleteCredentialArgsForCall) -} - -func (fake *FakePolicyDB) DeleteCredentialCalls(stub func(context.Context, string) error) { - fake.deleteCredentialMutex.Lock() - defer fake.deleteCredentialMutex.Unlock() - fake.DeleteCredentialStub = stub -} - -func (fake *FakePolicyDB) DeleteCredentialArgsForCall(i int) (context.Context, string) { - fake.deleteCredentialMutex.RLock() - defer fake.deleteCredentialMutex.RUnlock() - argsForCall := fake.deleteCredentialArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2 -} - -func (fake *FakePolicyDB) DeleteCredentialReturns(result1 error) { - fake.deleteCredentialMutex.Lock() - defer fake.deleteCredentialMutex.Unlock() - fake.DeleteCredentialStub = nil - fake.deleteCredentialReturns = struct { - result1 error - }{result1} -} - -func (fake *FakePolicyDB) DeleteCredentialReturnsOnCall(i int, result1 error) { - fake.deleteCredentialMutex.Lock() - defer fake.deleteCredentialMutex.Unlock() - fake.DeleteCredentialStub = nil - if fake.deleteCredentialReturnsOnCall == nil { - fake.deleteCredentialReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.deleteCredentialReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakePolicyDB) DeletePoliciesByPolicyGuid(arg1 context.Context, arg2 string) ([]string, error) { - fake.deletePoliciesByPolicyGuidMutex.Lock() - ret, specificReturn := fake.deletePoliciesByPolicyGuidReturnsOnCall[len(fake.deletePoliciesByPolicyGuidArgsForCall)] - fake.deletePoliciesByPolicyGuidArgsForCall = append(fake.deletePoliciesByPolicyGuidArgsForCall, struct { - arg1 context.Context - arg2 string - }{arg1, arg2}) - stub := fake.DeletePoliciesByPolicyGuidStub - fakeReturns := fake.deletePoliciesByPolicyGuidReturns - fake.recordInvocation("DeletePoliciesByPolicyGuid", []interface{}{arg1, arg2}) - fake.deletePoliciesByPolicyGuidMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) - } - if specificReturn { - return ret.result1, ret.result2 - } - return fakeReturns.result1, fakeReturns.result2 -} - -func (fake *FakePolicyDB) DeletePoliciesByPolicyGuidCallCount() int { - fake.deletePoliciesByPolicyGuidMutex.RLock() - defer fake.deletePoliciesByPolicyGuidMutex.RUnlock() - return len(fake.deletePoliciesByPolicyGuidArgsForCall) -} - -func (fake *FakePolicyDB) DeletePoliciesByPolicyGuidCalls(stub func(context.Context, string) ([]string, error)) { - fake.deletePoliciesByPolicyGuidMutex.Lock() - defer fake.deletePoliciesByPolicyGuidMutex.Unlock() - fake.DeletePoliciesByPolicyGuidStub = stub -} - -func (fake *FakePolicyDB) DeletePoliciesByPolicyGuidArgsForCall(i int) (context.Context, string) { - fake.deletePoliciesByPolicyGuidMutex.RLock() - defer fake.deletePoliciesByPolicyGuidMutex.RUnlock() - argsForCall := fake.deletePoliciesByPolicyGuidArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2 -} - -func (fake *FakePolicyDB) DeletePoliciesByPolicyGuidReturns(result1 []string, result2 error) { - fake.deletePoliciesByPolicyGuidMutex.Lock() - defer fake.deletePoliciesByPolicyGuidMutex.Unlock() - fake.DeletePoliciesByPolicyGuidStub = nil - fake.deletePoliciesByPolicyGuidReturns = struct { - result1 []string - result2 error - }{result1, result2} -} - -func (fake *FakePolicyDB) DeletePoliciesByPolicyGuidReturnsOnCall(i int, result1 []string, result2 error) { - fake.deletePoliciesByPolicyGuidMutex.Lock() - defer fake.deletePoliciesByPolicyGuidMutex.Unlock() - fake.DeletePoliciesByPolicyGuidStub = nil - if fake.deletePoliciesByPolicyGuidReturnsOnCall == nil { - fake.deletePoliciesByPolicyGuidReturnsOnCall = make(map[int]struct { - result1 []string - result2 error - }) - } - fake.deletePoliciesByPolicyGuidReturnsOnCall[i] = struct { - result1 []string - result2 error - }{result1, result2} -} - -func (fake *FakePolicyDB) DeletePolicy(arg1 context.Context, arg2 string) error { - fake.deletePolicyMutex.Lock() - ret, specificReturn := fake.deletePolicyReturnsOnCall[len(fake.deletePolicyArgsForCall)] - fake.deletePolicyArgsForCall = append(fake.deletePolicyArgsForCall, struct { - arg1 context.Context - arg2 string - }{arg1, arg2}) - stub := fake.DeletePolicyStub - fakeReturns := fake.deletePolicyReturns - fake.recordInvocation("DeletePolicy", []interface{}{arg1, arg2}) - fake.deletePolicyMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakePolicyDB) DeletePolicyCallCount() int { - fake.deletePolicyMutex.RLock() - defer fake.deletePolicyMutex.RUnlock() - return len(fake.deletePolicyArgsForCall) -} - -func (fake *FakePolicyDB) DeletePolicyCalls(stub func(context.Context, string) error) { - fake.deletePolicyMutex.Lock() - defer fake.deletePolicyMutex.Unlock() - fake.DeletePolicyStub = stub -} - -func (fake *FakePolicyDB) DeletePolicyArgsForCall(i int) (context.Context, string) { - fake.deletePolicyMutex.RLock() - defer fake.deletePolicyMutex.RUnlock() - argsForCall := fake.deletePolicyArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2 -} - -func (fake *FakePolicyDB) DeletePolicyReturns(result1 error) { - fake.deletePolicyMutex.Lock() - defer fake.deletePolicyMutex.Unlock() - fake.DeletePolicyStub = nil - fake.deletePolicyReturns = struct { - result1 error - }{result1} -} - -func (fake *FakePolicyDB) DeletePolicyReturnsOnCall(i int, result1 error) { - fake.deletePolicyMutex.Lock() - defer fake.deletePolicyMutex.Unlock() - fake.DeletePolicyStub = nil - if fake.deletePolicyReturnsOnCall == nil { - fake.deletePolicyReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.deletePolicyReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakePolicyDB) GetAppIds() (map[string]bool, error) { - fake.getAppIdsMutex.Lock() - ret, specificReturn := fake.getAppIdsReturnsOnCall[len(fake.getAppIdsArgsForCall)] - fake.getAppIdsArgsForCall = append(fake.getAppIdsArgsForCall, struct { - }{}) - stub := fake.GetAppIdsStub - fakeReturns := fake.getAppIdsReturns - fake.recordInvocation("GetAppIds", []interface{}{}) - fake.getAppIdsMutex.Unlock() - if stub != nil { - return stub() - } - if specificReturn { - return ret.result1, ret.result2 - } - return fakeReturns.result1, fakeReturns.result2 -} - -func (fake *FakePolicyDB) GetAppIdsCallCount() int { - fake.getAppIdsMutex.RLock() - defer fake.getAppIdsMutex.RUnlock() - return len(fake.getAppIdsArgsForCall) -} - -func (fake *FakePolicyDB) GetAppIdsCalls(stub func() (map[string]bool, error)) { - fake.getAppIdsMutex.Lock() - defer fake.getAppIdsMutex.Unlock() - fake.GetAppIdsStub = stub -} - -func (fake *FakePolicyDB) GetAppIdsReturns(result1 map[string]bool, result2 error) { - fake.getAppIdsMutex.Lock() - defer fake.getAppIdsMutex.Unlock() - fake.GetAppIdsStub = nil - fake.getAppIdsReturns = struct { - result1 map[string]bool - result2 error - }{result1, result2} -} - -func (fake *FakePolicyDB) GetAppIdsReturnsOnCall(i int, result1 map[string]bool, result2 error) { - fake.getAppIdsMutex.Lock() - defer fake.getAppIdsMutex.Unlock() - fake.GetAppIdsStub = nil - if fake.getAppIdsReturnsOnCall == nil { - fake.getAppIdsReturnsOnCall = make(map[int]struct { - result1 map[string]bool - result2 error - }) - } - fake.getAppIdsReturnsOnCall[i] = struct { - result1 map[string]bool - result2 error - }{result1, result2} -} - -func (fake *FakePolicyDB) GetAppPolicy(arg1 context.Context, arg2 string) (*models.ScalingPolicy, error) { - fake.getAppPolicyMutex.Lock() - ret, specificReturn := fake.getAppPolicyReturnsOnCall[len(fake.getAppPolicyArgsForCall)] - fake.getAppPolicyArgsForCall = append(fake.getAppPolicyArgsForCall, struct { - arg1 context.Context - arg2 string - }{arg1, arg2}) - stub := fake.GetAppPolicyStub - fakeReturns := fake.getAppPolicyReturns - fake.recordInvocation("GetAppPolicy", []interface{}{arg1, arg2}) - fake.getAppPolicyMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) - } - if specificReturn { - return ret.result1, ret.result2 - } - return fakeReturns.result1, fakeReturns.result2 -} - -func (fake *FakePolicyDB) GetAppPolicyCallCount() int { - fake.getAppPolicyMutex.RLock() - defer fake.getAppPolicyMutex.RUnlock() - return len(fake.getAppPolicyArgsForCall) -} - -func (fake *FakePolicyDB) GetAppPolicyCalls(stub func(context.Context, string) (*models.ScalingPolicy, error)) { - fake.getAppPolicyMutex.Lock() - defer fake.getAppPolicyMutex.Unlock() - fake.GetAppPolicyStub = stub -} - -func (fake *FakePolicyDB) GetAppPolicyArgsForCall(i int) (context.Context, string) { - fake.getAppPolicyMutex.RLock() - defer fake.getAppPolicyMutex.RUnlock() - argsForCall := fake.getAppPolicyArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2 -} - -func (fake *FakePolicyDB) GetAppPolicyReturns(result1 *models.ScalingPolicy, result2 error) { - fake.getAppPolicyMutex.Lock() - defer fake.getAppPolicyMutex.Unlock() - fake.GetAppPolicyStub = nil - fake.getAppPolicyReturns = struct { - result1 *models.ScalingPolicy - result2 error - }{result1, result2} -} - -func (fake *FakePolicyDB) GetAppPolicyReturnsOnCall(i int, result1 *models.ScalingPolicy, result2 error) { - fake.getAppPolicyMutex.Lock() - defer fake.getAppPolicyMutex.Unlock() - fake.GetAppPolicyStub = nil - if fake.getAppPolicyReturnsOnCall == nil { - fake.getAppPolicyReturnsOnCall = make(map[int]struct { - result1 *models.ScalingPolicy - result2 error - }) - } - fake.getAppPolicyReturnsOnCall[i] = struct { - result1 *models.ScalingPolicy - result2 error - }{result1, result2} -} - -func (fake *FakePolicyDB) GetCredential(arg1 string) (*models.Credential, error) { - fake.getCredentialMutex.Lock() - ret, specificReturn := fake.getCredentialReturnsOnCall[len(fake.getCredentialArgsForCall)] - fake.getCredentialArgsForCall = append(fake.getCredentialArgsForCall, struct { - arg1 string - }{arg1}) - stub := fake.GetCredentialStub - fakeReturns := fake.getCredentialReturns - fake.recordInvocation("GetCredential", []interface{}{arg1}) - fake.getCredentialMutex.Unlock() - if stub != nil { - return stub(arg1) - } - if specificReturn { - return ret.result1, ret.result2 - } - return fakeReturns.result1, fakeReturns.result2 -} - -func (fake *FakePolicyDB) GetCredentialCallCount() int { - fake.getCredentialMutex.RLock() - defer fake.getCredentialMutex.RUnlock() - return len(fake.getCredentialArgsForCall) -} - -func (fake *FakePolicyDB) GetCredentialCalls(stub func(string) (*models.Credential, error)) { - fake.getCredentialMutex.Lock() - defer fake.getCredentialMutex.Unlock() - fake.GetCredentialStub = stub -} - -func (fake *FakePolicyDB) GetCredentialArgsForCall(i int) string { - fake.getCredentialMutex.RLock() - defer fake.getCredentialMutex.RUnlock() - argsForCall := fake.getCredentialArgsForCall[i] - return argsForCall.arg1 -} - -func (fake *FakePolicyDB) GetCredentialReturns(result1 *models.Credential, result2 error) { - fake.getCredentialMutex.Lock() - defer fake.getCredentialMutex.Unlock() - fake.GetCredentialStub = nil - fake.getCredentialReturns = struct { - result1 *models.Credential - result2 error - }{result1, result2} -} - -func (fake *FakePolicyDB) GetCredentialReturnsOnCall(i int, result1 *models.Credential, result2 error) { - fake.getCredentialMutex.Lock() - defer fake.getCredentialMutex.Unlock() - fake.GetCredentialStub = nil - if fake.getCredentialReturnsOnCall == nil { - fake.getCredentialReturnsOnCall = make(map[int]struct { - result1 *models.Credential - result2 error - }) - } - fake.getCredentialReturnsOnCall[i] = struct { - result1 *models.Credential - result2 error - }{result1, result2} -} - -func (fake *FakePolicyDB) GetDBStatus() sql.DBStats { - fake.getDBStatusMutex.Lock() - ret, specificReturn := fake.getDBStatusReturnsOnCall[len(fake.getDBStatusArgsForCall)] - fake.getDBStatusArgsForCall = append(fake.getDBStatusArgsForCall, struct { - }{}) - stub := fake.GetDBStatusStub - fakeReturns := fake.getDBStatusReturns - fake.recordInvocation("GetDBStatus", []interface{}{}) - fake.getDBStatusMutex.Unlock() - if stub != nil { - return stub() - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakePolicyDB) GetDBStatusCallCount() int { - fake.getDBStatusMutex.RLock() - defer fake.getDBStatusMutex.RUnlock() - return len(fake.getDBStatusArgsForCall) -} - -func (fake *FakePolicyDB) GetDBStatusCalls(stub func() sql.DBStats) { - fake.getDBStatusMutex.Lock() - defer fake.getDBStatusMutex.Unlock() - fake.GetDBStatusStub = stub -} - -func (fake *FakePolicyDB) GetDBStatusReturns(result1 sql.DBStats) { - fake.getDBStatusMutex.Lock() - defer fake.getDBStatusMutex.Unlock() - fake.GetDBStatusStub = nil - fake.getDBStatusReturns = struct { - result1 sql.DBStats - }{result1} -} - -func (fake *FakePolicyDB) GetDBStatusReturnsOnCall(i int, result1 sql.DBStats) { - fake.getDBStatusMutex.Lock() - defer fake.getDBStatusMutex.Unlock() - fake.GetDBStatusStub = nil - if fake.getDBStatusReturnsOnCall == nil { - fake.getDBStatusReturnsOnCall = make(map[int]struct { - result1 sql.DBStats - }) - } - fake.getDBStatusReturnsOnCall[i] = struct { - result1 sql.DBStats - }{result1} -} - -func (fake *FakePolicyDB) Ping() error { - fake.pingMutex.Lock() - ret, specificReturn := fake.pingReturnsOnCall[len(fake.pingArgsForCall)] - fake.pingArgsForCall = append(fake.pingArgsForCall, struct { - }{}) - stub := fake.PingStub - fakeReturns := fake.pingReturns - fake.recordInvocation("Ping", []interface{}{}) - fake.pingMutex.Unlock() - if stub != nil { - return stub() - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakePolicyDB) PingCallCount() int { - fake.pingMutex.RLock() - defer fake.pingMutex.RUnlock() - return len(fake.pingArgsForCall) -} - -func (fake *FakePolicyDB) PingCalls(stub func() error) { - fake.pingMutex.Lock() - defer fake.pingMutex.Unlock() - fake.PingStub = stub -} - -func (fake *FakePolicyDB) PingReturns(result1 error) { - fake.pingMutex.Lock() - defer fake.pingMutex.Unlock() - fake.PingStub = nil - fake.pingReturns = struct { - result1 error - }{result1} -} - -func (fake *FakePolicyDB) PingReturnsOnCall(i int, result1 error) { - fake.pingMutex.Lock() - defer fake.pingMutex.Unlock() - fake.PingStub = nil - if fake.pingReturnsOnCall == nil { - fake.pingReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.pingReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakePolicyDB) RetrievePolicies() ([]*models.PolicyJson, error) { - fake.retrievePoliciesMutex.Lock() - ret, specificReturn := fake.retrievePoliciesReturnsOnCall[len(fake.retrievePoliciesArgsForCall)] - fake.retrievePoliciesArgsForCall = append(fake.retrievePoliciesArgsForCall, struct { - }{}) - stub := fake.RetrievePoliciesStub - fakeReturns := fake.retrievePoliciesReturns - fake.recordInvocation("RetrievePolicies", []interface{}{}) - fake.retrievePoliciesMutex.Unlock() - if stub != nil { - return stub() - } - if specificReturn { - return ret.result1, ret.result2 - } - return fakeReturns.result1, fakeReturns.result2 -} - -func (fake *FakePolicyDB) RetrievePoliciesCallCount() int { - fake.retrievePoliciesMutex.RLock() - defer fake.retrievePoliciesMutex.RUnlock() - return len(fake.retrievePoliciesArgsForCall) -} - -func (fake *FakePolicyDB) RetrievePoliciesCalls(stub func() ([]*models.PolicyJson, error)) { - fake.retrievePoliciesMutex.Lock() - defer fake.retrievePoliciesMutex.Unlock() - fake.RetrievePoliciesStub = stub -} - -func (fake *FakePolicyDB) RetrievePoliciesReturns(result1 []*models.PolicyJson, result2 error) { - fake.retrievePoliciesMutex.Lock() - defer fake.retrievePoliciesMutex.Unlock() - fake.RetrievePoliciesStub = nil - fake.retrievePoliciesReturns = struct { - result1 []*models.PolicyJson - result2 error - }{result1, result2} -} - -func (fake *FakePolicyDB) RetrievePoliciesReturnsOnCall(i int, result1 []*models.PolicyJson, result2 error) { - fake.retrievePoliciesMutex.Lock() - defer fake.retrievePoliciesMutex.Unlock() - fake.RetrievePoliciesStub = nil - if fake.retrievePoliciesReturnsOnCall == nil { - fake.retrievePoliciesReturnsOnCall = make(map[int]struct { - result1 []*models.PolicyJson - result2 error - }) - } - fake.retrievePoliciesReturnsOnCall[i] = struct { - result1 []*models.PolicyJson - result2 error - }{result1, result2} -} - -func (fake *FakePolicyDB) SaveAppPolicy(arg1 context.Context, arg2 string, arg3 *models.ScalingPolicy, arg4 string) error { - fake.saveAppPolicyMutex.Lock() - ret, specificReturn := fake.saveAppPolicyReturnsOnCall[len(fake.saveAppPolicyArgsForCall)] - fake.saveAppPolicyArgsForCall = append(fake.saveAppPolicyArgsForCall, struct { - arg1 context.Context - arg2 string - arg3 *models.ScalingPolicy - arg4 string - }{arg1, arg2, arg3, arg4}) - stub := fake.SaveAppPolicyStub - fakeReturns := fake.saveAppPolicyReturns - fake.recordInvocation("SaveAppPolicy", []interface{}{arg1, arg2, arg3, arg4}) - fake.saveAppPolicyMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3, arg4) - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakePolicyDB) SaveAppPolicyCallCount() int { - fake.saveAppPolicyMutex.RLock() - defer fake.saveAppPolicyMutex.RUnlock() - return len(fake.saveAppPolicyArgsForCall) -} - -func (fake *FakePolicyDB) SaveAppPolicyCalls(stub func(context.Context, string, *models.ScalingPolicy, string) error) { - fake.saveAppPolicyMutex.Lock() - defer fake.saveAppPolicyMutex.Unlock() - fake.SaveAppPolicyStub = stub -} - -func (fake *FakePolicyDB) SaveAppPolicyArgsForCall(i int) (context.Context, string, *models.ScalingPolicy, string) { - fake.saveAppPolicyMutex.RLock() - defer fake.saveAppPolicyMutex.RUnlock() - argsForCall := fake.saveAppPolicyArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3, argsForCall.arg4 -} - -func (fake *FakePolicyDB) SaveAppPolicyReturns(result1 error) { - fake.saveAppPolicyMutex.Lock() - defer fake.saveAppPolicyMutex.Unlock() - fake.SaveAppPolicyStub = nil - fake.saveAppPolicyReturns = struct { - result1 error - }{result1} -} - -func (fake *FakePolicyDB) SaveAppPolicyReturnsOnCall(i int, result1 error) { - fake.saveAppPolicyMutex.Lock() - defer fake.saveAppPolicyMutex.Unlock() - fake.SaveAppPolicyStub = nil - if fake.saveAppPolicyReturnsOnCall == nil { - fake.saveAppPolicyReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.saveAppPolicyReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakePolicyDB) SaveCredential(arg1 context.Context, arg2 string, arg3 models.Credential) error { - fake.saveCredentialMutex.Lock() - ret, specificReturn := fake.saveCredentialReturnsOnCall[len(fake.saveCredentialArgsForCall)] - fake.saveCredentialArgsForCall = append(fake.saveCredentialArgsForCall, struct { - arg1 context.Context - arg2 string - arg3 models.Credential - }{arg1, arg2, arg3}) - stub := fake.SaveCredentialStub - fakeReturns := fake.saveCredentialReturns - fake.recordInvocation("SaveCredential", []interface{}{arg1, arg2, arg3}) - fake.saveCredentialMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3) - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakePolicyDB) SaveCredentialCallCount() int { - fake.saveCredentialMutex.RLock() - defer fake.saveCredentialMutex.RUnlock() - return len(fake.saveCredentialArgsForCall) -} - -func (fake *FakePolicyDB) SaveCredentialCalls(stub func(context.Context, string, models.Credential) error) { - fake.saveCredentialMutex.Lock() - defer fake.saveCredentialMutex.Unlock() - fake.SaveCredentialStub = stub -} - -func (fake *FakePolicyDB) SaveCredentialArgsForCall(i int) (context.Context, string, models.Credential) { - fake.saveCredentialMutex.RLock() - defer fake.saveCredentialMutex.RUnlock() - argsForCall := fake.saveCredentialArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3 -} - -func (fake *FakePolicyDB) SaveCredentialReturns(result1 error) { - fake.saveCredentialMutex.Lock() - defer fake.saveCredentialMutex.Unlock() - fake.SaveCredentialStub = nil - fake.saveCredentialReturns = struct { - result1 error - }{result1} -} - -func (fake *FakePolicyDB) SaveCredentialReturnsOnCall(i int, result1 error) { - fake.saveCredentialMutex.Lock() - defer fake.saveCredentialMutex.Unlock() - fake.SaveCredentialStub = nil - if fake.saveCredentialReturnsOnCall == nil { - fake.saveCredentialReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.saveCredentialReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakePolicyDB) SetOrUpdateDefaultAppPolicy(arg1 context.Context, arg2 []string, arg3 string, arg4 *models.ScalingPolicy, arg5 string) ([]string, error) { - var arg2Copy []string - if arg2 != nil { - arg2Copy = make([]string, len(arg2)) - copy(arg2Copy, arg2) - } - fake.setOrUpdateDefaultAppPolicyMutex.Lock() - ret, specificReturn := fake.setOrUpdateDefaultAppPolicyReturnsOnCall[len(fake.setOrUpdateDefaultAppPolicyArgsForCall)] - fake.setOrUpdateDefaultAppPolicyArgsForCall = append(fake.setOrUpdateDefaultAppPolicyArgsForCall, struct { - arg1 context.Context - arg2 []string - arg3 string - arg4 *models.ScalingPolicy - arg5 string - }{arg1, arg2Copy, arg3, arg4, arg5}) - stub := fake.SetOrUpdateDefaultAppPolicyStub - fakeReturns := fake.setOrUpdateDefaultAppPolicyReturns - fake.recordInvocation("SetOrUpdateDefaultAppPolicy", []interface{}{arg1, arg2Copy, arg3, arg4, arg5}) - fake.setOrUpdateDefaultAppPolicyMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3, arg4, arg5) - } - if specificReturn { - return ret.result1, ret.result2 - } - return fakeReturns.result1, fakeReturns.result2 -} - -func (fake *FakePolicyDB) SetOrUpdateDefaultAppPolicyCallCount() int { - fake.setOrUpdateDefaultAppPolicyMutex.RLock() - defer fake.setOrUpdateDefaultAppPolicyMutex.RUnlock() - return len(fake.setOrUpdateDefaultAppPolicyArgsForCall) -} - -func (fake *FakePolicyDB) SetOrUpdateDefaultAppPolicyCalls(stub func(context.Context, []string, string, *models.ScalingPolicy, string) ([]string, error)) { - fake.setOrUpdateDefaultAppPolicyMutex.Lock() - defer fake.setOrUpdateDefaultAppPolicyMutex.Unlock() - fake.SetOrUpdateDefaultAppPolicyStub = stub -} - -func (fake *FakePolicyDB) SetOrUpdateDefaultAppPolicyArgsForCall(i int) (context.Context, []string, string, *models.ScalingPolicy, string) { - fake.setOrUpdateDefaultAppPolicyMutex.RLock() - defer fake.setOrUpdateDefaultAppPolicyMutex.RUnlock() - argsForCall := fake.setOrUpdateDefaultAppPolicyArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3, argsForCall.arg4, argsForCall.arg5 -} - -func (fake *FakePolicyDB) SetOrUpdateDefaultAppPolicyReturns(result1 []string, result2 error) { - fake.setOrUpdateDefaultAppPolicyMutex.Lock() - defer fake.setOrUpdateDefaultAppPolicyMutex.Unlock() - fake.SetOrUpdateDefaultAppPolicyStub = nil - fake.setOrUpdateDefaultAppPolicyReturns = struct { - result1 []string - result2 error - }{result1, result2} -} - -func (fake *FakePolicyDB) SetOrUpdateDefaultAppPolicyReturnsOnCall(i int, result1 []string, result2 error) { - fake.setOrUpdateDefaultAppPolicyMutex.Lock() - defer fake.setOrUpdateDefaultAppPolicyMutex.Unlock() - fake.SetOrUpdateDefaultAppPolicyStub = nil - if fake.setOrUpdateDefaultAppPolicyReturnsOnCall == nil { - fake.setOrUpdateDefaultAppPolicyReturnsOnCall = make(map[int]struct { - result1 []string - result2 error - }) - } - fake.setOrUpdateDefaultAppPolicyReturnsOnCall[i] = struct { - result1 []string - result2 error - }{result1, result2} -} - -func (fake *FakePolicyDB) Invocations() map[string][][]interface{} { - fake.invocationsMutex.RLock() - defer fake.invocationsMutex.RUnlock() - fake.closeMutex.RLock() - defer fake.closeMutex.RUnlock() - fake.deleteCredentialMutex.RLock() - defer fake.deleteCredentialMutex.RUnlock() - fake.deletePoliciesByPolicyGuidMutex.RLock() - defer fake.deletePoliciesByPolicyGuidMutex.RUnlock() - fake.deletePolicyMutex.RLock() - defer fake.deletePolicyMutex.RUnlock() - fake.getAppIdsMutex.RLock() - defer fake.getAppIdsMutex.RUnlock() - fake.getAppPolicyMutex.RLock() - defer fake.getAppPolicyMutex.RUnlock() - fake.getCredentialMutex.RLock() - defer fake.getCredentialMutex.RUnlock() - fake.getDBStatusMutex.RLock() - defer fake.getDBStatusMutex.RUnlock() - fake.pingMutex.RLock() - defer fake.pingMutex.RUnlock() - fake.retrievePoliciesMutex.RLock() - defer fake.retrievePoliciesMutex.RUnlock() - fake.saveAppPolicyMutex.RLock() - defer fake.saveAppPolicyMutex.RUnlock() - fake.saveCredentialMutex.RLock() - defer fake.saveCredentialMutex.RUnlock() - fake.setOrUpdateDefaultAppPolicyMutex.RLock() - defer fake.setOrUpdateDefaultAppPolicyMutex.RUnlock() - copiedInvocations := map[string][][]interface{}{} - for key, value := range fake.invocations { - copiedInvocations[key] = value - } - return copiedInvocations -} - -func (fake *FakePolicyDB) recordInvocation(key string, args []interface{}) { - fake.invocationsMutex.Lock() - defer fake.invocationsMutex.Unlock() - if fake.invocations == nil { - fake.invocations = map[string][][]interface{}{} - } - if fake.invocations[key] == nil { - fake.invocations[key] = [][]interface{}{} - } - fake.invocations[key] = append(fake.invocations[key], args) -} - -var _ db.PolicyDB = new(FakePolicyDB) diff --git a/src/autoscaler/fakes/fake_ratelimiter.go b/src/autoscaler/fakes/fake_ratelimiter.go deleted file mode 100644 index 81567648c2..0000000000 --- a/src/autoscaler/fakes/fake_ratelimiter.go +++ /dev/null @@ -1,97 +0,0 @@ -// Code generated by counterfeiter. DO NOT EDIT. -package fakes - -import ( - "code.cloudfoundry.org/app-autoscaler/src/autoscaler/ratelimiter" - "sync" -) - -type FakeLimiter struct { - ExceedsLimitStub func(string) bool - exceedsLimitMutex sync.RWMutex - exceedsLimitArgsForCall []struct { - arg1 string - } - exceedsLimitReturns struct { - result1 bool - } - exceedsLimitReturnsOnCall map[int]struct { - result1 bool - } - invocations map[string][][]interface{} - invocationsMutex sync.RWMutex -} - -func (fake *FakeLimiter) ExceedsLimit(arg1 string) bool { - fake.exceedsLimitMutex.Lock() - ret, specificReturn := fake.exceedsLimitReturnsOnCall[len(fake.exceedsLimitArgsForCall)] - fake.exceedsLimitArgsForCall = append(fake.exceedsLimitArgsForCall, struct { - arg1 string - }{arg1}) - fake.recordInvocation("ExceedsLimit", []interface{}{arg1}) - fake.exceedsLimitMutex.Unlock() - if fake.ExceedsLimitStub != nil { - return fake.ExceedsLimitStub(arg1) - } - if specificReturn { - return ret.result1 - } - return fake.exceedsLimitReturns.result1 -} - -func (fake *FakeLimiter) ExceedsLimitCallCount() int { - fake.exceedsLimitMutex.RLock() - defer fake.exceedsLimitMutex.RUnlock() - return len(fake.exceedsLimitArgsForCall) -} - -func (fake *FakeLimiter) ExceedsLimitArgsForCall(i int) string { - fake.exceedsLimitMutex.RLock() - defer fake.exceedsLimitMutex.RUnlock() - return fake.exceedsLimitArgsForCall[i].arg1 -} - -func (fake *FakeLimiter) ExceedsLimitReturns(result1 bool) { - fake.ExceedsLimitStub = nil - fake.exceedsLimitReturns = struct { - result1 bool - }{result1} -} - -func (fake *FakeLimiter) ExceedsLimitReturnsOnCall(i int, result1 bool) { - fake.ExceedsLimitStub = nil - if fake.exceedsLimitReturnsOnCall == nil { - fake.exceedsLimitReturnsOnCall = make(map[int]struct { - result1 bool - }) - } - fake.exceedsLimitReturnsOnCall[i] = struct { - result1 bool - }{result1} -} - -func (fake *FakeLimiter) Invocations() map[string][][]interface{} { - fake.invocationsMutex.RLock() - defer fake.invocationsMutex.RUnlock() - fake.exceedsLimitMutex.RLock() - defer fake.exceedsLimitMutex.RUnlock() - copiedInvocations := map[string][][]interface{}{} - for key, value := range fake.invocations { - copiedInvocations[key] = value - } - return copiedInvocations -} - -func (fake *FakeLimiter) recordInvocation(key string, args []interface{}) { - fake.invocationsMutex.Lock() - defer fake.invocationsMutex.Unlock() - if fake.invocations == nil { - fake.invocations = map[string][][]interface{}{} - } - if fake.invocations[key] == nil { - fake.invocations[key] = [][]interface{}{} - } - fake.invocations[key] = append(fake.invocations[key], args) -} - -var _ ratelimiter.Limiter = new(FakeLimiter) diff --git a/src/autoscaler/fakes/fake_scalingengine.go b/src/autoscaler/fakes/fake_scalingengine.go deleted file mode 100644 index 0606a264ca..0000000000 --- a/src/autoscaler/fakes/fake_scalingengine.go +++ /dev/null @@ -1,352 +0,0 @@ -// Code generated by counterfeiter. DO NOT EDIT. -package fakes - -import ( - "sync" - - "code.cloudfoundry.org/app-autoscaler/src/autoscaler/models" - "code.cloudfoundry.org/app-autoscaler/src/autoscaler/scalingengine" -) - -type FakeScalingEngine struct { - ComputeNewInstancesStub func(int, string) (int, error) - computeNewInstancesMutex sync.RWMutex - computeNewInstancesArgsForCall []struct { - arg1 int - arg2 string - } - computeNewInstancesReturns struct { - result1 int - result2 error - } - computeNewInstancesReturnsOnCall map[int]struct { - result1 int - result2 error - } - RemoveActiveScheduleStub func(string, string) error - removeActiveScheduleMutex sync.RWMutex - removeActiveScheduleArgsForCall []struct { - arg1 string - arg2 string - } - removeActiveScheduleReturns struct { - result1 error - } - removeActiveScheduleReturnsOnCall map[int]struct { - result1 error - } - ScaleStub func(string, *models.Trigger) (*models.AppScalingResult, error) - scaleMutex sync.RWMutex - scaleArgsForCall []struct { - arg1 string - arg2 *models.Trigger - } - scaleReturns struct { - result1 *models.AppScalingResult - result2 error - } - scaleReturnsOnCall map[int]struct { - result1 *models.AppScalingResult - result2 error - } - SetActiveScheduleStub func(string, *models.ActiveSchedule) error - setActiveScheduleMutex sync.RWMutex - setActiveScheduleArgsForCall []struct { - arg1 string - arg2 *models.ActiveSchedule - } - setActiveScheduleReturns struct { - result1 error - } - setActiveScheduleReturnsOnCall map[int]struct { - result1 error - } - invocations map[string][][]interface{} - invocationsMutex sync.RWMutex -} - -func (fake *FakeScalingEngine) ComputeNewInstances(arg1 int, arg2 string) (int, error) { - fake.computeNewInstancesMutex.Lock() - ret, specificReturn := fake.computeNewInstancesReturnsOnCall[len(fake.computeNewInstancesArgsForCall)] - fake.computeNewInstancesArgsForCall = append(fake.computeNewInstancesArgsForCall, struct { - arg1 int - arg2 string - }{arg1, arg2}) - stub := fake.ComputeNewInstancesStub - fakeReturns := fake.computeNewInstancesReturns - fake.recordInvocation("ComputeNewInstances", []interface{}{arg1, arg2}) - fake.computeNewInstancesMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) - } - if specificReturn { - return ret.result1, ret.result2 - } - return fakeReturns.result1, fakeReturns.result2 -} - -func (fake *FakeScalingEngine) ComputeNewInstancesCallCount() int { - fake.computeNewInstancesMutex.RLock() - defer fake.computeNewInstancesMutex.RUnlock() - return len(fake.computeNewInstancesArgsForCall) -} - -func (fake *FakeScalingEngine) ComputeNewInstancesCalls(stub func(int, string) (int, error)) { - fake.computeNewInstancesMutex.Lock() - defer fake.computeNewInstancesMutex.Unlock() - fake.ComputeNewInstancesStub = stub -} - -func (fake *FakeScalingEngine) ComputeNewInstancesArgsForCall(i int) (int, string) { - fake.computeNewInstancesMutex.RLock() - defer fake.computeNewInstancesMutex.RUnlock() - argsForCall := fake.computeNewInstancesArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2 -} - -func (fake *FakeScalingEngine) ComputeNewInstancesReturns(result1 int, result2 error) { - fake.computeNewInstancesMutex.Lock() - defer fake.computeNewInstancesMutex.Unlock() - fake.ComputeNewInstancesStub = nil - fake.computeNewInstancesReturns = struct { - result1 int - result2 error - }{result1, result2} -} - -func (fake *FakeScalingEngine) ComputeNewInstancesReturnsOnCall(i int, result1 int, result2 error) { - fake.computeNewInstancesMutex.Lock() - defer fake.computeNewInstancesMutex.Unlock() - fake.ComputeNewInstancesStub = nil - if fake.computeNewInstancesReturnsOnCall == nil { - fake.computeNewInstancesReturnsOnCall = make(map[int]struct { - result1 int - result2 error - }) - } - fake.computeNewInstancesReturnsOnCall[i] = struct { - result1 int - result2 error - }{result1, result2} -} - -func (fake *FakeScalingEngine) RemoveActiveSchedule(arg1 string, arg2 string) error { - fake.removeActiveScheduleMutex.Lock() - ret, specificReturn := fake.removeActiveScheduleReturnsOnCall[len(fake.removeActiveScheduleArgsForCall)] - fake.removeActiveScheduleArgsForCall = append(fake.removeActiveScheduleArgsForCall, struct { - arg1 string - arg2 string - }{arg1, arg2}) - stub := fake.RemoveActiveScheduleStub - fakeReturns := fake.removeActiveScheduleReturns - fake.recordInvocation("RemoveActiveSchedule", []interface{}{arg1, arg2}) - fake.removeActiveScheduleMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeScalingEngine) RemoveActiveScheduleCallCount() int { - fake.removeActiveScheduleMutex.RLock() - defer fake.removeActiveScheduleMutex.RUnlock() - return len(fake.removeActiveScheduleArgsForCall) -} - -func (fake *FakeScalingEngine) RemoveActiveScheduleCalls(stub func(string, string) error) { - fake.removeActiveScheduleMutex.Lock() - defer fake.removeActiveScheduleMutex.Unlock() - fake.RemoveActiveScheduleStub = stub -} - -func (fake *FakeScalingEngine) RemoveActiveScheduleArgsForCall(i int) (string, string) { - fake.removeActiveScheduleMutex.RLock() - defer fake.removeActiveScheduleMutex.RUnlock() - argsForCall := fake.removeActiveScheduleArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2 -} - -func (fake *FakeScalingEngine) RemoveActiveScheduleReturns(result1 error) { - fake.removeActiveScheduleMutex.Lock() - defer fake.removeActiveScheduleMutex.Unlock() - fake.RemoveActiveScheduleStub = nil - fake.removeActiveScheduleReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeScalingEngine) RemoveActiveScheduleReturnsOnCall(i int, result1 error) { - fake.removeActiveScheduleMutex.Lock() - defer fake.removeActiveScheduleMutex.Unlock() - fake.RemoveActiveScheduleStub = nil - if fake.removeActiveScheduleReturnsOnCall == nil { - fake.removeActiveScheduleReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.removeActiveScheduleReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakeScalingEngine) Scale(arg1 string, arg2 *models.Trigger) (*models.AppScalingResult, error) { - fake.scaleMutex.Lock() - ret, specificReturn := fake.scaleReturnsOnCall[len(fake.scaleArgsForCall)] - fake.scaleArgsForCall = append(fake.scaleArgsForCall, struct { - arg1 string - arg2 *models.Trigger - }{arg1, arg2}) - stub := fake.ScaleStub - fakeReturns := fake.scaleReturns - fake.recordInvocation("Scale", []interface{}{arg1, arg2}) - fake.scaleMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) - } - if specificReturn { - return ret.result1, ret.result2 - } - return fakeReturns.result1, fakeReturns.result2 -} - -func (fake *FakeScalingEngine) ScaleCallCount() int { - fake.scaleMutex.RLock() - defer fake.scaleMutex.RUnlock() - return len(fake.scaleArgsForCall) -} - -func (fake *FakeScalingEngine) ScaleCalls(stub func(string, *models.Trigger) (*models.AppScalingResult, error)) { - fake.scaleMutex.Lock() - defer fake.scaleMutex.Unlock() - fake.ScaleStub = stub -} - -func (fake *FakeScalingEngine) ScaleArgsForCall(i int) (string, *models.Trigger) { - fake.scaleMutex.RLock() - defer fake.scaleMutex.RUnlock() - argsForCall := fake.scaleArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2 -} - -func (fake *FakeScalingEngine) ScaleReturns(result1 *models.AppScalingResult, result2 error) { - fake.scaleMutex.Lock() - defer fake.scaleMutex.Unlock() - fake.ScaleStub = nil - fake.scaleReturns = struct { - result1 *models.AppScalingResult - result2 error - }{result1, result2} -} - -func (fake *FakeScalingEngine) ScaleReturnsOnCall(i int, result1 *models.AppScalingResult, result2 error) { - fake.scaleMutex.Lock() - defer fake.scaleMutex.Unlock() - fake.ScaleStub = nil - if fake.scaleReturnsOnCall == nil { - fake.scaleReturnsOnCall = make(map[int]struct { - result1 *models.AppScalingResult - result2 error - }) - } - fake.scaleReturnsOnCall[i] = struct { - result1 *models.AppScalingResult - result2 error - }{result1, result2} -} - -func (fake *FakeScalingEngine) SetActiveSchedule(arg1 string, arg2 *models.ActiveSchedule) error { - fake.setActiveScheduleMutex.Lock() - ret, specificReturn := fake.setActiveScheduleReturnsOnCall[len(fake.setActiveScheduleArgsForCall)] - fake.setActiveScheduleArgsForCall = append(fake.setActiveScheduleArgsForCall, struct { - arg1 string - arg2 *models.ActiveSchedule - }{arg1, arg2}) - stub := fake.SetActiveScheduleStub - fakeReturns := fake.setActiveScheduleReturns - fake.recordInvocation("SetActiveSchedule", []interface{}{arg1, arg2}) - fake.setActiveScheduleMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeScalingEngine) SetActiveScheduleCallCount() int { - fake.setActiveScheduleMutex.RLock() - defer fake.setActiveScheduleMutex.RUnlock() - return len(fake.setActiveScheduleArgsForCall) -} - -func (fake *FakeScalingEngine) SetActiveScheduleCalls(stub func(string, *models.ActiveSchedule) error) { - fake.setActiveScheduleMutex.Lock() - defer fake.setActiveScheduleMutex.Unlock() - fake.SetActiveScheduleStub = stub -} - -func (fake *FakeScalingEngine) SetActiveScheduleArgsForCall(i int) (string, *models.ActiveSchedule) { - fake.setActiveScheduleMutex.RLock() - defer fake.setActiveScheduleMutex.RUnlock() - argsForCall := fake.setActiveScheduleArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2 -} - -func (fake *FakeScalingEngine) SetActiveScheduleReturns(result1 error) { - fake.setActiveScheduleMutex.Lock() - defer fake.setActiveScheduleMutex.Unlock() - fake.SetActiveScheduleStub = nil - fake.setActiveScheduleReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeScalingEngine) SetActiveScheduleReturnsOnCall(i int, result1 error) { - fake.setActiveScheduleMutex.Lock() - defer fake.setActiveScheduleMutex.Unlock() - fake.SetActiveScheduleStub = nil - if fake.setActiveScheduleReturnsOnCall == nil { - fake.setActiveScheduleReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.setActiveScheduleReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakeScalingEngine) Invocations() map[string][][]interface{} { - fake.invocationsMutex.RLock() - defer fake.invocationsMutex.RUnlock() - fake.computeNewInstancesMutex.RLock() - defer fake.computeNewInstancesMutex.RUnlock() - fake.removeActiveScheduleMutex.RLock() - defer fake.removeActiveScheduleMutex.RUnlock() - fake.scaleMutex.RLock() - defer fake.scaleMutex.RUnlock() - fake.setActiveScheduleMutex.RLock() - defer fake.setActiveScheduleMutex.RUnlock() - copiedInvocations := map[string][][]interface{}{} - for key, value := range fake.invocations { - copiedInvocations[key] = value - } - return copiedInvocations -} - -func (fake *FakeScalingEngine) recordInvocation(key string, args []interface{}) { - fake.invocationsMutex.Lock() - defer fake.invocationsMutex.Unlock() - if fake.invocations == nil { - fake.invocations = map[string][][]interface{}{} - } - if fake.invocations[key] == nil { - fake.invocations[key] = [][]interface{}{} - } - fake.invocations[key] = append(fake.invocations[key], args) -} - -var _ scalingengine.ScalingEngine = new(FakeScalingEngine) diff --git a/src/autoscaler/fakes/fake_scalingengine_db.go b/src/autoscaler/fakes/fake_scalingengine_db.go deleted file mode 100644 index ea57c5964f..0000000000 --- a/src/autoscaler/fakes/fake_scalingengine_db.go +++ /dev/null @@ -1,863 +0,0 @@ -// Code generated by counterfeiter. DO NOT EDIT. -package fakes - -import ( - "database/sql" - "sync" - - "code.cloudfoundry.org/app-autoscaler/src/autoscaler/db" - "code.cloudfoundry.org/app-autoscaler/src/autoscaler/models" -) - -type FakeScalingEngineDB struct { - CanScaleAppStub func(string) (bool, int64, error) - canScaleAppMutex sync.RWMutex - canScaleAppArgsForCall []struct { - arg1 string - } - canScaleAppReturns struct { - result1 bool - result2 int64 - result3 error - } - canScaleAppReturnsOnCall map[int]struct { - result1 bool - result2 int64 - result3 error - } - CloseStub func() error - closeMutex sync.RWMutex - closeArgsForCall []struct { - } - closeReturns struct { - result1 error - } - closeReturnsOnCall map[int]struct { - result1 error - } - GetActiveScheduleStub func(string) (*models.ActiveSchedule, error) - getActiveScheduleMutex sync.RWMutex - getActiveScheduleArgsForCall []struct { - arg1 string - } - getActiveScheduleReturns struct { - result1 *models.ActiveSchedule - result2 error - } - getActiveScheduleReturnsOnCall map[int]struct { - result1 *models.ActiveSchedule - result2 error - } - GetActiveSchedulesStub func() (map[string]string, error) - getActiveSchedulesMutex sync.RWMutex - getActiveSchedulesArgsForCall []struct { - } - getActiveSchedulesReturns struct { - result1 map[string]string - result2 error - } - getActiveSchedulesReturnsOnCall map[int]struct { - result1 map[string]string - result2 error - } - GetDBStatusStub func() sql.DBStats - getDBStatusMutex sync.RWMutex - getDBStatusArgsForCall []struct { - } - getDBStatusReturns struct { - result1 sql.DBStats - } - getDBStatusReturnsOnCall map[int]struct { - result1 sql.DBStats - } - PruneScalingHistoriesStub func(int64) error - pruneScalingHistoriesMutex sync.RWMutex - pruneScalingHistoriesArgsForCall []struct { - arg1 int64 - } - pruneScalingHistoriesReturns struct { - result1 error - } - pruneScalingHistoriesReturnsOnCall map[int]struct { - result1 error - } - RemoveActiveScheduleStub func(string) error - removeActiveScheduleMutex sync.RWMutex - removeActiveScheduleArgsForCall []struct { - arg1 string - } - removeActiveScheduleReturns struct { - result1 error - } - removeActiveScheduleReturnsOnCall map[int]struct { - result1 error - } - RetrieveScalingHistoriesStub func(string, int64, int64, db.OrderType, bool) ([]*models.AppScalingHistory, error) - retrieveScalingHistoriesMutex sync.RWMutex - retrieveScalingHistoriesArgsForCall []struct { - arg1 string - arg2 int64 - arg3 int64 - arg4 db.OrderType - arg5 bool - } - retrieveScalingHistoriesReturns struct { - result1 []*models.AppScalingHistory - result2 error - } - retrieveScalingHistoriesReturnsOnCall map[int]struct { - result1 []*models.AppScalingHistory - result2 error - } - SaveScalingHistoryStub func(*models.AppScalingHistory) error - saveScalingHistoryMutex sync.RWMutex - saveScalingHistoryArgsForCall []struct { - arg1 *models.AppScalingHistory - } - saveScalingHistoryReturns struct { - result1 error - } - saveScalingHistoryReturnsOnCall map[int]struct { - result1 error - } - SetActiveScheduleStub func(string, *models.ActiveSchedule) error - setActiveScheduleMutex sync.RWMutex - setActiveScheduleArgsForCall []struct { - arg1 string - arg2 *models.ActiveSchedule - } - setActiveScheduleReturns struct { - result1 error - } - setActiveScheduleReturnsOnCall map[int]struct { - result1 error - } - UpdateScalingCooldownExpireTimeStub func(string, int64) error - updateScalingCooldownExpireTimeMutex sync.RWMutex - updateScalingCooldownExpireTimeArgsForCall []struct { - arg1 string - arg2 int64 - } - updateScalingCooldownExpireTimeReturns struct { - result1 error - } - updateScalingCooldownExpireTimeReturnsOnCall map[int]struct { - result1 error - } - invocations map[string][][]interface{} - invocationsMutex sync.RWMutex -} - -func (fake *FakeScalingEngineDB) CanScaleApp(arg1 string) (bool, int64, error) { - fake.canScaleAppMutex.Lock() - ret, specificReturn := fake.canScaleAppReturnsOnCall[len(fake.canScaleAppArgsForCall)] - fake.canScaleAppArgsForCall = append(fake.canScaleAppArgsForCall, struct { - arg1 string - }{arg1}) - stub := fake.CanScaleAppStub - fakeReturns := fake.canScaleAppReturns - fake.recordInvocation("CanScaleApp", []interface{}{arg1}) - fake.canScaleAppMutex.Unlock() - if stub != nil { - return stub(arg1) - } - if specificReturn { - return ret.result1, ret.result2, ret.result3 - } - return fakeReturns.result1, fakeReturns.result2, fakeReturns.result3 -} - -func (fake *FakeScalingEngineDB) CanScaleAppCallCount() int { - fake.canScaleAppMutex.RLock() - defer fake.canScaleAppMutex.RUnlock() - return len(fake.canScaleAppArgsForCall) -} - -func (fake *FakeScalingEngineDB) CanScaleAppCalls(stub func(string) (bool, int64, error)) { - fake.canScaleAppMutex.Lock() - defer fake.canScaleAppMutex.Unlock() - fake.CanScaleAppStub = stub -} - -func (fake *FakeScalingEngineDB) CanScaleAppArgsForCall(i int) string { - fake.canScaleAppMutex.RLock() - defer fake.canScaleAppMutex.RUnlock() - argsForCall := fake.canScaleAppArgsForCall[i] - return argsForCall.arg1 -} - -func (fake *FakeScalingEngineDB) CanScaleAppReturns(result1 bool, result2 int64, result3 error) { - fake.canScaleAppMutex.Lock() - defer fake.canScaleAppMutex.Unlock() - fake.CanScaleAppStub = nil - fake.canScaleAppReturns = struct { - result1 bool - result2 int64 - result3 error - }{result1, result2, result3} -} - -func (fake *FakeScalingEngineDB) CanScaleAppReturnsOnCall(i int, result1 bool, result2 int64, result3 error) { - fake.canScaleAppMutex.Lock() - defer fake.canScaleAppMutex.Unlock() - fake.CanScaleAppStub = nil - if fake.canScaleAppReturnsOnCall == nil { - fake.canScaleAppReturnsOnCall = make(map[int]struct { - result1 bool - result2 int64 - result3 error - }) - } - fake.canScaleAppReturnsOnCall[i] = struct { - result1 bool - result2 int64 - result3 error - }{result1, result2, result3} -} - -func (fake *FakeScalingEngineDB) Close() error { - fake.closeMutex.Lock() - ret, specificReturn := fake.closeReturnsOnCall[len(fake.closeArgsForCall)] - fake.closeArgsForCall = append(fake.closeArgsForCall, struct { - }{}) - stub := fake.CloseStub - fakeReturns := fake.closeReturns - fake.recordInvocation("Close", []interface{}{}) - fake.closeMutex.Unlock() - if stub != nil { - return stub() - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeScalingEngineDB) CloseCallCount() int { - fake.closeMutex.RLock() - defer fake.closeMutex.RUnlock() - return len(fake.closeArgsForCall) -} - -func (fake *FakeScalingEngineDB) CloseCalls(stub func() error) { - fake.closeMutex.Lock() - defer fake.closeMutex.Unlock() - fake.CloseStub = stub -} - -func (fake *FakeScalingEngineDB) CloseReturns(result1 error) { - fake.closeMutex.Lock() - defer fake.closeMutex.Unlock() - fake.CloseStub = nil - fake.closeReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeScalingEngineDB) CloseReturnsOnCall(i int, result1 error) { - fake.closeMutex.Lock() - defer fake.closeMutex.Unlock() - fake.CloseStub = nil - if fake.closeReturnsOnCall == nil { - fake.closeReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.closeReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakeScalingEngineDB) GetActiveSchedule(arg1 string) (*models.ActiveSchedule, error) { - fake.getActiveScheduleMutex.Lock() - ret, specificReturn := fake.getActiveScheduleReturnsOnCall[len(fake.getActiveScheduleArgsForCall)] - fake.getActiveScheduleArgsForCall = append(fake.getActiveScheduleArgsForCall, struct { - arg1 string - }{arg1}) - stub := fake.GetActiveScheduleStub - fakeReturns := fake.getActiveScheduleReturns - fake.recordInvocation("GetActiveSchedule", []interface{}{arg1}) - fake.getActiveScheduleMutex.Unlock() - if stub != nil { - return stub(arg1) - } - if specificReturn { - return ret.result1, ret.result2 - } - return fakeReturns.result1, fakeReturns.result2 -} - -func (fake *FakeScalingEngineDB) GetActiveScheduleCallCount() int { - fake.getActiveScheduleMutex.RLock() - defer fake.getActiveScheduleMutex.RUnlock() - return len(fake.getActiveScheduleArgsForCall) -} - -func (fake *FakeScalingEngineDB) GetActiveScheduleCalls(stub func(string) (*models.ActiveSchedule, error)) { - fake.getActiveScheduleMutex.Lock() - defer fake.getActiveScheduleMutex.Unlock() - fake.GetActiveScheduleStub = stub -} - -func (fake *FakeScalingEngineDB) GetActiveScheduleArgsForCall(i int) string { - fake.getActiveScheduleMutex.RLock() - defer fake.getActiveScheduleMutex.RUnlock() - argsForCall := fake.getActiveScheduleArgsForCall[i] - return argsForCall.arg1 -} - -func (fake *FakeScalingEngineDB) GetActiveScheduleReturns(result1 *models.ActiveSchedule, result2 error) { - fake.getActiveScheduleMutex.Lock() - defer fake.getActiveScheduleMutex.Unlock() - fake.GetActiveScheduleStub = nil - fake.getActiveScheduleReturns = struct { - result1 *models.ActiveSchedule - result2 error - }{result1, result2} -} - -func (fake *FakeScalingEngineDB) GetActiveScheduleReturnsOnCall(i int, result1 *models.ActiveSchedule, result2 error) { - fake.getActiveScheduleMutex.Lock() - defer fake.getActiveScheduleMutex.Unlock() - fake.GetActiveScheduleStub = nil - if fake.getActiveScheduleReturnsOnCall == nil { - fake.getActiveScheduleReturnsOnCall = make(map[int]struct { - result1 *models.ActiveSchedule - result2 error - }) - } - fake.getActiveScheduleReturnsOnCall[i] = struct { - result1 *models.ActiveSchedule - result2 error - }{result1, result2} -} - -func (fake *FakeScalingEngineDB) GetActiveSchedules() (map[string]string, error) { - fake.getActiveSchedulesMutex.Lock() - ret, specificReturn := fake.getActiveSchedulesReturnsOnCall[len(fake.getActiveSchedulesArgsForCall)] - fake.getActiveSchedulesArgsForCall = append(fake.getActiveSchedulesArgsForCall, struct { - }{}) - stub := fake.GetActiveSchedulesStub - fakeReturns := fake.getActiveSchedulesReturns - fake.recordInvocation("GetActiveSchedules", []interface{}{}) - fake.getActiveSchedulesMutex.Unlock() - if stub != nil { - return stub() - } - if specificReturn { - return ret.result1, ret.result2 - } - return fakeReturns.result1, fakeReturns.result2 -} - -func (fake *FakeScalingEngineDB) GetActiveSchedulesCallCount() int { - fake.getActiveSchedulesMutex.RLock() - defer fake.getActiveSchedulesMutex.RUnlock() - return len(fake.getActiveSchedulesArgsForCall) -} - -func (fake *FakeScalingEngineDB) GetActiveSchedulesCalls(stub func() (map[string]string, error)) { - fake.getActiveSchedulesMutex.Lock() - defer fake.getActiveSchedulesMutex.Unlock() - fake.GetActiveSchedulesStub = stub -} - -func (fake *FakeScalingEngineDB) GetActiveSchedulesReturns(result1 map[string]string, result2 error) { - fake.getActiveSchedulesMutex.Lock() - defer fake.getActiveSchedulesMutex.Unlock() - fake.GetActiveSchedulesStub = nil - fake.getActiveSchedulesReturns = struct { - result1 map[string]string - result2 error - }{result1, result2} -} - -func (fake *FakeScalingEngineDB) GetActiveSchedulesReturnsOnCall(i int, result1 map[string]string, result2 error) { - fake.getActiveSchedulesMutex.Lock() - defer fake.getActiveSchedulesMutex.Unlock() - fake.GetActiveSchedulesStub = nil - if fake.getActiveSchedulesReturnsOnCall == nil { - fake.getActiveSchedulesReturnsOnCall = make(map[int]struct { - result1 map[string]string - result2 error - }) - } - fake.getActiveSchedulesReturnsOnCall[i] = struct { - result1 map[string]string - result2 error - }{result1, result2} -} - -func (fake *FakeScalingEngineDB) GetDBStatus() sql.DBStats { - fake.getDBStatusMutex.Lock() - ret, specificReturn := fake.getDBStatusReturnsOnCall[len(fake.getDBStatusArgsForCall)] - fake.getDBStatusArgsForCall = append(fake.getDBStatusArgsForCall, struct { - }{}) - stub := fake.GetDBStatusStub - fakeReturns := fake.getDBStatusReturns - fake.recordInvocation("GetDBStatus", []interface{}{}) - fake.getDBStatusMutex.Unlock() - if stub != nil { - return stub() - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeScalingEngineDB) GetDBStatusCallCount() int { - fake.getDBStatusMutex.RLock() - defer fake.getDBStatusMutex.RUnlock() - return len(fake.getDBStatusArgsForCall) -} - -func (fake *FakeScalingEngineDB) GetDBStatusCalls(stub func() sql.DBStats) { - fake.getDBStatusMutex.Lock() - defer fake.getDBStatusMutex.Unlock() - fake.GetDBStatusStub = stub -} - -func (fake *FakeScalingEngineDB) GetDBStatusReturns(result1 sql.DBStats) { - fake.getDBStatusMutex.Lock() - defer fake.getDBStatusMutex.Unlock() - fake.GetDBStatusStub = nil - fake.getDBStatusReturns = struct { - result1 sql.DBStats - }{result1} -} - -func (fake *FakeScalingEngineDB) GetDBStatusReturnsOnCall(i int, result1 sql.DBStats) { - fake.getDBStatusMutex.Lock() - defer fake.getDBStatusMutex.Unlock() - fake.GetDBStatusStub = nil - if fake.getDBStatusReturnsOnCall == nil { - fake.getDBStatusReturnsOnCall = make(map[int]struct { - result1 sql.DBStats - }) - } - fake.getDBStatusReturnsOnCall[i] = struct { - result1 sql.DBStats - }{result1} -} - -func (fake *FakeScalingEngineDB) PruneScalingHistories(arg1 int64) error { - fake.pruneScalingHistoriesMutex.Lock() - ret, specificReturn := fake.pruneScalingHistoriesReturnsOnCall[len(fake.pruneScalingHistoriesArgsForCall)] - fake.pruneScalingHistoriesArgsForCall = append(fake.pruneScalingHistoriesArgsForCall, struct { - arg1 int64 - }{arg1}) - stub := fake.PruneScalingHistoriesStub - fakeReturns := fake.pruneScalingHistoriesReturns - fake.recordInvocation("PruneScalingHistories", []interface{}{arg1}) - fake.pruneScalingHistoriesMutex.Unlock() - if stub != nil { - return stub(arg1) - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeScalingEngineDB) PruneScalingHistoriesCallCount() int { - fake.pruneScalingHistoriesMutex.RLock() - defer fake.pruneScalingHistoriesMutex.RUnlock() - return len(fake.pruneScalingHistoriesArgsForCall) -} - -func (fake *FakeScalingEngineDB) PruneScalingHistoriesCalls(stub func(int64) error) { - fake.pruneScalingHistoriesMutex.Lock() - defer fake.pruneScalingHistoriesMutex.Unlock() - fake.PruneScalingHistoriesStub = stub -} - -func (fake *FakeScalingEngineDB) PruneScalingHistoriesArgsForCall(i int) int64 { - fake.pruneScalingHistoriesMutex.RLock() - defer fake.pruneScalingHistoriesMutex.RUnlock() - argsForCall := fake.pruneScalingHistoriesArgsForCall[i] - return argsForCall.arg1 -} - -func (fake *FakeScalingEngineDB) PruneScalingHistoriesReturns(result1 error) { - fake.pruneScalingHistoriesMutex.Lock() - defer fake.pruneScalingHistoriesMutex.Unlock() - fake.PruneScalingHistoriesStub = nil - fake.pruneScalingHistoriesReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeScalingEngineDB) PruneScalingHistoriesReturnsOnCall(i int, result1 error) { - fake.pruneScalingHistoriesMutex.Lock() - defer fake.pruneScalingHistoriesMutex.Unlock() - fake.PruneScalingHistoriesStub = nil - if fake.pruneScalingHistoriesReturnsOnCall == nil { - fake.pruneScalingHistoriesReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.pruneScalingHistoriesReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakeScalingEngineDB) RemoveActiveSchedule(arg1 string) error { - fake.removeActiveScheduleMutex.Lock() - ret, specificReturn := fake.removeActiveScheduleReturnsOnCall[len(fake.removeActiveScheduleArgsForCall)] - fake.removeActiveScheduleArgsForCall = append(fake.removeActiveScheduleArgsForCall, struct { - arg1 string - }{arg1}) - stub := fake.RemoveActiveScheduleStub - fakeReturns := fake.removeActiveScheduleReturns - fake.recordInvocation("RemoveActiveSchedule", []interface{}{arg1}) - fake.removeActiveScheduleMutex.Unlock() - if stub != nil { - return stub(arg1) - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeScalingEngineDB) RemoveActiveScheduleCallCount() int { - fake.removeActiveScheduleMutex.RLock() - defer fake.removeActiveScheduleMutex.RUnlock() - return len(fake.removeActiveScheduleArgsForCall) -} - -func (fake *FakeScalingEngineDB) RemoveActiveScheduleCalls(stub func(string) error) { - fake.removeActiveScheduleMutex.Lock() - defer fake.removeActiveScheduleMutex.Unlock() - fake.RemoveActiveScheduleStub = stub -} - -func (fake *FakeScalingEngineDB) RemoveActiveScheduleArgsForCall(i int) string { - fake.removeActiveScheduleMutex.RLock() - defer fake.removeActiveScheduleMutex.RUnlock() - argsForCall := fake.removeActiveScheduleArgsForCall[i] - return argsForCall.arg1 -} - -func (fake *FakeScalingEngineDB) RemoveActiveScheduleReturns(result1 error) { - fake.removeActiveScheduleMutex.Lock() - defer fake.removeActiveScheduleMutex.Unlock() - fake.RemoveActiveScheduleStub = nil - fake.removeActiveScheduleReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeScalingEngineDB) RemoveActiveScheduleReturnsOnCall(i int, result1 error) { - fake.removeActiveScheduleMutex.Lock() - defer fake.removeActiveScheduleMutex.Unlock() - fake.RemoveActiveScheduleStub = nil - if fake.removeActiveScheduleReturnsOnCall == nil { - fake.removeActiveScheduleReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.removeActiveScheduleReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakeScalingEngineDB) RetrieveScalingHistories(arg1 string, arg2 int64, arg3 int64, arg4 db.OrderType, arg5 bool) ([]*models.AppScalingHistory, error) { - fake.retrieveScalingHistoriesMutex.Lock() - ret, specificReturn := fake.retrieveScalingHistoriesReturnsOnCall[len(fake.retrieveScalingHistoriesArgsForCall)] - fake.retrieveScalingHistoriesArgsForCall = append(fake.retrieveScalingHistoriesArgsForCall, struct { - arg1 string - arg2 int64 - arg3 int64 - arg4 db.OrderType - arg5 bool - }{arg1, arg2, arg3, arg4, arg5}) - stub := fake.RetrieveScalingHistoriesStub - fakeReturns := fake.retrieveScalingHistoriesReturns - fake.recordInvocation("RetrieveScalingHistories", []interface{}{arg1, arg2, arg3, arg4, arg5}) - fake.retrieveScalingHistoriesMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3, arg4, arg5) - } - if specificReturn { - return ret.result1, ret.result2 - } - return fakeReturns.result1, fakeReturns.result2 -} - -func (fake *FakeScalingEngineDB) RetrieveScalingHistoriesCallCount() int { - fake.retrieveScalingHistoriesMutex.RLock() - defer fake.retrieveScalingHistoriesMutex.RUnlock() - return len(fake.retrieveScalingHistoriesArgsForCall) -} - -func (fake *FakeScalingEngineDB) RetrieveScalingHistoriesCalls(stub func(string, int64, int64, db.OrderType, bool) ([]*models.AppScalingHistory, error)) { - fake.retrieveScalingHistoriesMutex.Lock() - defer fake.retrieveScalingHistoriesMutex.Unlock() - fake.RetrieveScalingHistoriesStub = stub -} - -func (fake *FakeScalingEngineDB) RetrieveScalingHistoriesArgsForCall(i int) (string, int64, int64, db.OrderType, bool) { - fake.retrieveScalingHistoriesMutex.RLock() - defer fake.retrieveScalingHistoriesMutex.RUnlock() - argsForCall := fake.retrieveScalingHistoriesArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3, argsForCall.arg4, argsForCall.arg5 -} - -func (fake *FakeScalingEngineDB) RetrieveScalingHistoriesReturns(result1 []*models.AppScalingHistory, result2 error) { - fake.retrieveScalingHistoriesMutex.Lock() - defer fake.retrieveScalingHistoriesMutex.Unlock() - fake.RetrieveScalingHistoriesStub = nil - fake.retrieveScalingHistoriesReturns = struct { - result1 []*models.AppScalingHistory - result2 error - }{result1, result2} -} - -func (fake *FakeScalingEngineDB) RetrieveScalingHistoriesReturnsOnCall(i int, result1 []*models.AppScalingHistory, result2 error) { - fake.retrieveScalingHistoriesMutex.Lock() - defer fake.retrieveScalingHistoriesMutex.Unlock() - fake.RetrieveScalingHistoriesStub = nil - if fake.retrieveScalingHistoriesReturnsOnCall == nil { - fake.retrieveScalingHistoriesReturnsOnCall = make(map[int]struct { - result1 []*models.AppScalingHistory - result2 error - }) - } - fake.retrieveScalingHistoriesReturnsOnCall[i] = struct { - result1 []*models.AppScalingHistory - result2 error - }{result1, result2} -} - -func (fake *FakeScalingEngineDB) SaveScalingHistory(arg1 *models.AppScalingHistory) error { - fake.saveScalingHistoryMutex.Lock() - ret, specificReturn := fake.saveScalingHistoryReturnsOnCall[len(fake.saveScalingHistoryArgsForCall)] - fake.saveScalingHistoryArgsForCall = append(fake.saveScalingHistoryArgsForCall, struct { - arg1 *models.AppScalingHistory - }{arg1}) - stub := fake.SaveScalingHistoryStub - fakeReturns := fake.saveScalingHistoryReturns - fake.recordInvocation("SaveScalingHistory", []interface{}{arg1}) - fake.saveScalingHistoryMutex.Unlock() - if stub != nil { - return stub(arg1) - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeScalingEngineDB) SaveScalingHistoryCallCount() int { - fake.saveScalingHistoryMutex.RLock() - defer fake.saveScalingHistoryMutex.RUnlock() - return len(fake.saveScalingHistoryArgsForCall) -} - -func (fake *FakeScalingEngineDB) SaveScalingHistoryCalls(stub func(*models.AppScalingHistory) error) { - fake.saveScalingHistoryMutex.Lock() - defer fake.saveScalingHistoryMutex.Unlock() - fake.SaveScalingHistoryStub = stub -} - -func (fake *FakeScalingEngineDB) SaveScalingHistoryArgsForCall(i int) *models.AppScalingHistory { - fake.saveScalingHistoryMutex.RLock() - defer fake.saveScalingHistoryMutex.RUnlock() - argsForCall := fake.saveScalingHistoryArgsForCall[i] - return argsForCall.arg1 -} - -func (fake *FakeScalingEngineDB) SaveScalingHistoryReturns(result1 error) { - fake.saveScalingHistoryMutex.Lock() - defer fake.saveScalingHistoryMutex.Unlock() - fake.SaveScalingHistoryStub = nil - fake.saveScalingHistoryReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeScalingEngineDB) SaveScalingHistoryReturnsOnCall(i int, result1 error) { - fake.saveScalingHistoryMutex.Lock() - defer fake.saveScalingHistoryMutex.Unlock() - fake.SaveScalingHistoryStub = nil - if fake.saveScalingHistoryReturnsOnCall == nil { - fake.saveScalingHistoryReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.saveScalingHistoryReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakeScalingEngineDB) SetActiveSchedule(arg1 string, arg2 *models.ActiveSchedule) error { - fake.setActiveScheduleMutex.Lock() - ret, specificReturn := fake.setActiveScheduleReturnsOnCall[len(fake.setActiveScheduleArgsForCall)] - fake.setActiveScheduleArgsForCall = append(fake.setActiveScheduleArgsForCall, struct { - arg1 string - arg2 *models.ActiveSchedule - }{arg1, arg2}) - stub := fake.SetActiveScheduleStub - fakeReturns := fake.setActiveScheduleReturns - fake.recordInvocation("SetActiveSchedule", []interface{}{arg1, arg2}) - fake.setActiveScheduleMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeScalingEngineDB) SetActiveScheduleCallCount() int { - fake.setActiveScheduleMutex.RLock() - defer fake.setActiveScheduleMutex.RUnlock() - return len(fake.setActiveScheduleArgsForCall) -} - -func (fake *FakeScalingEngineDB) SetActiveScheduleCalls(stub func(string, *models.ActiveSchedule) error) { - fake.setActiveScheduleMutex.Lock() - defer fake.setActiveScheduleMutex.Unlock() - fake.SetActiveScheduleStub = stub -} - -func (fake *FakeScalingEngineDB) SetActiveScheduleArgsForCall(i int) (string, *models.ActiveSchedule) { - fake.setActiveScheduleMutex.RLock() - defer fake.setActiveScheduleMutex.RUnlock() - argsForCall := fake.setActiveScheduleArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2 -} - -func (fake *FakeScalingEngineDB) SetActiveScheduleReturns(result1 error) { - fake.setActiveScheduleMutex.Lock() - defer fake.setActiveScheduleMutex.Unlock() - fake.SetActiveScheduleStub = nil - fake.setActiveScheduleReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeScalingEngineDB) SetActiveScheduleReturnsOnCall(i int, result1 error) { - fake.setActiveScheduleMutex.Lock() - defer fake.setActiveScheduleMutex.Unlock() - fake.SetActiveScheduleStub = nil - if fake.setActiveScheduleReturnsOnCall == nil { - fake.setActiveScheduleReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.setActiveScheduleReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakeScalingEngineDB) UpdateScalingCooldownExpireTime(arg1 string, arg2 int64) error { - fake.updateScalingCooldownExpireTimeMutex.Lock() - ret, specificReturn := fake.updateScalingCooldownExpireTimeReturnsOnCall[len(fake.updateScalingCooldownExpireTimeArgsForCall)] - fake.updateScalingCooldownExpireTimeArgsForCall = append(fake.updateScalingCooldownExpireTimeArgsForCall, struct { - arg1 string - arg2 int64 - }{arg1, arg2}) - stub := fake.UpdateScalingCooldownExpireTimeStub - fakeReturns := fake.updateScalingCooldownExpireTimeReturns - fake.recordInvocation("UpdateScalingCooldownExpireTime", []interface{}{arg1, arg2}) - fake.updateScalingCooldownExpireTimeMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeScalingEngineDB) UpdateScalingCooldownExpireTimeCallCount() int { - fake.updateScalingCooldownExpireTimeMutex.RLock() - defer fake.updateScalingCooldownExpireTimeMutex.RUnlock() - return len(fake.updateScalingCooldownExpireTimeArgsForCall) -} - -func (fake *FakeScalingEngineDB) UpdateScalingCooldownExpireTimeCalls(stub func(string, int64) error) { - fake.updateScalingCooldownExpireTimeMutex.Lock() - defer fake.updateScalingCooldownExpireTimeMutex.Unlock() - fake.UpdateScalingCooldownExpireTimeStub = stub -} - -func (fake *FakeScalingEngineDB) UpdateScalingCooldownExpireTimeArgsForCall(i int) (string, int64) { - fake.updateScalingCooldownExpireTimeMutex.RLock() - defer fake.updateScalingCooldownExpireTimeMutex.RUnlock() - argsForCall := fake.updateScalingCooldownExpireTimeArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2 -} - -func (fake *FakeScalingEngineDB) UpdateScalingCooldownExpireTimeReturns(result1 error) { - fake.updateScalingCooldownExpireTimeMutex.Lock() - defer fake.updateScalingCooldownExpireTimeMutex.Unlock() - fake.UpdateScalingCooldownExpireTimeStub = nil - fake.updateScalingCooldownExpireTimeReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeScalingEngineDB) UpdateScalingCooldownExpireTimeReturnsOnCall(i int, result1 error) { - fake.updateScalingCooldownExpireTimeMutex.Lock() - defer fake.updateScalingCooldownExpireTimeMutex.Unlock() - fake.UpdateScalingCooldownExpireTimeStub = nil - if fake.updateScalingCooldownExpireTimeReturnsOnCall == nil { - fake.updateScalingCooldownExpireTimeReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.updateScalingCooldownExpireTimeReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakeScalingEngineDB) Invocations() map[string][][]interface{} { - fake.invocationsMutex.RLock() - defer fake.invocationsMutex.RUnlock() - fake.canScaleAppMutex.RLock() - defer fake.canScaleAppMutex.RUnlock() - fake.closeMutex.RLock() - defer fake.closeMutex.RUnlock() - fake.getActiveScheduleMutex.RLock() - defer fake.getActiveScheduleMutex.RUnlock() - fake.getActiveSchedulesMutex.RLock() - defer fake.getActiveSchedulesMutex.RUnlock() - fake.getDBStatusMutex.RLock() - defer fake.getDBStatusMutex.RUnlock() - fake.pruneScalingHistoriesMutex.RLock() - defer fake.pruneScalingHistoriesMutex.RUnlock() - fake.removeActiveScheduleMutex.RLock() - defer fake.removeActiveScheduleMutex.RUnlock() - fake.retrieveScalingHistoriesMutex.RLock() - defer fake.retrieveScalingHistoriesMutex.RUnlock() - fake.saveScalingHistoryMutex.RLock() - defer fake.saveScalingHistoryMutex.RUnlock() - fake.setActiveScheduleMutex.RLock() - defer fake.setActiveScheduleMutex.RUnlock() - fake.updateScalingCooldownExpireTimeMutex.RLock() - defer fake.updateScalingCooldownExpireTimeMutex.RUnlock() - copiedInvocations := map[string][][]interface{}{} - for key, value := range fake.invocations { - copiedInvocations[key] = value - } - return copiedInvocations -} - -func (fake *FakeScalingEngineDB) recordInvocation(key string, args []interface{}) { - fake.invocationsMutex.Lock() - defer fake.invocationsMutex.Unlock() - if fake.invocations == nil { - fake.invocations = map[string][][]interface{}{} - } - if fake.invocations[key] == nil { - fake.invocations[key] = [][]interface{}{} - } - fake.invocations[key] = append(fake.invocations[key], args) -} - -var _ db.ScalingEngineDB = new(FakeScalingEngineDB) diff --git a/src/autoscaler/fakes/fake_scheduler_db.go b/src/autoscaler/fakes/fake_scheduler_db.go deleted file mode 100644 index cf3ace7723..0000000000 --- a/src/autoscaler/fakes/fake_scheduler_db.go +++ /dev/null @@ -1,239 +0,0 @@ -// Code generated by counterfeiter. DO NOT EDIT. -package fakes - -import ( - "database/sql" - "sync" - - "code.cloudfoundry.org/app-autoscaler/src/autoscaler/db" - "code.cloudfoundry.org/app-autoscaler/src/autoscaler/models" -) - -type FakeSchedulerDB struct { - CloseStub func() error - closeMutex sync.RWMutex - closeArgsForCall []struct { - } - closeReturns struct { - result1 error - } - closeReturnsOnCall map[int]struct { - result1 error - } - GetActiveSchedulesStub func() (map[string]*models.ActiveSchedule, error) - getActiveSchedulesMutex sync.RWMutex - getActiveSchedulesArgsForCall []struct { - } - getActiveSchedulesReturns struct { - result1 map[string]*models.ActiveSchedule - result2 error - } - getActiveSchedulesReturnsOnCall map[int]struct { - result1 map[string]*models.ActiveSchedule - result2 error - } - GetDBStatusStub func() sql.DBStats - getDBStatusMutex sync.RWMutex - getDBStatusArgsForCall []struct { - } - getDBStatusReturns struct { - result1 sql.DBStats - } - getDBStatusReturnsOnCall map[int]struct { - result1 sql.DBStats - } - invocations map[string][][]interface{} - invocationsMutex sync.RWMutex -} - -func (fake *FakeSchedulerDB) Close() error { - fake.closeMutex.Lock() - ret, specificReturn := fake.closeReturnsOnCall[len(fake.closeArgsForCall)] - fake.closeArgsForCall = append(fake.closeArgsForCall, struct { - }{}) - stub := fake.CloseStub - fakeReturns := fake.closeReturns - fake.recordInvocation("Close", []interface{}{}) - fake.closeMutex.Unlock() - if stub != nil { - return stub() - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeSchedulerDB) CloseCallCount() int { - fake.closeMutex.RLock() - defer fake.closeMutex.RUnlock() - return len(fake.closeArgsForCall) -} - -func (fake *FakeSchedulerDB) CloseCalls(stub func() error) { - fake.closeMutex.Lock() - defer fake.closeMutex.Unlock() - fake.CloseStub = stub -} - -func (fake *FakeSchedulerDB) CloseReturns(result1 error) { - fake.closeMutex.Lock() - defer fake.closeMutex.Unlock() - fake.CloseStub = nil - fake.closeReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeSchedulerDB) CloseReturnsOnCall(i int, result1 error) { - fake.closeMutex.Lock() - defer fake.closeMutex.Unlock() - fake.CloseStub = nil - if fake.closeReturnsOnCall == nil { - fake.closeReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.closeReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakeSchedulerDB) GetActiveSchedules() (map[string]*models.ActiveSchedule, error) { - fake.getActiveSchedulesMutex.Lock() - ret, specificReturn := fake.getActiveSchedulesReturnsOnCall[len(fake.getActiveSchedulesArgsForCall)] - fake.getActiveSchedulesArgsForCall = append(fake.getActiveSchedulesArgsForCall, struct { - }{}) - stub := fake.GetActiveSchedulesStub - fakeReturns := fake.getActiveSchedulesReturns - fake.recordInvocation("GetActiveSchedules", []interface{}{}) - fake.getActiveSchedulesMutex.Unlock() - if stub != nil { - return stub() - } - if specificReturn { - return ret.result1, ret.result2 - } - return fakeReturns.result1, fakeReturns.result2 -} - -func (fake *FakeSchedulerDB) GetActiveSchedulesCallCount() int { - fake.getActiveSchedulesMutex.RLock() - defer fake.getActiveSchedulesMutex.RUnlock() - return len(fake.getActiveSchedulesArgsForCall) -} - -func (fake *FakeSchedulerDB) GetActiveSchedulesCalls(stub func() (map[string]*models.ActiveSchedule, error)) { - fake.getActiveSchedulesMutex.Lock() - defer fake.getActiveSchedulesMutex.Unlock() - fake.GetActiveSchedulesStub = stub -} - -func (fake *FakeSchedulerDB) GetActiveSchedulesReturns(result1 map[string]*models.ActiveSchedule, result2 error) { - fake.getActiveSchedulesMutex.Lock() - defer fake.getActiveSchedulesMutex.Unlock() - fake.GetActiveSchedulesStub = nil - fake.getActiveSchedulesReturns = struct { - result1 map[string]*models.ActiveSchedule - result2 error - }{result1, result2} -} - -func (fake *FakeSchedulerDB) GetActiveSchedulesReturnsOnCall(i int, result1 map[string]*models.ActiveSchedule, result2 error) { - fake.getActiveSchedulesMutex.Lock() - defer fake.getActiveSchedulesMutex.Unlock() - fake.GetActiveSchedulesStub = nil - if fake.getActiveSchedulesReturnsOnCall == nil { - fake.getActiveSchedulesReturnsOnCall = make(map[int]struct { - result1 map[string]*models.ActiveSchedule - result2 error - }) - } - fake.getActiveSchedulesReturnsOnCall[i] = struct { - result1 map[string]*models.ActiveSchedule - result2 error - }{result1, result2} -} - -func (fake *FakeSchedulerDB) GetDBStatus() sql.DBStats { - fake.getDBStatusMutex.Lock() - ret, specificReturn := fake.getDBStatusReturnsOnCall[len(fake.getDBStatusArgsForCall)] - fake.getDBStatusArgsForCall = append(fake.getDBStatusArgsForCall, struct { - }{}) - stub := fake.GetDBStatusStub - fakeReturns := fake.getDBStatusReturns - fake.recordInvocation("GetDBStatus", []interface{}{}) - fake.getDBStatusMutex.Unlock() - if stub != nil { - return stub() - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeSchedulerDB) GetDBStatusCallCount() int { - fake.getDBStatusMutex.RLock() - defer fake.getDBStatusMutex.RUnlock() - return len(fake.getDBStatusArgsForCall) -} - -func (fake *FakeSchedulerDB) GetDBStatusCalls(stub func() sql.DBStats) { - fake.getDBStatusMutex.Lock() - defer fake.getDBStatusMutex.Unlock() - fake.GetDBStatusStub = stub -} - -func (fake *FakeSchedulerDB) GetDBStatusReturns(result1 sql.DBStats) { - fake.getDBStatusMutex.Lock() - defer fake.getDBStatusMutex.Unlock() - fake.GetDBStatusStub = nil - fake.getDBStatusReturns = struct { - result1 sql.DBStats - }{result1} -} - -func (fake *FakeSchedulerDB) GetDBStatusReturnsOnCall(i int, result1 sql.DBStats) { - fake.getDBStatusMutex.Lock() - defer fake.getDBStatusMutex.Unlock() - fake.GetDBStatusStub = nil - if fake.getDBStatusReturnsOnCall == nil { - fake.getDBStatusReturnsOnCall = make(map[int]struct { - result1 sql.DBStats - }) - } - fake.getDBStatusReturnsOnCall[i] = struct { - result1 sql.DBStats - }{result1} -} - -func (fake *FakeSchedulerDB) Invocations() map[string][][]interface{} { - fake.invocationsMutex.RLock() - defer fake.invocationsMutex.RUnlock() - fake.closeMutex.RLock() - defer fake.closeMutex.RUnlock() - fake.getActiveSchedulesMutex.RLock() - defer fake.getActiveSchedulesMutex.RUnlock() - fake.getDBStatusMutex.RLock() - defer fake.getDBStatusMutex.RUnlock() - copiedInvocations := map[string][][]interface{}{} - for key, value := range fake.invocations { - copiedInvocations[key] = value - } - return copiedInvocations -} - -func (fake *FakeSchedulerDB) recordInvocation(key string, args []interface{}) { - fake.invocationsMutex.Lock() - defer fake.invocationsMutex.Unlock() - if fake.invocations == nil { - fake.invocations = map[string][][]interface{}{} - } - if fake.invocations[key] == nil { - fake.invocations[key] = [][]interface{}{} - } - fake.invocations[key] = append(fake.invocations[key], args) -} - -var _ db.SchedulerDB = new(FakeSchedulerDB) diff --git a/src/autoscaler/fakes/fake_storedprocedure_db.go b/src/autoscaler/fakes/fake_storedprocedure_db.go deleted file mode 100644 index 465378d995..0000000000 --- a/src/autoscaler/fakes/fake_storedprocedure_db.go +++ /dev/null @@ -1,483 +0,0 @@ -// Code generated by counterfeiter. DO NOT EDIT. -package fakes - -import ( - "context" - "sync" - - "code.cloudfoundry.org/app-autoscaler/src/autoscaler/db" - "code.cloudfoundry.org/app-autoscaler/src/autoscaler/models" -) - -type FakeStoredProcedureDB struct { - CloseStub func() error - closeMutex sync.RWMutex - closeArgsForCall []struct { - } - closeReturns struct { - result1 error - } - closeReturnsOnCall map[int]struct { - result1 error - } - CreateCredentialsStub func(context.Context, models.CredentialsOptions) (*models.Credential, error) - createCredentialsMutex sync.RWMutex - createCredentialsArgsForCall []struct { - arg1 context.Context - arg2 models.CredentialsOptions - } - createCredentialsReturns struct { - result1 *models.Credential - result2 error - } - createCredentialsReturnsOnCall map[int]struct { - result1 *models.Credential - result2 error - } - DeleteAllInstanceCredentialsStub func(context.Context, string) error - deleteAllInstanceCredentialsMutex sync.RWMutex - deleteAllInstanceCredentialsArgsForCall []struct { - arg1 context.Context - arg2 string - } - deleteAllInstanceCredentialsReturns struct { - result1 error - } - deleteAllInstanceCredentialsReturnsOnCall map[int]struct { - result1 error - } - DeleteCredentialsStub func(context.Context, models.CredentialsOptions) error - deleteCredentialsMutex sync.RWMutex - deleteCredentialsArgsForCall []struct { - arg1 context.Context - arg2 models.CredentialsOptions - } - deleteCredentialsReturns struct { - result1 error - } - deleteCredentialsReturnsOnCall map[int]struct { - result1 error - } - PingStub func() error - pingMutex sync.RWMutex - pingArgsForCall []struct { - } - pingReturns struct { - result1 error - } - pingReturnsOnCall map[int]struct { - result1 error - } - ValidateCredentialsStub func(context.Context, models.Credential) (*models.CredentialsOptions, error) - validateCredentialsMutex sync.RWMutex - validateCredentialsArgsForCall []struct { - arg1 context.Context - arg2 models.Credential - } - validateCredentialsReturns struct { - result1 *models.CredentialsOptions - result2 error - } - validateCredentialsReturnsOnCall map[int]struct { - result1 *models.CredentialsOptions - result2 error - } - invocations map[string][][]interface{} - invocationsMutex sync.RWMutex -} - -func (fake *FakeStoredProcedureDB) Close() error { - fake.closeMutex.Lock() - ret, specificReturn := fake.closeReturnsOnCall[len(fake.closeArgsForCall)] - fake.closeArgsForCall = append(fake.closeArgsForCall, struct { - }{}) - stub := fake.CloseStub - fakeReturns := fake.closeReturns - fake.recordInvocation("Close", []interface{}{}) - fake.closeMutex.Unlock() - if stub != nil { - return stub() - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeStoredProcedureDB) CloseCallCount() int { - fake.closeMutex.RLock() - defer fake.closeMutex.RUnlock() - return len(fake.closeArgsForCall) -} - -func (fake *FakeStoredProcedureDB) CloseCalls(stub func() error) { - fake.closeMutex.Lock() - defer fake.closeMutex.Unlock() - fake.CloseStub = stub -} - -func (fake *FakeStoredProcedureDB) CloseReturns(result1 error) { - fake.closeMutex.Lock() - defer fake.closeMutex.Unlock() - fake.CloseStub = nil - fake.closeReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeStoredProcedureDB) CloseReturnsOnCall(i int, result1 error) { - fake.closeMutex.Lock() - defer fake.closeMutex.Unlock() - fake.CloseStub = nil - if fake.closeReturnsOnCall == nil { - fake.closeReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.closeReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakeStoredProcedureDB) CreateCredentials(arg1 context.Context, arg2 models.CredentialsOptions) (*models.Credential, error) { - fake.createCredentialsMutex.Lock() - ret, specificReturn := fake.createCredentialsReturnsOnCall[len(fake.createCredentialsArgsForCall)] - fake.createCredentialsArgsForCall = append(fake.createCredentialsArgsForCall, struct { - arg1 context.Context - arg2 models.CredentialsOptions - }{arg1, arg2}) - stub := fake.CreateCredentialsStub - fakeReturns := fake.createCredentialsReturns - fake.recordInvocation("CreateCredentials", []interface{}{arg1, arg2}) - fake.createCredentialsMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) - } - if specificReturn { - return ret.result1, ret.result2 - } - return fakeReturns.result1, fakeReturns.result2 -} - -func (fake *FakeStoredProcedureDB) CreateCredentialsCallCount() int { - fake.createCredentialsMutex.RLock() - defer fake.createCredentialsMutex.RUnlock() - return len(fake.createCredentialsArgsForCall) -} - -func (fake *FakeStoredProcedureDB) CreateCredentialsCalls(stub func(context.Context, models.CredentialsOptions) (*models.Credential, error)) { - fake.createCredentialsMutex.Lock() - defer fake.createCredentialsMutex.Unlock() - fake.CreateCredentialsStub = stub -} - -func (fake *FakeStoredProcedureDB) CreateCredentialsArgsForCall(i int) (context.Context, models.CredentialsOptions) { - fake.createCredentialsMutex.RLock() - defer fake.createCredentialsMutex.RUnlock() - argsForCall := fake.createCredentialsArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2 -} - -func (fake *FakeStoredProcedureDB) CreateCredentialsReturns(result1 *models.Credential, result2 error) { - fake.createCredentialsMutex.Lock() - defer fake.createCredentialsMutex.Unlock() - fake.CreateCredentialsStub = nil - fake.createCredentialsReturns = struct { - result1 *models.Credential - result2 error - }{result1, result2} -} - -func (fake *FakeStoredProcedureDB) CreateCredentialsReturnsOnCall(i int, result1 *models.Credential, result2 error) { - fake.createCredentialsMutex.Lock() - defer fake.createCredentialsMutex.Unlock() - fake.CreateCredentialsStub = nil - if fake.createCredentialsReturnsOnCall == nil { - fake.createCredentialsReturnsOnCall = make(map[int]struct { - result1 *models.Credential - result2 error - }) - } - fake.createCredentialsReturnsOnCall[i] = struct { - result1 *models.Credential - result2 error - }{result1, result2} -} - -func (fake *FakeStoredProcedureDB) DeleteAllInstanceCredentials(arg1 context.Context, arg2 string) error { - fake.deleteAllInstanceCredentialsMutex.Lock() - ret, specificReturn := fake.deleteAllInstanceCredentialsReturnsOnCall[len(fake.deleteAllInstanceCredentialsArgsForCall)] - fake.deleteAllInstanceCredentialsArgsForCall = append(fake.deleteAllInstanceCredentialsArgsForCall, struct { - arg1 context.Context - arg2 string - }{arg1, arg2}) - stub := fake.DeleteAllInstanceCredentialsStub - fakeReturns := fake.deleteAllInstanceCredentialsReturns - fake.recordInvocation("DeleteAllInstanceCredentials", []interface{}{arg1, arg2}) - fake.deleteAllInstanceCredentialsMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeStoredProcedureDB) DeleteAllInstanceCredentialsCallCount() int { - fake.deleteAllInstanceCredentialsMutex.RLock() - defer fake.deleteAllInstanceCredentialsMutex.RUnlock() - return len(fake.deleteAllInstanceCredentialsArgsForCall) -} - -func (fake *FakeStoredProcedureDB) DeleteAllInstanceCredentialsCalls(stub func(context.Context, string) error) { - fake.deleteAllInstanceCredentialsMutex.Lock() - defer fake.deleteAllInstanceCredentialsMutex.Unlock() - fake.DeleteAllInstanceCredentialsStub = stub -} - -func (fake *FakeStoredProcedureDB) DeleteAllInstanceCredentialsArgsForCall(i int) (context.Context, string) { - fake.deleteAllInstanceCredentialsMutex.RLock() - defer fake.deleteAllInstanceCredentialsMutex.RUnlock() - argsForCall := fake.deleteAllInstanceCredentialsArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2 -} - -func (fake *FakeStoredProcedureDB) DeleteAllInstanceCredentialsReturns(result1 error) { - fake.deleteAllInstanceCredentialsMutex.Lock() - defer fake.deleteAllInstanceCredentialsMutex.Unlock() - fake.DeleteAllInstanceCredentialsStub = nil - fake.deleteAllInstanceCredentialsReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeStoredProcedureDB) DeleteAllInstanceCredentialsReturnsOnCall(i int, result1 error) { - fake.deleteAllInstanceCredentialsMutex.Lock() - defer fake.deleteAllInstanceCredentialsMutex.Unlock() - fake.DeleteAllInstanceCredentialsStub = nil - if fake.deleteAllInstanceCredentialsReturnsOnCall == nil { - fake.deleteAllInstanceCredentialsReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.deleteAllInstanceCredentialsReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakeStoredProcedureDB) DeleteCredentials(arg1 context.Context, arg2 models.CredentialsOptions) error { - fake.deleteCredentialsMutex.Lock() - ret, specificReturn := fake.deleteCredentialsReturnsOnCall[len(fake.deleteCredentialsArgsForCall)] - fake.deleteCredentialsArgsForCall = append(fake.deleteCredentialsArgsForCall, struct { - arg1 context.Context - arg2 models.CredentialsOptions - }{arg1, arg2}) - stub := fake.DeleteCredentialsStub - fakeReturns := fake.deleteCredentialsReturns - fake.recordInvocation("DeleteCredentials", []interface{}{arg1, arg2}) - fake.deleteCredentialsMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeStoredProcedureDB) DeleteCredentialsCallCount() int { - fake.deleteCredentialsMutex.RLock() - defer fake.deleteCredentialsMutex.RUnlock() - return len(fake.deleteCredentialsArgsForCall) -} - -func (fake *FakeStoredProcedureDB) DeleteCredentialsCalls(stub func(context.Context, models.CredentialsOptions) error) { - fake.deleteCredentialsMutex.Lock() - defer fake.deleteCredentialsMutex.Unlock() - fake.DeleteCredentialsStub = stub -} - -func (fake *FakeStoredProcedureDB) DeleteCredentialsArgsForCall(i int) (context.Context, models.CredentialsOptions) { - fake.deleteCredentialsMutex.RLock() - defer fake.deleteCredentialsMutex.RUnlock() - argsForCall := fake.deleteCredentialsArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2 -} - -func (fake *FakeStoredProcedureDB) DeleteCredentialsReturns(result1 error) { - fake.deleteCredentialsMutex.Lock() - defer fake.deleteCredentialsMutex.Unlock() - fake.DeleteCredentialsStub = nil - fake.deleteCredentialsReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeStoredProcedureDB) DeleteCredentialsReturnsOnCall(i int, result1 error) { - fake.deleteCredentialsMutex.Lock() - defer fake.deleteCredentialsMutex.Unlock() - fake.DeleteCredentialsStub = nil - if fake.deleteCredentialsReturnsOnCall == nil { - fake.deleteCredentialsReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.deleteCredentialsReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakeStoredProcedureDB) Ping() error { - fake.pingMutex.Lock() - ret, specificReturn := fake.pingReturnsOnCall[len(fake.pingArgsForCall)] - fake.pingArgsForCall = append(fake.pingArgsForCall, struct { - }{}) - stub := fake.PingStub - fakeReturns := fake.pingReturns - fake.recordInvocation("Ping", []interface{}{}) - fake.pingMutex.Unlock() - if stub != nil { - return stub() - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeStoredProcedureDB) PingCallCount() int { - fake.pingMutex.RLock() - defer fake.pingMutex.RUnlock() - return len(fake.pingArgsForCall) -} - -func (fake *FakeStoredProcedureDB) PingCalls(stub func() error) { - fake.pingMutex.Lock() - defer fake.pingMutex.Unlock() - fake.PingStub = stub -} - -func (fake *FakeStoredProcedureDB) PingReturns(result1 error) { - fake.pingMutex.Lock() - defer fake.pingMutex.Unlock() - fake.PingStub = nil - fake.pingReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeStoredProcedureDB) PingReturnsOnCall(i int, result1 error) { - fake.pingMutex.Lock() - defer fake.pingMutex.Unlock() - fake.PingStub = nil - if fake.pingReturnsOnCall == nil { - fake.pingReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.pingReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakeStoredProcedureDB) ValidateCredentials(arg1 context.Context, arg2 models.Credential) (*models.CredentialsOptions, error) { - fake.validateCredentialsMutex.Lock() - ret, specificReturn := fake.validateCredentialsReturnsOnCall[len(fake.validateCredentialsArgsForCall)] - fake.validateCredentialsArgsForCall = append(fake.validateCredentialsArgsForCall, struct { - arg1 context.Context - arg2 models.Credential - }{arg1, arg2}) - stub := fake.ValidateCredentialsStub - fakeReturns := fake.validateCredentialsReturns - fake.recordInvocation("ValidateCredentials", []interface{}{arg1, arg2}) - fake.validateCredentialsMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) - } - if specificReturn { - return ret.result1, ret.result2 - } - return fakeReturns.result1, fakeReturns.result2 -} - -func (fake *FakeStoredProcedureDB) ValidateCredentialsCallCount() int { - fake.validateCredentialsMutex.RLock() - defer fake.validateCredentialsMutex.RUnlock() - return len(fake.validateCredentialsArgsForCall) -} - -func (fake *FakeStoredProcedureDB) ValidateCredentialsCalls(stub func(context.Context, models.Credential) (*models.CredentialsOptions, error)) { - fake.validateCredentialsMutex.Lock() - defer fake.validateCredentialsMutex.Unlock() - fake.ValidateCredentialsStub = stub -} - -func (fake *FakeStoredProcedureDB) ValidateCredentialsArgsForCall(i int) (context.Context, models.Credential) { - fake.validateCredentialsMutex.RLock() - defer fake.validateCredentialsMutex.RUnlock() - argsForCall := fake.validateCredentialsArgsForCall[i] - return argsForCall.arg1, argsForCall.arg2 -} - -func (fake *FakeStoredProcedureDB) ValidateCredentialsReturns(result1 *models.CredentialsOptions, result2 error) { - fake.validateCredentialsMutex.Lock() - defer fake.validateCredentialsMutex.Unlock() - fake.ValidateCredentialsStub = nil - fake.validateCredentialsReturns = struct { - result1 *models.CredentialsOptions - result2 error - }{result1, result2} -} - -func (fake *FakeStoredProcedureDB) ValidateCredentialsReturnsOnCall(i int, result1 *models.CredentialsOptions, result2 error) { - fake.validateCredentialsMutex.Lock() - defer fake.validateCredentialsMutex.Unlock() - fake.ValidateCredentialsStub = nil - if fake.validateCredentialsReturnsOnCall == nil { - fake.validateCredentialsReturnsOnCall = make(map[int]struct { - result1 *models.CredentialsOptions - result2 error - }) - } - fake.validateCredentialsReturnsOnCall[i] = struct { - result1 *models.CredentialsOptions - result2 error - }{result1, result2} -} - -func (fake *FakeStoredProcedureDB) Invocations() map[string][][]interface{} { - fake.invocationsMutex.RLock() - defer fake.invocationsMutex.RUnlock() - fake.closeMutex.RLock() - defer fake.closeMutex.RUnlock() - fake.createCredentialsMutex.RLock() - defer fake.createCredentialsMutex.RUnlock() - fake.deleteAllInstanceCredentialsMutex.RLock() - defer fake.deleteAllInstanceCredentialsMutex.RUnlock() - fake.deleteCredentialsMutex.RLock() - defer fake.deleteCredentialsMutex.RUnlock() - fake.pingMutex.RLock() - defer fake.pingMutex.RUnlock() - fake.validateCredentialsMutex.RLock() - defer fake.validateCredentialsMutex.RUnlock() - copiedInvocations := map[string][][]interface{}{} - for key, value := range fake.invocations { - copiedInvocations[key] = value - } - return copiedInvocations -} - -func (fake *FakeStoredProcedureDB) recordInvocation(key string, args []interface{}) { - fake.invocationsMutex.Lock() - defer fake.invocationsMutex.Unlock() - if fake.invocations == nil { - fake.invocations = map[string][][]interface{}{} - } - if fake.invocations[key] == nil { - fake.invocations[key] = [][]interface{}{} - } - fake.invocations[key] = append(fake.invocations[key], args) -} - -var _ db.StoredProcedureDB = new(FakeStoredProcedureDB) diff --git a/src/autoscaler/fakes/fake_sychronizer.go b/src/autoscaler/fakes/fake_sychronizer.go deleted file mode 100644 index d5aca85cc8..0000000000 --- a/src/autoscaler/fakes/fake_sychronizer.go +++ /dev/null @@ -1,57 +0,0 @@ -// Code generated by counterfeiter. DO NOT EDIT. -package fakes - -import ( - "code.cloudfoundry.org/app-autoscaler/src/autoscaler/scalingengine/schedule" - "sync" -) - -type FakeActiveScheduleSychronizer struct { - SyncStub func() - syncMutex sync.RWMutex - syncArgsForCall []struct{} - invocations map[string][][]interface{} - invocationsMutex sync.RWMutex -} - -func (fake *FakeActiveScheduleSychronizer) Sync() { - fake.syncMutex.Lock() - fake.syncArgsForCall = append(fake.syncArgsForCall, struct{}{}) - fake.recordInvocation("Sync", []interface{}{}) - fake.syncMutex.Unlock() - if fake.SyncStub != nil { - fake.SyncStub() - } -} - -func (fake *FakeActiveScheduleSychronizer) SyncCallCount() int { - fake.syncMutex.RLock() - defer fake.syncMutex.RUnlock() - return len(fake.syncArgsForCall) -} - -func (fake *FakeActiveScheduleSychronizer) Invocations() map[string][][]interface{} { - fake.invocationsMutex.RLock() - defer fake.invocationsMutex.RUnlock() - fake.syncMutex.RLock() - defer fake.syncMutex.RUnlock() - copiedInvocations := map[string][][]interface{}{} - for key, value := range fake.invocations { - copiedInvocations[key] = value - } - return copiedInvocations -} - -func (fake *FakeActiveScheduleSychronizer) recordInvocation(key string, args []interface{}) { - fake.invocationsMutex.Lock() - defer fake.invocationsMutex.Unlock() - if fake.invocations == nil { - fake.invocations = map[string][][]interface{}{} - } - if fake.invocations[key] == nil { - fake.invocations[key] = [][]interface{}{} - } - fake.invocations[key] = append(fake.invocations[key], args) -} - -var _ schedule.ActiveScheduleSychronizer = new(FakeActiveScheduleSychronizer) diff --git a/src/autoscaler/fakes/fake_wshelper.go b/src/autoscaler/fakes/fake_wshelper.go deleted file mode 100644 index c0a1f2eb49..0000000000 --- a/src/autoscaler/fakes/fake_wshelper.go +++ /dev/null @@ -1,437 +0,0 @@ -// Code generated by counterfeiter. DO NOT EDIT. -package fakes - -import ( - "sync" - - "code.cloudfoundry.org/app-autoscaler/src/autoscaler/metricsgateway/helpers" - "code.cloudfoundry.org/go-loggregator/v9/rpc/loggregator_v2" -) - -type FakeWSHelper struct { - CloseConnStub func() error - closeConnMutex sync.RWMutex - closeConnArgsForCall []struct { - } - closeConnReturns struct { - result1 error - } - closeConnReturnsOnCall map[int]struct { - result1 error - } - IsClosedStub func() bool - isClosedMutex sync.RWMutex - isClosedArgsForCall []struct { - } - isClosedReturns struct { - result1 bool - } - isClosedReturnsOnCall map[int]struct { - result1 bool - } - PingStub func() error - pingMutex sync.RWMutex - pingArgsForCall []struct { - } - pingReturns struct { - result1 error - } - pingReturnsOnCall map[int]struct { - result1 error - } - ReadStub func() error - readMutex sync.RWMutex - readArgsForCall []struct { - } - readReturns struct { - result1 error - } - readReturnsOnCall map[int]struct { - result1 error - } - SetupConnStub func() error - setupConnMutex sync.RWMutex - setupConnArgsForCall []struct { - } - setupConnReturns struct { - result1 error - } - setupConnReturnsOnCall map[int]struct { - result1 error - } - WriteStub func(*loggregator_v2.Envelope) error - writeMutex sync.RWMutex - writeArgsForCall []struct { - arg1 *loggregator_v2.Envelope - } - writeReturns struct { - result1 error - } - writeReturnsOnCall map[int]struct { - result1 error - } - invocations map[string][][]interface{} - invocationsMutex sync.RWMutex -} - -func (fake *FakeWSHelper) CloseConn() error { - fake.closeConnMutex.Lock() - ret, specificReturn := fake.closeConnReturnsOnCall[len(fake.closeConnArgsForCall)] - fake.closeConnArgsForCall = append(fake.closeConnArgsForCall, struct { - }{}) - stub := fake.CloseConnStub - fakeReturns := fake.closeConnReturns - fake.recordInvocation("CloseConn", []interface{}{}) - fake.closeConnMutex.Unlock() - if stub != nil { - return stub() - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeWSHelper) CloseConnCallCount() int { - fake.closeConnMutex.RLock() - defer fake.closeConnMutex.RUnlock() - return len(fake.closeConnArgsForCall) -} - -func (fake *FakeWSHelper) CloseConnCalls(stub func() error) { - fake.closeConnMutex.Lock() - defer fake.closeConnMutex.Unlock() - fake.CloseConnStub = stub -} - -func (fake *FakeWSHelper) CloseConnReturns(result1 error) { - fake.closeConnMutex.Lock() - defer fake.closeConnMutex.Unlock() - fake.CloseConnStub = nil - fake.closeConnReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeWSHelper) CloseConnReturnsOnCall(i int, result1 error) { - fake.closeConnMutex.Lock() - defer fake.closeConnMutex.Unlock() - fake.CloseConnStub = nil - if fake.closeConnReturnsOnCall == nil { - fake.closeConnReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.closeConnReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakeWSHelper) IsClosed() bool { - fake.isClosedMutex.Lock() - ret, specificReturn := fake.isClosedReturnsOnCall[len(fake.isClosedArgsForCall)] - fake.isClosedArgsForCall = append(fake.isClosedArgsForCall, struct { - }{}) - stub := fake.IsClosedStub - fakeReturns := fake.isClosedReturns - fake.recordInvocation("IsClosed", []interface{}{}) - fake.isClosedMutex.Unlock() - if stub != nil { - return stub() - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeWSHelper) IsClosedCallCount() int { - fake.isClosedMutex.RLock() - defer fake.isClosedMutex.RUnlock() - return len(fake.isClosedArgsForCall) -} - -func (fake *FakeWSHelper) IsClosedCalls(stub func() bool) { - fake.isClosedMutex.Lock() - defer fake.isClosedMutex.Unlock() - fake.IsClosedStub = stub -} - -func (fake *FakeWSHelper) IsClosedReturns(result1 bool) { - fake.isClosedMutex.Lock() - defer fake.isClosedMutex.Unlock() - fake.IsClosedStub = nil - fake.isClosedReturns = struct { - result1 bool - }{result1} -} - -func (fake *FakeWSHelper) IsClosedReturnsOnCall(i int, result1 bool) { - fake.isClosedMutex.Lock() - defer fake.isClosedMutex.Unlock() - fake.IsClosedStub = nil - if fake.isClosedReturnsOnCall == nil { - fake.isClosedReturnsOnCall = make(map[int]struct { - result1 bool - }) - } - fake.isClosedReturnsOnCall[i] = struct { - result1 bool - }{result1} -} - -func (fake *FakeWSHelper) Ping() error { - fake.pingMutex.Lock() - ret, specificReturn := fake.pingReturnsOnCall[len(fake.pingArgsForCall)] - fake.pingArgsForCall = append(fake.pingArgsForCall, struct { - }{}) - stub := fake.PingStub - fakeReturns := fake.pingReturns - fake.recordInvocation("Ping", []interface{}{}) - fake.pingMutex.Unlock() - if stub != nil { - return stub() - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeWSHelper) PingCallCount() int { - fake.pingMutex.RLock() - defer fake.pingMutex.RUnlock() - return len(fake.pingArgsForCall) -} - -func (fake *FakeWSHelper) PingCalls(stub func() error) { - fake.pingMutex.Lock() - defer fake.pingMutex.Unlock() - fake.PingStub = stub -} - -func (fake *FakeWSHelper) PingReturns(result1 error) { - fake.pingMutex.Lock() - defer fake.pingMutex.Unlock() - fake.PingStub = nil - fake.pingReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeWSHelper) PingReturnsOnCall(i int, result1 error) { - fake.pingMutex.Lock() - defer fake.pingMutex.Unlock() - fake.PingStub = nil - if fake.pingReturnsOnCall == nil { - fake.pingReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.pingReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakeWSHelper) Read() error { - fake.readMutex.Lock() - ret, specificReturn := fake.readReturnsOnCall[len(fake.readArgsForCall)] - fake.readArgsForCall = append(fake.readArgsForCall, struct { - }{}) - stub := fake.ReadStub - fakeReturns := fake.readReturns - fake.recordInvocation("Read", []interface{}{}) - fake.readMutex.Unlock() - if stub != nil { - return stub() - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeWSHelper) ReadCallCount() int { - fake.readMutex.RLock() - defer fake.readMutex.RUnlock() - return len(fake.readArgsForCall) -} - -func (fake *FakeWSHelper) ReadCalls(stub func() error) { - fake.readMutex.Lock() - defer fake.readMutex.Unlock() - fake.ReadStub = stub -} - -func (fake *FakeWSHelper) ReadReturns(result1 error) { - fake.readMutex.Lock() - defer fake.readMutex.Unlock() - fake.ReadStub = nil - fake.readReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeWSHelper) ReadReturnsOnCall(i int, result1 error) { - fake.readMutex.Lock() - defer fake.readMutex.Unlock() - fake.ReadStub = nil - if fake.readReturnsOnCall == nil { - fake.readReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.readReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakeWSHelper) SetupConn() error { - fake.setupConnMutex.Lock() - ret, specificReturn := fake.setupConnReturnsOnCall[len(fake.setupConnArgsForCall)] - fake.setupConnArgsForCall = append(fake.setupConnArgsForCall, struct { - }{}) - stub := fake.SetupConnStub - fakeReturns := fake.setupConnReturns - fake.recordInvocation("SetupConn", []interface{}{}) - fake.setupConnMutex.Unlock() - if stub != nil { - return stub() - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeWSHelper) SetupConnCallCount() int { - fake.setupConnMutex.RLock() - defer fake.setupConnMutex.RUnlock() - return len(fake.setupConnArgsForCall) -} - -func (fake *FakeWSHelper) SetupConnCalls(stub func() error) { - fake.setupConnMutex.Lock() - defer fake.setupConnMutex.Unlock() - fake.SetupConnStub = stub -} - -func (fake *FakeWSHelper) SetupConnReturns(result1 error) { - fake.setupConnMutex.Lock() - defer fake.setupConnMutex.Unlock() - fake.SetupConnStub = nil - fake.setupConnReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeWSHelper) SetupConnReturnsOnCall(i int, result1 error) { - fake.setupConnMutex.Lock() - defer fake.setupConnMutex.Unlock() - fake.SetupConnStub = nil - if fake.setupConnReturnsOnCall == nil { - fake.setupConnReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.setupConnReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakeWSHelper) Write(arg1 *loggregator_v2.Envelope) error { - fake.writeMutex.Lock() - ret, specificReturn := fake.writeReturnsOnCall[len(fake.writeArgsForCall)] - fake.writeArgsForCall = append(fake.writeArgsForCall, struct { - arg1 *loggregator_v2.Envelope - }{arg1}) - stub := fake.WriteStub - fakeReturns := fake.writeReturns - fake.recordInvocation("Write", []interface{}{arg1}) - fake.writeMutex.Unlock() - if stub != nil { - return stub(arg1) - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *FakeWSHelper) WriteCallCount() int { - fake.writeMutex.RLock() - defer fake.writeMutex.RUnlock() - return len(fake.writeArgsForCall) -} - -func (fake *FakeWSHelper) WriteCalls(stub func(*loggregator_v2.Envelope) error) { - fake.writeMutex.Lock() - defer fake.writeMutex.Unlock() - fake.WriteStub = stub -} - -func (fake *FakeWSHelper) WriteArgsForCall(i int) *loggregator_v2.Envelope { - fake.writeMutex.RLock() - defer fake.writeMutex.RUnlock() - argsForCall := fake.writeArgsForCall[i] - return argsForCall.arg1 -} - -func (fake *FakeWSHelper) WriteReturns(result1 error) { - fake.writeMutex.Lock() - defer fake.writeMutex.Unlock() - fake.WriteStub = nil - fake.writeReturns = struct { - result1 error - }{result1} -} - -func (fake *FakeWSHelper) WriteReturnsOnCall(i int, result1 error) { - fake.writeMutex.Lock() - defer fake.writeMutex.Unlock() - fake.WriteStub = nil - if fake.writeReturnsOnCall == nil { - fake.writeReturnsOnCall = make(map[int]struct { - result1 error - }) - } - fake.writeReturnsOnCall[i] = struct { - result1 error - }{result1} -} - -func (fake *FakeWSHelper) Invocations() map[string][][]interface{} { - fake.invocationsMutex.RLock() - defer fake.invocationsMutex.RUnlock() - fake.closeConnMutex.RLock() - defer fake.closeConnMutex.RUnlock() - fake.isClosedMutex.RLock() - defer fake.isClosedMutex.RUnlock() - fake.pingMutex.RLock() - defer fake.pingMutex.RUnlock() - fake.readMutex.RLock() - defer fake.readMutex.RUnlock() - fake.setupConnMutex.RLock() - defer fake.setupConnMutex.RUnlock() - fake.writeMutex.RLock() - defer fake.writeMutex.RUnlock() - copiedInvocations := map[string][][]interface{}{} - for key, value := range fake.invocations { - copiedInvocations[key] = value - } - return copiedInvocations -} - -func (fake *FakeWSHelper) recordInvocation(key string, args []interface{}) { - fake.invocationsMutex.Lock() - defer fake.invocationsMutex.Unlock() - if fake.invocations == nil { - fake.invocations = map[string][][]interface{}{} - } - if fake.invocations[key] == nil { - fake.invocations[key] = [][]interface{}{} - } - fake.invocations[key] = append(fake.invocations[key], args) -} - -var _ helpers.WSHelper = new(FakeWSHelper) diff --git a/src/autoscaler/fakes/fakes.go b/src/autoscaler/fakes/fakes.go deleted file mode 100644 index 86dd0266f9..0000000000 --- a/src/autoscaler/fakes/fakes.go +++ /dev/null @@ -1,21 +0,0 @@ -package fakes - -//go:generate counterfeiter -o ./fake_wshelper.go ../metricsgateway/helpers WSHelper -//go:generate counterfeiter -o ./fake_cf_client.go ../cf CFClient -//go:generate counterfeiter -o ./fake_policy_db.go ../db PolicyDB -//go:generate counterfeiter -o ./fake_scalingengine_db.go ../db ScalingEngineDB -//go:generate counterfeiter -o ./fake_scheduler_db.go ../db SchedulerDB -//go:generate counterfeiter -o ./fake_scalingengine.go ../scalingengine ScalingEngine -//go:generate counterfeiter -o ./fake_binding_db.go ../db BindingDB -//go:generate counterfeiter -o ./fake_credentials.go ../cred_helper Credentials -//go:generate counterfeiter -o ./fake_storedprocedure_db.go ../db StoredProcedureDB -//go:generate counterfeiter -o ./fake_metric_forwarder.go ../metricsforwarder/forwarder MetricForwarder -//go:generate counterfeiter -o ./fake_plan_checker.go ../api/plancheck PlanChecker -//go:generate counterfeiter -o ./fake_log_cache_client.go ../eventgenerator/client LogCacheClientReader -//go:generate counterfeiter -o ./fake_envelope_processor.go ../envelopeprocessor EnvelopeProcessor -//go:generate counterfeiter -o ./fake_log_cache_creator.go ../eventgenerator/client LogCacheClientCreator -//go:generate counterfeiter -o ./fake_metric_server_creator_creator.go ../eventgenerator/client MetricServerClientCreator -//go:generate counterfeiter -o ./fake_go_log_cache_client.go ../eventgenerator/client GoLogCacheClient -//go:generate counterfeiter -o ./fake_grpc.go ../eventgenerator/client GRPCOptions -//go:generate counterfeiter -o ./fake_envelope_processor_creator.go ../envelopeprocessor EnvelopeProcessorCreator -//go:generate counterfeiter -o ./fake_plan_checker.go ../api/plancheck PlanChecker diff --git a/src/autoscaler/generate-fakes.go b/src/autoscaler/generate-fakes.go new file mode 100644 index 0000000000..536f6d59d9 --- /dev/null +++ b/src/autoscaler/generate-fakes.go @@ -0,0 +1,30 @@ +package fakes + +// Multiple go:generate directives instead of counterfeiter:generate due to https://github.com/maxbrunsfeld/counterfeiter/issues/254 +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fakes/fake_wshelper.go ./metricsgateway/helpers WSHelper +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fakes/fake_cf_client.go ./cf CFClient +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fakes/fake_policy_db.go ./db PolicyDB +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fakes/fake_scalingengine_db.go ./db ScalingEngineDB +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fakes/fake_scheduler_db.go ./db SchedulerDB +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fakes/fake_scalingengine.go ./scalingengine ScalingEngine +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fakes/fake_binding_db.go ./db BindingDB +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fakes/fake_app_metric_db.go ./db AppMetricDB +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fakes/fake_instancemetrics_db.go ./db InstanceMetricsDB +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fakes/fake_credentials.go ./cred_helper Credentials +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fakes/fake_storedprocedure_db.go ./db StoredProcedureDB +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fakes/fake_metric_forwarder.go ./metricsforwarder/forwarder MetricForwarder +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fakes/fake_plan_checker.go ./api/plancheck PlanChecker +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fakes/fake_log_cache_client.go ./eventgenerator/client LogCacheClientReader +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fakes/fake_envelope_processor.go ./envelopeprocessor EnvelopeProcessor +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fakes/fake_log_cache_creator.go ./eventgenerator/client LogCacheClientCreator +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fakes/fake_metric_server_creator_creator.go ./eventgenerator/client MetricServerClientCreator +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fakes/fake_go_log_cache_client.go ./eventgenerator/client GoLogCacheClient +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fakes/fake_grpc.go ./eventgenerator/client GRPCOptions +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fakes/fake_envelope_processor_creator.go ./envelopeprocessor EnvelopeProcessorCreator +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fakes/fake_plan_checker.go ./api/plancheck PlanChecker +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fakes/fake_ratelimiter.go ./ratelimiter Limiter +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fakes/fake_httpstatus_collector.go ./healthendpoint HTTPStatusCollector +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fakes/fake_database_status.go ./healthendpoint DatabaseStatus +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fakes/fake_emitter.go ./metricsgateway Emitter +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fakes/fake_operator.go ./operator Operator +//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -o ./fakes/fake_sychronizer.go ./scalingengine/schedule ActiveScheduleSychronizer diff --git a/src/autoscaler/go.mod b/src/autoscaler/go.mod index 2a8d485a68..f4210ed029 100644 --- a/src/autoscaler/go.mod +++ b/src/autoscaler/go.mod @@ -6,237 +6,81 @@ require ( code.cloudfoundry.org/cfhttp/v2 v2.0.1-0.20230113212937-05beac96f8c7 code.cloudfoundry.org/clock v1.1.0 code.cloudfoundry.org/go-log-cache v1.0.1-0.20230106184352-6dc0e9ab2e65 - code.cloudfoundry.org/go-loggregator/v9 v9.0.6 + code.cloudfoundry.org/go-loggregator/v9 v9.0.8 code.cloudfoundry.org/lager/v3 v3.0.2 code.cloudfoundry.org/tlsconfig v0.0.0-20220621140725-0e6fbd869921 dario.cat/mergo v1.0.0 github.com/cenkalti/backoff/v4 v4.2.1 - github.com/go-chi/chi/v5 v5.0.8 + github.com/go-chi/chi/v5 v5.0.10 github.com/go-sql-driver/mysql v1.7.1 github.com/golang/protobuf v1.5.3 - github.com/golangci/golangci-lint v1.53.3 github.com/gorilla/mux v1.8.0 github.com/gorilla/websocket v1.5.0 github.com/hashicorp/go-retryablehttp v0.7.4 - github.com/jackc/pgx/v5 v5.4.1 + github.com/jackc/pgx/v5 v5.4.3 github.com/jmoiron/sqlx v1.3.5 - github.com/maxbrunsfeld/counterfeiter/v6 v6.6.2 + github.com/maxbrunsfeld/counterfeiter/v6 v6.7.0 github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d - github.com/onsi/ginkgo/v2 v2.11.0 - github.com/onsi/gomega v1.27.8 + github.com/onsi/ginkgo/v2 v2.12.1 + github.com/onsi/gomega v1.28.0 github.com/patrickmn/go-cache v2.1.0+incompatible github.com/pivotal-cf/brokerapi/v10 v10.0.0 github.com/pkg/errors v0.9.1 - github.com/prometheus/client_golang v1.16.0 + github.com/prometheus/client_golang v1.17.0 github.com/rubyist/circuitbreaker v2.2.1+incompatible - github.com/square/certstrap v1.3.0 github.com/steinfletcher/apitest v1.5.15 github.com/stretchr/testify v1.8.4 github.com/tedsuo/ifrit v0.0.0-20230516164442-7862c310ad26 github.com/xeipuuv/gojsonschema v1.2.0 - golang.org/x/crypto v0.11.0 - golang.org/x/exp v0.0.0-20230711023510-fffb14384f22 - golang.org/x/net v0.12.0 + golang.org/x/crypto v0.13.0 + golang.org/x/exp v0.0.0-20230905200255-921286631fa9 + golang.org/x/net v0.15.0 golang.org/x/time v0.3.0 - google.golang.org/grpc v1.56.2 + google.golang.org/grpc v1.58.2 gopkg.in/yaml.v3 v3.0.1 ) require ( - 4d63.com/gocheckcompilerdirectives v1.2.1 // indirect - 4d63.com/gochecknoglobals v0.2.1 // indirect code.cloudfoundry.org/go-diodes v0.0.0-20221212174934-b8cb650f2489 // indirect - filippo.io/edwards25519 v1.0.0-rc.1 // indirect - github.com/4meepo/tagalign v1.2.2 // indirect - github.com/Abirdcfly/dupword v0.0.11 // indirect - github.com/Antonboom/errname v0.1.10 // indirect - github.com/Antonboom/nilnil v0.1.5 // indirect - github.com/BurntSushi/toml v1.3.2 // indirect - github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 // indirect - github.com/GaijinEntertainment/go-exhaustruct/v2 v2.3.0 // indirect - github.com/Masterminds/semver v1.5.0 // indirect - github.com/OpenPeeDeeP/depguard/v2 v2.1.0 // indirect - github.com/alexkohler/nakedret/v2 v2.0.2 // indirect - github.com/alexkohler/prealloc v1.0.0 // indirect - github.com/alingse/asasalint v0.0.11 // indirect - github.com/ashanbrown/forbidigo v1.5.3 // indirect - github.com/ashanbrown/makezero v1.1.1 // indirect github.com/beorn7/perks v1.0.1 // indirect - github.com/bkielbasa/cyclop v1.2.1 // indirect github.com/blang/semver v3.5.1+incompatible // indirect - github.com/blizzy78/varnamelen v0.8.0 // indirect - github.com/bombsimon/wsl/v3 v3.4.0 // indirect - github.com/breml/bidichk v0.2.4 // indirect - github.com/breml/errchkjson v0.3.1 // indirect - github.com/butuzov/ireturn v0.2.0 // indirect - github.com/butuzov/mirror v1.1.0 // indirect github.com/cenk/backoff v2.2.1+incompatible // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect - github.com/charithe/durationcheck v0.0.10 // indirect - github.com/chavacava/garif v0.0.0-20230227094218-b8c73b2037b8 // indirect - github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect - github.com/curioswitch/go-reassign v0.2.0 // indirect - github.com/daixiang0/gci v0.10.1 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/denis-tingaikin/go-header v0.4.3 // indirect - github.com/esimonov/ifshort v1.0.4 // indirect - github.com/ettle/strcase v0.1.1 // indirect github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a // indirect github.com/fatih/color v1.15.0 // indirect - github.com/fatih/structtag v1.2.0 // indirect - github.com/firefart/nonamedreturns v1.0.4 // indirect github.com/fsnotify/fsnotify v1.5.4 // indirect - github.com/fzipp/gocyclo v0.6.0 // indirect - github.com/go-critic/go-critic v0.8.1 // indirect github.com/go-logr/logr v1.2.4 // indirect github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect - github.com/go-toolsmith/astcast v1.1.0 // indirect - github.com/go-toolsmith/astcopy v1.1.0 // indirect - github.com/go-toolsmith/astequal v1.1.0 // indirect - github.com/go-toolsmith/astfmt v1.1.0 // indirect - github.com/go-toolsmith/astp v1.1.0 // indirect - github.com/go-toolsmith/strparse v1.1.0 // indirect - github.com/go-toolsmith/typep v1.1.0 // indirect - github.com/go-xmlfmt/xmlfmt v1.1.2 // indirect - github.com/gobwas/glob v0.2.3 // indirect - github.com/gofrs/flock v0.8.1 // indirect - github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2 // indirect - github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a // indirect - github.com/golangci/go-misc v0.0.0-20220329215616-d24fe342adfe // indirect - github.com/golangci/gofmt v0.0.0-20220901101216-f2edd75033f2 // indirect - github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0 // indirect - github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca // indirect - github.com/golangci/misspell v0.4.0 // indirect - github.com/golangci/revgrep v0.0.0-20220804021717-745bb2f7c2e6 // indirect - github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4 // indirect github.com/google/go-cmp v0.5.9 // indirect github.com/google/pprof v0.0.0-20230228050547-1710fef4ab10 // indirect github.com/google/uuid v1.3.0 // indirect - github.com/gordonklaus/ineffassign v0.0.0-20230610083614-0e73809eb601 // indirect - github.com/gostaticanalysis/analysisutil v0.7.1 // indirect - github.com/gostaticanalysis/comment v1.4.2 // indirect - github.com/gostaticanalysis/forcetypeassert v0.1.0 // indirect - github.com/gostaticanalysis/nilerr v0.1.1 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.15.0 // indirect - github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect - github.com/hashicorp/go-multierror v1.1.1 // indirect - github.com/hashicorp/go-version v1.6.0 // indirect - github.com/hashicorp/hcl v1.0.0 // indirect - github.com/hexops/gotextdiff v1.0.3 // indirect - github.com/howeyc/gopass v0.0.0-20170109162249-bf9dde6d0d2c // indirect - github.com/inconshreveable/mousetrap v1.1.0 // indirect + github.com/hashicorp/go-hclog v1.2.0 // indirect github.com/jackc/pgpassfile v1.0.0 // indirect github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect - github.com/jackc/puddle/v2 v2.2.0 // indirect - github.com/jgautheron/goconst v1.5.1 // indirect - github.com/jingyugao/rowserrcheck v1.1.1 // indirect - github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af // indirect - github.com/julz/importas v0.1.0 // indirect - github.com/kisielk/errcheck v1.6.3 // indirect - github.com/kisielk/gotool v1.0.0 // indirect - github.com/kkHAIKE/contextcheck v1.1.4 // indirect - github.com/kulti/thelper v0.6.3 // indirect - github.com/kunwardeep/paralleltest v1.0.7 // indirect - github.com/kyoh86/exportloopref v0.1.11 // indirect - github.com/ldez/gomoddirectives v0.2.3 // indirect - github.com/ldez/tagliatelle v0.5.0 // indirect - github.com/leonklingele/grouper v1.1.1 // indirect - github.com/lufeee/execinquery v1.2.1 // indirect - github.com/magiconair/properties v1.8.6 // indirect - github.com/maratori/testableexamples v1.0.0 // indirect - github.com/maratori/testpackage v1.1.1 // indirect - github.com/matoous/godox v0.0.0-20230222163458-006bad1f9d26 // indirect + github.com/jackc/puddle/v2 v2.2.1 // indirect + github.com/lib/pq v1.10.9 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.17 // indirect - github.com/mattn/go-runewidth v0.0.9 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect - github.com/mbilski/exhaustivestruct v1.2.0 // indirect - github.com/mgechev/revive v1.3.2 // indirect - github.com/mitchellh/go-homedir v1.1.0 // indirect - github.com/mitchellh/mapstructure v1.5.0 // indirect - github.com/moricho/tparallel v0.3.1 // indirect - github.com/nakabonne/nestif v0.3.1 // indirect - github.com/nbutton23/zxcvbn-go v0.0.0-20210217022336-fa2cb2858354 // indirect - github.com/nishanths/exhaustive v0.11.0 // indirect - github.com/nishanths/predeclared v0.2.2 // indirect - github.com/nunnatsa/ginkgolinter v0.12.1 // indirect - github.com/olekukonko/tablewriter v0.0.5 // indirect github.com/openzipkin/zipkin-go v0.4.1 // indirect github.com/pborman/uuid v1.2.1 // indirect - github.com/pelletier/go-toml v1.9.5 // indirect - github.com/pelletier/go-toml/v2 v2.0.5 // indirect github.com/peterbourgon/g2s v0.0.0-20170223122336-d4e7ad98afea // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/polyfloyd/go-errorlint v1.4.2 // indirect - github.com/prometheus/client_model v0.3.0 // indirect - github.com/prometheus/common v0.42.0 // indirect - github.com/prometheus/procfs v0.10.1 // indirect - github.com/quasilyte/go-ruleguard v0.3.19 // indirect - github.com/quasilyte/gogrep v0.5.0 // indirect - github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 // indirect - github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 // indirect - github.com/russross/blackfriday/v2 v2.1.0 // indirect - github.com/ryancurrah/gomodguard v1.3.0 // indirect - github.com/ryanrolds/sqlclosecheck v0.4.0 // indirect - github.com/sanposhiho/wastedassign/v2 v2.0.7 // indirect - github.com/sashamelentyev/interfacebloat v1.1.0 // indirect - github.com/sashamelentyev/usestdlibvars v1.23.0 // indirect - github.com/securego/gosec/v2 v2.16.0 // indirect - github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c // indirect - github.com/sirupsen/logrus v1.9.3 // indirect - github.com/sivchari/containedctx v1.0.3 // indirect - github.com/sivchari/nosnakecase v1.7.0 // indirect - github.com/sivchari/tenv v1.7.1 // indirect - github.com/sonatard/noctx v0.0.2 // indirect - github.com/sourcegraph/go-diff v0.7.0 // indirect - github.com/spf13/afero v1.9.2 // indirect - github.com/spf13/cast v1.5.0 // indirect - github.com/spf13/cobra v1.7.0 // indirect - github.com/spf13/jwalterweatherman v1.1.0 // indirect - github.com/spf13/pflag v1.0.5 // indirect - github.com/spf13/viper v1.13.0 // indirect - github.com/ssgreg/nlreturn/v2 v2.2.1 // indirect - github.com/stbenjam/no-sprintf-host-port v0.1.1 // indirect - github.com/stretchr/objx v0.5.0 // indirect - github.com/subosito/gotenv v1.4.1 // indirect - github.com/t-yuki/gocover-cobertura v0.0.0-20180217150009-aaee18c8195c // indirect - github.com/tdakkota/asciicheck v0.2.0 // indirect - github.com/tetafro/godot v1.4.11 // indirect - github.com/timakin/bodyclose v0.0.0-20230421092635-574207250966 // indirect - github.com/timonwong/loggercheck v0.9.4 // indirect - github.com/tomarrell/wrapcheck/v2 v2.8.1 // indirect - github.com/tommy-muehle/go-mnd/v2 v2.5.1 // indirect - github.com/ultraware/funlen v0.0.3 // indirect - github.com/ultraware/whitespace v0.0.5 // indirect - github.com/urfave/cli v1.22.9 // indirect - github.com/uudashr/gocognit v1.0.6 // indirect + github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16 // indirect + github.com/prometheus/common v0.44.0 // indirect + github.com/prometheus/procfs v0.11.1 // indirect github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect - github.com/xen0n/gosmopolitan v1.2.1 // indirect - github.com/yagipy/maintidx v1.0.0 // indirect - github.com/yeya24/promlinter v0.2.0 // indirect - github.com/ykadowak/zerologlint v0.1.2 // indirect - gitlab.com/bosi/decorder v0.2.3 // indirect - go.step.sm/crypto v0.16.2 // indirect - go.tmz.dev/musttag v0.7.0 // indirect - go.uber.org/atomic v1.10.0 // indirect - go.uber.org/multierr v1.6.0 // indirect - go.uber.org/zap v1.24.0 // indirect - golang.org/x/exp/typeparams v0.0.0-20230224173230-c95f2b4c22f2 // indirect - golang.org/x/mod v0.11.0 // indirect - golang.org/x/sync v0.2.0 // indirect - golang.org/x/sys v0.10.0 // indirect - golang.org/x/term v0.10.0 // indirect - golang.org/x/text v0.11.0 // indirect - golang.org/x/tools v0.9.3 // indirect - google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect - google.golang.org/protobuf v1.30.0 // indirect - gopkg.in/ini.v1 v1.67.0 // indirect - gopkg.in/yaml.v2 v2.4.0 // indirect - honnef.co/go/tools v0.4.3 // indirect - mvdan.cc/gofumpt v0.5.0 // indirect - mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed // indirect - mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b // indirect - mvdan.cc/unparam v0.0.0-20221223090309-7455f1af531d // indirect + golang.org/x/mod v0.12.0 // indirect + golang.org/x/sync v0.3.0 // indirect + golang.org/x/sys v0.12.0 // indirect + golang.org/x/text v0.13.0 // indirect + golang.org/x/tools v0.13.0 // indirect + google.golang.org/genproto v0.0.0-20230711160842-782d3b101e98 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect + google.golang.org/protobuf v1.31.0 // indirect ) diff --git a/src/autoscaler/go.sum b/src/autoscaler/go.sum index f8ae9ed0d9..ad9113beae 100644 --- a/src/autoscaler/go.sum +++ b/src/autoscaler/go.sum @@ -1,7 +1,3 @@ -4d63.com/gocheckcompilerdirectives v1.2.1 h1:AHcMYuw56NPjq/2y615IGg2kYkBdTvOaojYCBcRE7MA= -4d63.com/gocheckcompilerdirectives v1.2.1/go.mod h1:yjDJSxmDTtIHHCqX0ufRYZDL6vQtMG7tJdKVeWwsqvs= -4d63.com/gochecknoglobals v0.2.1 h1:1eiorGsgHOFOuoOiJDy2psSrQbRdIHrlge0IJIkUgDc= -4d63.com/gochecknoglobals v0.2.1/go.mod h1:KRE8wtJB3CXCsb1xy421JfTHIIbmT3U5ruxw2Qu8fSU= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= @@ -604,8 +600,8 @@ code.cloudfoundry.org/go-diodes v0.0.0-20221212174934-b8cb650f2489 h1:bLiGonuL4K code.cloudfoundry.org/go-diodes v0.0.0-20221212174934-b8cb650f2489/go.mod h1:gbU0Jysh1Ep/3KfwjLLdzSJWbd9Ybh59UYCuTNBpm7U= code.cloudfoundry.org/go-log-cache v1.0.1-0.20230106184352-6dc0e9ab2e65 h1:XtOanl6QBUYNDI2+km7qtlY/KOkhQRpVBPPTapd6glc= code.cloudfoundry.org/go-log-cache v1.0.1-0.20230106184352-6dc0e9ab2e65/go.mod h1:80JBMn31Cl0fzUNSsT7m0Qy4lGeT8dtA7kOR0WWt+Os= -code.cloudfoundry.org/go-loggregator/v9 v9.0.6 h1:L2zNzSMqo6kwLw4p5/c6PF7Wur4WCnvar9+MbOevYMs= -code.cloudfoundry.org/go-loggregator/v9 v9.0.6/go.mod h1:yc3+eazjM8HC8NSTtaUIsSSalWf5rNOEbKTtvr61Z+8= +code.cloudfoundry.org/go-loggregator/v9 v9.0.8 h1:Ntt6dubOuV2Rk2Yw0C2OOvaGjZNWSKJoWM72ihTaPo4= +code.cloudfoundry.org/go-loggregator/v9 v9.0.8/go.mod h1:+U07+rozDh39Wd0MmS5Bd9mn/gOwg8NLqv3gnxRvuHI= code.cloudfoundry.org/lager/v3 v3.0.2 h1:H0dcQY+814G1Ea0e5K/AMaMpcr+Pe5Iv+AALJEwrP9U= code.cloudfoundry.org/lager/v3 v3.0.2/go.mod h1:zA6tOIWhr5uZUez+PGpdfBHDWQOfhOrr0cgKDagZPwk= code.cloudfoundry.org/tlsconfig v0.0.0-20220621140725-0e6fbd869921 h1:1PLAuQR56K2pw0lnlcXe+37uOaGg939W1Lqv8wxYpu4= @@ -613,82 +609,27 @@ code.cloudfoundry.org/tlsconfig v0.0.0-20220621140725-0e6fbd869921/go.mod h1:oIt dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -filippo.io/edwards25519 v1.0.0-rc.1 h1:m0VOOB23frXZvAOK44usCgLWvtsxIoMCTBGJZlpmGfU= -filippo.io/edwards25519 v1.0.0-rc.1/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= gioui.org v0.0.0-20210308172011-57750fc8a0a6/go.mod h1:RSH6KIUZ0p2xy5zHDxgAM4zumjgTw83q2ge/PI+yyw8= git.sr.ht/~sbinet/gg v0.3.1/go.mod h1:KGYtlADtqsqANL9ueOFkWymvzUvLMQllU5Ixo+8v3pc= -github.com/4meepo/tagalign v1.2.2 h1:kQeUTkFTaBRtd/7jm8OKJl9iHk0gAO+TDFPHGSna0aw= -github.com/4meepo/tagalign v1.2.2/go.mod h1:Q9c1rYMZJc9dPRkbQPpcBNCLEmY2njbAsXhQOZFE2dE= -github.com/Abirdcfly/dupword v0.0.11 h1:z6v8rMETchZXUIuHxYNmlUAuKuB21PeaSymTed16wgU= -github.com/Abirdcfly/dupword v0.0.11/go.mod h1:wH8mVGuf3CP5fsBTkfWwwwKTjDnVVCxtU8d8rgeVYXA= -github.com/Antonboom/errname v0.1.10 h1:RZ7cYo/GuZqjr1nuJLNe8ZH+a+Jd9DaZzttWzak9Bls= -github.com/Antonboom/errname v0.1.10/go.mod h1:xLeiCIrvVNpUtsN0wxAh05bNIZpqE22/qDMnTBTttiA= -github.com/Antonboom/nilnil v0.1.5 h1:X2JAdEVcbPaOom2TUa1FxZ3uyuUlex0XMLGYMemu6l0= -github.com/Antonboom/nilnil v0.1.5/go.mod h1:I24toVuBKhfP5teihGWctrRiPbRKHwZIFOvc6v3HZXk= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8= -github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 h1:sHglBQTwgx+rWPdisA5ynNEsoARbiCBOyGcJM4/OzsM= -github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs= -github.com/GaijinEntertainment/go-exhaustruct/v2 v2.3.0 h1:+r1rSv4gvYn0wmRjC8X7IAzX8QezqtFV9m0MUHFJgts= -github.com/GaijinEntertainment/go-exhaustruct/v2 v2.3.0/go.mod h1:b3g59n2Y+T5xmcxJL+UEG2f8cQploZm1mR/v6BW0mU0= github.com/JohnCGriffin/overflow v0.0.0-20211019200055-46fa312c352c/go.mod h1:X0CRv0ky0k6m906ixxpzmDRLvX58TFUKS2eePweuyxk= -github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= -github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww= -github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= -github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= -github.com/Masterminds/sprig/v3 v3.2.2/go.mod h1:UoaO7Yp8KlPnJIYWTFkMaqPUYKTfGFPhxNuwnnxkKlk= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/OpenPeeDeeP/depguard/v2 v2.1.0 h1:aQl70G173h/GZYhWf36aE5H0KaujXfVMnn/f1kSDVYY= -github.com/OpenPeeDeeP/depguard/v2 v2.1.0/go.mod h1:PUBgk35fX4i7JDmwzlJwJ+GMe6NfO1723wmJMgPThNQ= github.com/ajstarks/deck v0.0.0-20200831202436-30c9fc6549a9/go.mod h1:JynElWSGnm/4RlzPXRlREEwqTHAN3T56Bv2ITsFT3gY= github.com/ajstarks/deck/generate v0.0.0-20210309230005-c3f852c02e19/go.mod h1:T13YZdzov6OU0A1+RfKZiZN9ca6VeKdBdyDV+BY97Tk= github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= github.com/ajstarks/svgo v0.0.0-20211024235047-1546f124cd8b/go.mod h1:1KcenG0jGWcpt8ov532z81sp/kMMUG485J2InIOyADM= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/alexkohler/nakedret/v2 v2.0.2 h1:qnXuZNvv3/AxkAb22q/sEsEpcA99YxLFACDtEw9TPxE= -github.com/alexkohler/nakedret/v2 v2.0.2/go.mod h1:2b8Gkk0GsOrqQv/gPWjNLDSKwG8I5moSXG1K4VIBcTQ= -github.com/alexkohler/prealloc v1.0.0 h1:Hbq0/3fJPQhNkN0dR95AVrr6R7tou91y0uHG5pOcUuw= -github.com/alexkohler/prealloc v1.0.0/go.mod h1:VetnK3dIgFBBKmg0YnD9F9x6Icjd+9cvfHR56wJVlKE= -github.com/alingse/asasalint v0.0.11 h1:SFwnQXJ49Kx/1GghOFz1XGqHYKp21Kq1nHad/0WQRnw= -github.com/alingse/asasalint v0.0.11/go.mod h1:nCaoMhw7a9kSJObvQyVzNTPBDbNpdocqrSP7t/cW5+I= github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/apache/arrow/go/v10 v10.0.1/go.mod h1:YvhnlEePVnBS4+0z3fhPfUy7W1Ikj0Ih0vcRo/gZ1M0= github.com/apache/arrow/go/v11 v11.0.0/go.mod h1:Eg5OsL5H+e299f7u5ssuXsuHQVEGC4xei5aX110hRiI= github.com/apache/thrift v0.16.0/go.mod h1:PHK3hniurgQaNMZYaCLEqXKsYK8upmhPbmdP2FXSqgU= -github.com/ashanbrown/forbidigo v1.5.3 h1:jfg+fkm/snMx+V9FBwsl1d340BV/99kZGv5jN9hBoXk= -github.com/ashanbrown/forbidigo v1.5.3/go.mod h1:Y8j9jy9ZYAEHXdu723cUlraTqbzjKF1MUyfOKL+AjcU= -github.com/ashanbrown/makezero v1.1.1 h1:iCQ87C0V0vSyO+M9E/FZYbu65auqH0lnsOkf5FcB28s= -github.com/ashanbrown/makezero v1.1.1/go.mod h1:i1bJLCRSCHOcOa9Y6MyF2FTfMZMFdHvxKHxgO5Z1axI= -github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/bkielbasa/cyclop v1.2.1 h1:AeF71HZDob1P2/pRm1so9cd1alZnrpyc4q2uP2l0gJY= -github.com/bkielbasa/cyclop v1.2.1/go.mod h1:K/dT/M0FPAiYjBgQGau7tz+3TMh4FWAEqlMhzFWCrgM= github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ= github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= -github.com/blizzy78/varnamelen v0.8.0 h1:oqSblyuQvFsW1hbBHh1zfwrKe3kcSj0rnXkKzsQ089M= -github.com/blizzy78/varnamelen v0.8.0/go.mod h1:V9TzQZ4fLJ1DSrjVDfl89H7aMnTvKkApdHeyESmyR7k= -github.com/bombsimon/wsl/v3 v3.4.0 h1:RkSxjT3tmlptwfgEgTgU+KYKLI35p/tviNXNXiL2aNU= -github.com/bombsimon/wsl/v3 v3.4.0/go.mod h1:KkIB+TXkqy6MvK9BDZVbZxKNYsE1/oLRJbIFtf14qqo= github.com/boombuler/barcode v1.0.0/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= github.com/boombuler/barcode v1.0.1/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= -github.com/breml/bidichk v0.2.4 h1:i3yedFWWQ7YzjdZJHnPo9d/xURinSq3OM+gyM43K4/8= -github.com/breml/bidichk v0.2.4/go.mod h1:7Zk0kRFt1LIZxtQdl9W9JwGAcLTTkOs+tN7wuEYGJ3s= -github.com/breml/errchkjson v0.3.1 h1:hlIeXuspTyt8Y/UmP5qy1JocGNR00KQHgfaNtRAjoxQ= -github.com/breml/errchkjson v0.3.1/go.mod h1:XroxrzKjdiutFyW3nWhw34VGg7kiMsDQox73yWCGI2U= -github.com/butuzov/ireturn v0.2.0 h1:kCHi+YzC150GE98WFuZQu9yrTn6GEydO2AuPLbTgnO4= -github.com/butuzov/ireturn v0.2.0/go.mod h1:Wh6Zl3IMtTpaIKbmwzqi6olnM9ptYQxxVacMsOEFPoc= -github.com/butuzov/mirror v1.1.0 h1:ZqX54gBVMXu78QLoiqdwpl2mgmoOJTk7s4p4o+0avZI= -github.com/butuzov/mirror v1.1.0/go.mod h1:8Q0BdQU6rC6WILDiBM60DBfvV78OLJmMmixe7GF45AE= github.com/cenk/backoff v2.2.1+incompatible h1:djdFT7f4gF2ttuzRKPbMOWgZajgesItGLwG5FTQKmmE= github.com/cenk/backoff v2.2.1+incompatible/go.mod h1:7FtoeaSnHoZnmZzz47cM35Y9nSW7tNyaidugnHTaFDE= github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= @@ -698,13 +639,8 @@ github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/charithe/durationcheck v0.0.10 h1:wgw73BiocdBDQPik+zcEoBG/ob8uyBHf2iyoHGPf5w4= -github.com/charithe/durationcheck v0.0.10/go.mod h1:bCWXb7gYRysD1CU3C+u4ceO49LoGOY1C1L6uouGNreQ= -github.com/chavacava/garif v0.0.0-20230227094218-b8c73b2037b8 h1:W9o46d2kbNL06lq7UNDPV0zYLzkrde/bjIqO02eoll0= -github.com/chavacava/garif v0.0.0-20230227094218-b8c73b2037b8/go.mod h1:gakxgyXaaPkxvLw1XQxNGK4I37ys9iBRzNUx/B7pUCo= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= @@ -722,19 +658,10 @@ github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20220314180256-7f1daf1720fc/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20230105202645-06c439db220b/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20230310173818-32f1caf87195/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w= -github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/curioswitch/go-reassign v0.2.0 h1:G9UZyOcpk/d7Gd6mqYgd8XYWFMw/znxwGDUstnC9DIo= -github.com/curioswitch/go-reassign v0.2.0/go.mod h1:x6OpXuWvgfQaMGks2BZybTngWjT84hqJfKoO8Tt/Roc= -github.com/daixiang0/gci v0.10.1 h1:eheNA3ljF6SxnPD/vE4lCBusVHmV3Rs3dkKvFrJ7MR0= -github.com/daixiang0/gci v0.10.1/go.mod h1:xtHP9N7AHdNvtRNfcx9gwTDfw7FRJx4bZUsiEfiNNAI= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/denis-tingaikin/go-header v0.4.3 h1:tEaZKAlqql6SKCY++utLmkPLd6K8IBM20Ha7UVm+mtU= -github.com/denis-tingaikin/go-header v0.4.3/go.mod h1:0wOCWuN71D5qIgE2nz9KrKmuYBAC2Mra5RassOIQ2/c= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/drewolson/testflight v1.0.0 h1:jgA0pHcFIPnXoBmyFzrdoR2ka4UvReMDsjYc7Jcvl80= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= @@ -755,32 +682,20 @@ github.com/envoyproxy/protoc-gen-validate v0.6.7/go.mod h1:dyJXwwfPK2VSqiB9Klm1J github.com/envoyproxy/protoc-gen-validate v0.9.1/go.mod h1:OKNgG7TCp5pF4d6XftA0++PMirau2/yoOwVac3AbF2w= github.com/envoyproxy/protoc-gen-validate v0.10.0/go.mod h1:DRjgyB0I43LtJapqN6NiRwroiAU2PaFuvk/vjgh61ss= github.com/envoyproxy/protoc-gen-validate v0.10.1/go.mod h1:DRjgyB0I43LtJapqN6NiRwroiAU2PaFuvk/vjgh61ss= -github.com/esimonov/ifshort v1.0.4 h1:6SID4yGWfRae/M7hkVDVVyppy8q/v9OuxNdmjLQStBA= -github.com/esimonov/ifshort v1.0.4/go.mod h1:Pe8zjlRrJ80+q2CxHLfEOfTwxCZ4O+MuhcHcfgNWTk0= -github.com/ettle/strcase v0.1.1 h1:htFueZyVeE1XNnMEfbqp5r67qAN/4r6ya1ysq8Q+Zcw= -github.com/ettle/strcase v0.1.1/go.mod h1:hzDLsPC7/lwKyBOywSHEP89nt2pDgdy+No1NBA9o9VY= github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a h1:yDWHCSQ40h88yih2JAcL6Ls/kVkSE8GFACTGVnMPruw= github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a/go.mod h1:7Ga40egUymuWXxAe151lTNnCv97MddSOVsjpPPkityA= +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= -github.com/fatih/structtag v1.2.0 h1:/OdNE99OxoI/PqaW/SuSK9uxxT3f/tcSZgon/ssNSx4= -github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= -github.com/firefart/nonamedreturns v1.0.4 h1:abzI1p7mAEPYuR4A+VLKn4eNDOycjYo2phmY9sfv40Y= -github.com/firefart/nonamedreturns v1.0.4/go.mod h1:TDhe/tjI1BXo48CmYbUduTV7BdIga8MAO/xbKdcVsGI= github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/fogleman/gg v1.3.0/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= -github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI= github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= -github.com/fzipp/gocyclo v0.6.0 h1:lsblElZG7d3ALtGMx9fmxeTKZaLLpU8mET09yN4BBLo= -github.com/fzipp/gocyclo v0.6.0/go.mod h1:rXPyn8fnlpa0R2csP/31uerbiVBugk5whMdlyaLkLoA= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/go-chi/chi/v5 v5.0.8 h1:lD+NLqFcAi1ovnVZpsnObHGW4xb4J8lNmoYVfECH1Y0= -github.com/go-chi/chi/v5 v5.0.8/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8= -github.com/go-critic/go-critic v0.8.1 h1:16omCF1gN3gTzt4j4J6fKI/HnRojhEp+Eks6EuKw3vw= -github.com/go-critic/go-critic v0.8.1/go.mod h1:kpzXl09SIJX1cr9TB/g/sAG+eFEl7ZS9f9cqvZtyNl0= +github.com/go-chi/chi/v5 v5.0.10 h1:rLz5avzKpjqxrYwXNfmjkrYYXOyLJd37pz53UFHC6vk= +github.com/go-chi/chi/v5 v5.0.10/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8= github.com/go-fonts/dejavu v0.1.0/go.mod h1:4Wt4I4OU2Nq9asgDCteaAaWZOV24E+0/Pwo0gppep4g= github.com/go-fonts/latin-modern v0.2.0/go.mod h1:rQVLdDMK+mK1xscDwsqM5J8U2jrRa3T0ecnM9pNujks= github.com/go-fonts/liberation v0.1.1/go.mod h1:K6qoJYypsmfVjWg8KOVDQhLc8UDgIK2HYqyqAO9z7GY= @@ -789,14 +704,8 @@ github.com/go-fonts/stix v0.1.0/go.mod h1:w/c1f0ldAUlJmLBvlbkvVXLAD+tAMqobIIQpmn github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= github.com/go-latex/latex v0.0.0-20210118124228-b3d85cf34e07/go.mod h1:CO1AlKB2CSIqUrmQPqA0gdRIlnLEY0gK5JGjh37zN5U= github.com/go-latex/latex v0.0.0-20210823091927-c0d11ff05a81/go.mod h1:SX0U8uGpxhq9o2S/CELCSUxEWWAuoCUcVCQWv7G2OCk= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= @@ -805,35 +714,10 @@ github.com/go-pdf/fpdf v0.6.0/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhO github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-sql-driver/mysql v1.7.1 h1:lUIinVbN1DY0xBg0eMOzmmtGoHwWBbvnWubQUrtU8EI= github.com/go-sql-driver/mysql v1.7.1/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI= -github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= -github.com/go-toolsmith/astcast v1.1.0 h1:+JN9xZV1A+Re+95pgnMgDboWNVnIMMQXwfBwLRPgSC8= -github.com/go-toolsmith/astcast v1.1.0/go.mod h1:qdcuFWeGGS2xX5bLM/c3U9lewg7+Zu4mr+xPwZIB4ZU= -github.com/go-toolsmith/astcopy v1.1.0 h1:YGwBN0WM+ekI/6SS6+52zLDEf8Yvp3n2seZITCUBt5s= -github.com/go-toolsmith/astcopy v1.1.0/go.mod h1:hXM6gan18VA1T/daUEHCFcYiW8Ai1tIwIzHY6srfEAw= -github.com/go-toolsmith/astequal v1.0.3/go.mod h1:9Ai4UglvtR+4up+bAD4+hCj7iTo4m/OXVTSLnCyTAx4= -github.com/go-toolsmith/astequal v1.1.0 h1:kHKm1AWqClYn15R0K1KKE4RG614D46n+nqUQ06E1dTw= -github.com/go-toolsmith/astequal v1.1.0/go.mod h1:sedf7VIdCL22LD8qIvv7Nn9MuWJruQA/ysswh64lffQ= -github.com/go-toolsmith/astfmt v1.1.0 h1:iJVPDPp6/7AaeLJEruMsBUlOYCmvg0MoCfJprsOmcco= -github.com/go-toolsmith/astfmt v1.1.0/go.mod h1:OrcLlRwu0CuiIBp/8b5PYF9ktGVZUjlNMV634mhwuQ4= -github.com/go-toolsmith/astp v1.1.0 h1:dXPuCl6u2llURjdPLLDxJeZInAeZ0/eZwFJmqZMnpQA= -github.com/go-toolsmith/astp v1.1.0/go.mod h1:0T1xFGz9hicKs8Z5MfAqSUitoUYS30pDMsRVIDHs8CA= -github.com/go-toolsmith/pkgload v1.2.2 h1:0CtmHq/02QhxcF7E9N5LIFcYFsMR5rdovfqTtRKkgIk= -github.com/go-toolsmith/strparse v1.0.0/go.mod h1:YI2nUKP9YGZnL/L1/DLFBfixrcjslWct4wyljWhSRy8= -github.com/go-toolsmith/strparse v1.1.0 h1:GAioeZUK9TGxnLS+qfdqNbA4z0SSm5zVNtCQiyP2Bvw= -github.com/go-toolsmith/strparse v1.1.0/go.mod h1:7ksGy58fsaQkGQlY8WVoBFNyEPMGuJin1rfoPS4lBSQ= -github.com/go-toolsmith/typep v1.1.0 h1:fIRYDyF+JywLfqzyhdiHzRop/GQDxxNhLGQ6gFUNHus= -github.com/go-toolsmith/typep v1.1.0/go.mod h1:fVIw+7zjdsMxDA3ITWnH1yOiw1rnTQKCsF/sk2H/qig= -github.com/go-xmlfmt/xmlfmt v1.1.2 h1:Nea7b4icn8s57fTx1M5AI4qQT5HEM3rVUO8MuE6g80U= -github.com/go-xmlfmt/xmlfmt v1.1.2/go.mod h1:aUCEOzzezBEjDBbFBoSiya/gduyIiWYRP6CnSFIV8AM= -github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= -github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= github.com/goccy/go-json v0.9.11/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= -github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= -github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= @@ -872,26 +756,6 @@ github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2 h1:23T5iq8rbUYlhpt5DB4XJkc6BU31uODLD1o1gKvZmD0= -github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2/go.mod h1:k9Qvh+8juN+UKMCS/3jFtGICgW8O96FVaZsaxdzDkR4= -github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a h1:w8hkcTqaFpzKqonE9uMCefW1WDie15eSP/4MssdenaM= -github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a/go.mod h1:ryS0uhF+x9jgbj/N71xsEqODy9BN81/GonCZiOzirOk= -github.com/golangci/go-misc v0.0.0-20220329215616-d24fe342adfe h1:6RGUuS7EGotKx6J5HIP8ZtyMdiDscjMLfRBSPuzVVeo= -github.com/golangci/go-misc v0.0.0-20220329215616-d24fe342adfe/go.mod h1:gjqyPShc/m8pEMpk0a3SeagVb0kaqvhscv+i9jI5ZhQ= -github.com/golangci/gofmt v0.0.0-20220901101216-f2edd75033f2 h1:amWTbTGqOZ71ruzrdA+Nx5WA3tV1N0goTspwmKCQvBY= -github.com/golangci/gofmt v0.0.0-20220901101216-f2edd75033f2/go.mod h1:9wOXstvyDRshQ9LggQuzBCGysxs3b6Uo/1MvYCR2NMs= -github.com/golangci/golangci-lint v1.53.3 h1:CUcRafczT4t1F+mvdkUm6KuOpxUZTl0yWN/rSU6sSMo= -github.com/golangci/golangci-lint v1.53.3/go.mod h1:W4Gg3ONq6p3Jl+0s/h9Gr0j7yEgHJWWZO2bHl2tBUXM= -github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0 h1:MfyDlzVjl1hoaPzPD4Gpb/QgoRfSBR0jdhwGyAWwMSA= -github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0/go.mod h1:66R6K6P6VWk9I95jvqGxkqJxVWGFy9XlDwLwVz1RCFg= -github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca h1:kNY3/svz5T29MYHubXix4aDDuE3RWHkPvopM/EDv/MA= -github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca/go.mod h1:tvlJhZqDe4LMs4ZHD0oMUlt9G2LWuDGoisJTBzLMV9o= -github.com/golangci/misspell v0.4.0 h1:KtVB/hTK4bbL/S6bs64rYyk8adjmh1BygbBiaAiX+a0= -github.com/golangci/misspell v0.4.0/go.mod h1:W6O/bwV6lGDxUCChm2ykw9NQdd5bYd1Xkjo88UcWyJc= -github.com/golangci/revgrep v0.0.0-20220804021717-745bb2f7c2e6 h1:DIPQnGy2Gv2FSA4B/hh8Q7xx3B7AIDk3DAMeHclH1vQ= -github.com/golangci/revgrep v0.0.0-20220804021717-745bb2f7c2e6/go.mod h1:0AKcRCkMoKvUvlf89F6O7H2LYdhr1zBh736mBItOdRs= -github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4 h1:zwtduBRr5SSWhqsYNgcuWO2kFlpdOZbP0+yRjmvPGys= -github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4/go.mod h1:Izgrg8RkN3rCIMLGE9CyYmU9pY2Jer6DgANEnZ/L/cQ= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/flatbuffers v2.0.8+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= @@ -911,7 +775,6 @@ github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8 github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= @@ -937,7 +800,6 @@ github.com/google/pprof v0.0.0-20230228050547-1710fef4ab10 h1:CqYfpuYIjnlNxM3msd github.com/google/pprof v0.0.0-20230228050547-1710fef4ab10/go.mod h1:79YE0hCXdHag9sBkw2o+N/YnZtTkXi0UT9Nnixa5eYk= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -959,103 +821,48 @@ github.com/googleapis/gax-go/v2 v2.7.0/go.mod h1:TEop28CZZQ2y+c0VxMUmu1lV+fQx57Q github.com/googleapis/gax-go/v2 v2.7.1/go.mod h1:4orTrqY6hXxxaUL4LHIPl6lGo8vAE38/qKbhSAKP6QI= github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= -github.com/gordonklaus/ineffassign v0.0.0-20230610083614-0e73809eb601 h1:mrEEilTAUmaAORhssPPkxj84TsHrPMLBGW2Z4SoTxm8= -github.com/gordonklaus/ineffassign v0.0.0-20230610083614-0e73809eb601/go.mod h1:Qcp2HIAYhR7mNUVSIxZww3Guk4it82ghYcEXIAk+QT0= github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gostaticanalysis/analysisutil v0.7.1 h1:ZMCjoue3DtDWQ5WyU16YbjbQEQ3VuzwxALrpYd+HeKk= -github.com/gostaticanalysis/analysisutil v0.7.1/go.mod h1:v21E3hY37WKMGSnbsw2S/ojApNWb6C1//mXO48CXbVc= -github.com/gostaticanalysis/comment v1.4.1/go.mod h1:ih6ZxzTHLdadaiSnF5WY3dxUoXfXAlTaRzuaNDlSado= -github.com/gostaticanalysis/comment v1.4.2 h1:hlnx5+S2fY9Zo9ePo4AhgYsYHbM2+eAv8m/s1JiCd6Q= -github.com/gostaticanalysis/comment v1.4.2/go.mod h1:KLUTGDv6HOCotCH8h2erHKmpci2ZoR8VPu34YA2uzdM= -github.com/gostaticanalysis/forcetypeassert v0.1.0 h1:6eUflI3DiGusXGK6X7cCcIgVCpZ2CiZ1Q7jl6ZxNV70= -github.com/gostaticanalysis/forcetypeassert v0.1.0/go.mod h1:qZEedyP/sY1lTGV1uJ3VhWZ2mqag3IkWsDHVbplHXak= -github.com/gostaticanalysis/nilerr v0.1.1 h1:ThE+hJP0fEp4zWLkWHWcRyI2Od0p7DlgYG3Uqrmrcpk= -github.com/gostaticanalysis/nilerr v0.1.1/go.mod h1:wZYb6YI5YAxxq0i1+VJbY0s2YONW0HU0GPE3+5PWN4A= -github.com/gostaticanalysis/testutil v0.3.1-0.20210208050101-bfb5c8eec0e4/go.mod h1:D+FIZ+7OahH3ePw/izIEeH5I06eKs1IKI4Xr64/Am3M= -github.com/gostaticanalysis/testutil v0.4.0 h1:nhdCmubdmDF6VEatUNjgUZBJKWRqugoISdUv3PPQgHY= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0/go.mod h1:hgWBS7lorOAVIJEQMi4ZsPv9hVvWI6+ch50m39Pf2Ks= github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3/go.mod h1:o//XUCC/F+yRGJoPO/VU0GSB0f8Nhgmxx0VIRUvaC0w= github.com/grpc-ecosystem/grpc-gateway/v2 v2.15.0 h1:1JYBfzqrWPcCclBwxFCPAou9n+q86mfnu7NAeHfte7A= github.com/grpc-ecosystem/grpc-gateway/v2 v2.15.0/go.mod h1:YDZoGHuwE+ov0c8smSH49WLF3F2LaWnYYuDVd+EWrc0= -github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= -github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= github.com/hashicorp/go-hclog v1.2.0 h1:La19f8d7WIlm4ogzNHB0JGqs5AUDAZ2UfCY4sJXcJdM= -github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= -github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= +github.com/hashicorp/go-hclog v1.2.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-retryablehttp v0.7.4 h1:ZQgVdpTdAL7WpMIwLzCfbalOcSUdkDZnpUv3/+BxzFA= github.com/hashicorp/go-retryablehttp v0.7.4/go.mod h1:Jy/gPYAdjqffZ/yFGCFV2doI5wjtH1ewM9u8iYVjtX8= -github.com/hashicorp/go-version v1.2.1/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= -github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= -github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= -github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= -github.com/howeyc/gopass v0.0.0-20170109162249-bf9dde6d0d2c h1:kQWxfPIHVLbgLzphqk3QUflDy9QdksZR4ygR807bpy0= -github.com/howeyc/gopass v0.0.0-20170109162249-bf9dde6d0d2c/go.mod h1:lADxMC39cJJqL93Duh1xhAs4I2Zs8mKS89XWXFGp9cs= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/huandu/xstrings v1.3.1/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= -github.com/huandu/xstrings v1.3.2/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= -github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= -github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= -github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM= github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg= github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a h1:bbPeKD0xmW/Y25WS6cokEszi5g+S0QxI/d45PkRi7Nk= github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM= -github.com/jackc/pgx/v5 v5.4.1 h1:oKfB/FhuVtit1bBM3zNRRsZ925ZkMN3HXL+LgLUM9lE= -github.com/jackc/pgx/v5 v5.4.1/go.mod h1:q6iHT8uDNXWiFNOlRqJzBTaSH3+2xCXkokxHZC5qWFY= -github.com/jackc/puddle/v2 v2.2.0 h1:RdcDk92EJBuBS55nQMMYFXTxwstHug4jkhT5pq8VxPk= -github.com/jackc/puddle/v2 v2.2.0/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4= -github.com/jgautheron/goconst v1.5.1 h1:HxVbL1MhydKs8R8n/HE5NPvzfaYmQJA3o879lE4+WcM= -github.com/jgautheron/goconst v1.5.1/go.mod h1:aAosetZ5zaeC/2EfMeRswtxUFBpe2Hr7HzkgX4fanO4= -github.com/jingyugao/rowserrcheck v1.1.1 h1:zibz55j/MJtLsjP1OF4bSdgXxwL1b+Vn7Tjzq7gFzUs= -github.com/jingyugao/rowserrcheck v1.1.1/go.mod h1:4yvlZSDb3IyDTUZJUmpZfm2Hwok+Dtp+nu2qOq+er9c= -github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af h1:KA9BjwUk7KlCh6S9EAGWBt1oExIUv9WyNCiRz5amv48= -github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af/go.mod h1:HEWGJkRDzjJY2sqdDwxccsGicWEf9BQOZsq2tV+xzM0= +github.com/jackc/pgx/v5 v5.4.3 h1:cxFyXhxlvAifxnkKKdlxv8XqUf59tDlYjnV5YYfsJJY= +github.com/jackc/pgx/v5 v5.4.3/go.mod h1:Ig06C2Vu0t5qXC60W8sqIthScaEnFvojjj9dSljmHRA= +github.com/jackc/puddle/v2 v2.2.1 h1:RhxXJtFG022u4ibrCSMSiu5aOq1i77R3OHKNJj77OAk= +github.com/jackc/puddle/v2 v2.2.1/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4= github.com/jmoiron/sqlx v1.3.5 h1:vFFPA71p1o5gAeqtEAwLU4dnX2napprKtHr7PYIcN3g= github.com/jmoiron/sqlx v1.3.5/go.mod h1:nRVWtLre0KfCLJvgxzCsLVMogSvQ1zNJtpYr2Ccp0mQ= -github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= -github.com/julz/importas v0.1.0 h1:F78HnrsjY3cR7j0etXy5+TU1Zuy7Xt08X/1aJnH5xXY= -github.com/julz/importas v0.1.0/go.mod h1:oSFU2R4XK/P7kNBrnL/FEQlDGN1/6WoxXEjSSXO0DV0= github.com/jung-kurt/gofpdf v1.0.0/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= -github.com/kisielk/errcheck v1.6.3 h1:dEKh+GLHcWm2oN34nMvDzn1sqI0i0WxPvrgiJA5JuM8= -github.com/kisielk/errcheck v1.6.3/go.mod h1:nXw/i/MfnvRHqXa7XXmQMUB0oNFGuBrNI8d8NLy0LPw= -github.com/kisielk/gotool v1.0.0 h1:AV2c/EiW3KqPNT9ZKl07ehoAGi4C5/01Cfbblndcapg= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/kkHAIKE/contextcheck v1.1.4 h1:B6zAaLhOEEcjvUgIYEqystmnFk1Oemn8bvJhbt0GMb8= -github.com/kkHAIKE/contextcheck v1.1.4/go.mod h1:1+i/gWqokIa+dm31mqGLZhZJ7Uh44DJGZVmr6QRBNJg= github.com/klauspost/asmfmt v1.3.2/go.mod h1:AG8TuvYojzulgDAMCnYn50l/5QV3Bs/tp6j0HLHbNSE= github.com/klauspost/compress v1.15.9/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= @@ -1064,91 +871,35 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/kulti/thelper v0.6.3 h1:ElhKf+AlItIu+xGnI990no4cE2+XaSu1ULymV2Yulxs= -github.com/kulti/thelper v0.6.3/go.mod h1:DsqKShOvP40epevkFrvIwkCMNYxMeTNjdWL4dqWHZ6I= -github.com/kunwardeep/paralleltest v1.0.7 h1:2uCk94js0+nVNQoHZNLBkAR1DQJrVzw6T0RMzJn55dQ= -github.com/kunwardeep/paralleltest v1.0.7/go.mod h1:2C7s65hONVqY7Q5Efj5aLzRCNLjw2h4eMc9EcypGjcY= -github.com/kyoh86/exportloopref v0.1.11 h1:1Z0bcmTypkL3Q4k+IDHMWTcnCliEZcaPiIe0/ymEyhQ= -github.com/kyoh86/exportloopref v0.1.11/go.mod h1:qkV4UF1zGl6EkF1ox8L5t9SwyeBAZ3qLMd6up458uqA= -github.com/ldez/gomoddirectives v0.2.3 h1:y7MBaisZVDYmKvt9/l1mjNCiSA1BVn34U0ObUcJwlhA= -github.com/ldez/gomoddirectives v0.2.3/go.mod h1:cpgBogWITnCfRq2qGoDkKMEVSaarhdBr6g8G04uz6d0= -github.com/ldez/tagliatelle v0.5.0 h1:epgfuYt9v0CG3fms0pEgIMNPuFf/LpPIfjk4kyqSioo= -github.com/ldez/tagliatelle v0.5.0/go.mod h1:rj1HmWiL1MiKQuOONhd09iySTEkUuE/8+5jtPYz9xa4= -github.com/leonklingele/grouper v1.1.1 h1:suWXRU57D4/Enn6pXR0QVqqWWrnJ9Osrz+5rjt8ivzU= -github.com/leonklingele/grouper v1.1.1/go.mod h1:uk3I3uDfi9B6PeUjsCKi6ndcf63Uy7snXgR4yDYQVDY= github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= -github.com/lufeee/execinquery v1.2.1 h1:hf0Ems4SHcUGBxpGN7Jz78z1ppVkP/837ZlETPCEtOM= -github.com/lufeee/execinquery v1.2.1/go.mod h1:EC7DrEKView09ocscGHC+apXMIaorh4xqSxS/dy8SbM= +github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lyft/protoc-gen-star v0.6.0/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA= github.com/lyft/protoc-gen-star v0.6.1/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA= github.com/lyft/protoc-gen-star/v2 v2.0.1/go.mod h1:RcCdONR2ScXaYnQC5tUzxzlpA3WVYF7/opLeUgcQs/o= -github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo= -github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= -github.com/maratori/testableexamples v1.0.0 h1:dU5alXRrD8WKSjOUnmJZuzdxWOEQ57+7s93SLMxb2vI= -github.com/maratori/testableexamples v1.0.0/go.mod h1:4rhjL1n20TUTT4vdh3RDqSizKLyXp7K2u6HgraZCGzE= -github.com/maratori/testpackage v1.1.1 h1:S58XVV5AD7HADMmD0fNnziNHqKvSdDuEKdPD1rNTU04= -github.com/maratori/testpackage v1.1.1/go.mod h1:s4gRK/ym6AMrqpOa/kEbQTV4Q4jb7WeLZzVhVVVOQMc= -github.com/matoous/godox v0.0.0-20230222163458-006bad1f9d26 h1:gWg6ZQ4JhDfJPqlo2srm/LN17lpybq15AryXIRcWYLE= -github.com/matoous/godox v0.0.0-20230222163458-006bad1f9d26/go.mod h1:1BELzlh859Sh1c6+90blK8lbYy0kwQf1bYlBhBysy1s= -github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE= -github.com/matryer/is v1.4.0/go.mod h1:8I/i5uYgLzgsgEloJE1U6xx5HkBQpAZvepWuujKwMRU= +github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= +github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= -github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-sqlite3 v1.14.6/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= github.com/mattn/go-sqlite3 v1.14.14 h1:qZgc/Rwetq+MtyE18WhzjokPD93dNqLGNT3QJuLvBGw= github.com/mattn/go-sqlite3 v1.14.14/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= -github.com/maxbrunsfeld/counterfeiter/v6 v6.6.2 h1:CEy7VRV/Vbm7YLuZo3pGKa5GlPX4zzric6dEubIJTx0= -github.com/maxbrunsfeld/counterfeiter/v6 v6.6.2/go.mod h1:otjOyjeqm3LALYcmX2AQIGH0VlojDoSd8aGOzsHAnBc= -github.com/mbilski/exhaustivestruct v1.2.0 h1:wCBmUnSYufAHO6J4AVWY6ff+oxWxsVFrwgOdMUQePUo= -github.com/mbilski/exhaustivestruct v1.2.0/go.mod h1:OeTBVxQWoEmB2J2JCHmXWPJ0aksxSUOUy+nvtVEfzXc= -github.com/mgechev/revive v1.3.2 h1:Wb8NQKBaALBJ3xrrj4zpwJwqwNA6nDpyJSEQWcCka6U= -github.com/mgechev/revive v1.3.2/go.mod h1:UCLtc7o5vg5aXCwdUTU1kEBQ1v+YXPAkYDIDXbrs5I0= +github.com/maxbrunsfeld/counterfeiter/v6 v6.7.0 h1:z0CfPybq3CxaJvrrpf7Gme1psZTqHhJxf83q6apkSpI= +github.com/maxbrunsfeld/counterfeiter/v6 v6.7.0/go.mod h1:RVP6/F85JyxTrbJxWIdKU2vlSvK48iCMnMXRkSz7xtg= github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8/go.mod h1:mC1jAcsrzbxHt8iiaC+zU4b1ylILSosueou12R++wfY= github.com/minio/c2goasm v0.0.0-20190812172519-36a3d3bbc4f3/go.mod h1:RagcQ7I8IeTMnF8JTXieKnO4Z6JCsikNEzj0DwauVzE= -github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= -github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= -github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= -github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= -github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= -github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/moricho/tparallel v0.3.1 h1:fQKD4U1wRMAYNngDonW5XupoB/ZGJHdpzrWqgyg9krA= -github.com/moricho/tparallel v0.3.1/go.mod h1:leENX2cUv7Sv2qDgdi0D0fCftN8fRC67Bcn8pqzeYNI= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/nakabonne/nestif v0.3.1 h1:wm28nZjhQY5HyYPx+weN3Q65k6ilSBxDb8v5S81B81U= -github.com/nakabonne/nestif v0.3.1/go.mod h1:9EtoZochLn5iUprVDmDjqGKPofoUEBL8U4Ngq6aY7OE= -github.com/nbutton23/zxcvbn-go v0.0.0-20210217022336-fa2cb2858354 h1:4kuARK6Y6FxaNu/BnU2OAaLF86eTVhP2hjTB6iMvItA= -github.com/nbutton23/zxcvbn-go v0.0.0-20210217022336-fa2cb2858354/go.mod h1:KSVJerMDfblTH7p5MZaTt+8zaT2iEk3AkVb9PQdZuE8= -github.com/nishanths/exhaustive v0.11.0 h1:T3I8nUGhl/Cwu5Z2hfc92l0e04D2GEW6e0l8pzda2l0= -github.com/nishanths/exhaustive v0.11.0/go.mod h1:RqwDsZ1xY0dNdqHho2z6X+bgzizwbLYOWnZbbl2wLB4= -github.com/nishanths/predeclared v0.2.2 h1:V2EPdZPliZymNAn79T8RkNApBjMmVKh5XRpLm/w98Vk= -github.com/nishanths/predeclared v0.2.2/go.mod h1:RROzoN6TnGQupbC+lqggsOlcgysk3LMK/HI84Mp280c= github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d h1:VhgPp6v9qf9Agr/56bj7Y/xa04UccTW04VP0Qed4vnQ= github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d/go.mod h1:YUTz3bUH2ZwIWBy3CJBeOBEugqcmXREj14T+iG/4k4U= -github.com/nunnatsa/ginkgolinter v0.12.1 h1:vwOqb5Nu05OikTXqhvLdHCGcx5uthIYIl0t79UVrERQ= -github.com/nunnatsa/ginkgolinter v0.12.1/go.mod h1:AK8Ab1PypVrcGUusuKD8RDcl2KgsIwvNaaxAlyHSzso= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= -github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= -github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= @@ -1166,8 +917,8 @@ github.com/onsi/ginkgo/v2 v2.9.0/go.mod h1:4xkjoL/tZv4SMWeww56BU5kAt19mVB47gTWxm github.com/onsi/ginkgo/v2 v2.9.1/go.mod h1:FEcmzVcCHl+4o9bQZVab+4dC9+j+91t2FHSzmGAPfuo= github.com/onsi/ginkgo/v2 v2.9.2/go.mod h1:WHcJJG2dIlcCqVfBAwUCrJxSPFb6v4azBwgxeMeDuts= github.com/onsi/ginkgo/v2 v2.9.4/go.mod h1:gCQYp2Q+kSoIj7ykSVb9nskRSsR6PUj4AiLywzIhbKM= -github.com/onsi/ginkgo/v2 v2.11.0 h1:WgqUCUt/lT6yXoQ8Wef0fsNn5cAuMK7+KT9UFRz2tcU= -github.com/onsi/ginkgo/v2 v2.11.0/go.mod h1:ZhrRA5XmEE3x3rhlzamx/JJvujdZoJ2uvgI7kR0iZvM= +github.com/onsi/ginkgo/v2 v2.12.1 h1:uHNEO1RP2SpuZApSkel9nEh1/Mu+hmQe7Q+Pepg5OYA= +github.com/onsi/ginkgo/v2 v2.12.1/go.mod h1:TE309ZR8s5FsKKpuB1YAQYBzCaAfUgatB/xlT/ETL/o= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= @@ -1182,24 +933,14 @@ github.com/onsi/gomega v1.27.1/go.mod h1:aHX5xOykVYzWOV4WqQy0sy8BQptgukenXpCXfad github.com/onsi/gomega v1.27.3/go.mod h1:5vG284IBtfDAmDyrK+eGyZmUgUlmi+Wngqo557cZ6Gw= github.com/onsi/gomega v1.27.4/go.mod h1:riYq/GJKh8hhoM01HN6Vmuy93AarCXCBGpvFDK3q3fQ= github.com/onsi/gomega v1.27.6/go.mod h1:PIQNjfQwkP3aQAH7lf7j87O/5FiNr+ZR8+ipb+qQlhg= -github.com/onsi/gomega v1.27.8 h1:gegWiwZjBsf2DgiSbf5hpokZ98JVDMcWkUiigk6/KXc= -github.com/onsi/gomega v1.27.8/go.mod h1:2J8vzI/s+2shY9XHRApDkdgPo1TKT7P2u6fXeJKFnNQ= +github.com/onsi/gomega v1.28.0 h1:i2rg/p9n/UqIDAMFUJ6qIUUMcsqOuUHgbpbu235Vr1c= +github.com/onsi/gomega v1.28.0/go.mod h1:A1H2JE76sI14WIP57LMKj7FVfCHx3g3BcZVjJG8bjX8= github.com/openzipkin/zipkin-go v0.4.1 h1:kNd/ST2yLLWhaWrkgchya40TJabe8Hioj9udfPcEO5A= github.com/openzipkin/zipkin-go v0.4.1/go.mod h1:qY0VqDSN1pOBN94dBc6w2GJlWLiovAyg7Qt6/I9HecM= -github.com/otiai10/copy v1.2.0 h1:HvG945u96iNadPoG2/Ja2+AUJeW5YuFQMixq9yirC+k= -github.com/otiai10/copy v1.2.0/go.mod h1:rrF5dJ5F0t/EWSYODDu4j9/vEeYHMkc8jt0zJChqQWw= -github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE= -github.com/otiai10/curr v1.0.0/go.mod h1:LskTG5wDwr8Rs+nNQ+1LlxRjAtTZZjtJW4rMXl6j4vs= -github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT91xUo= -github.com/otiai10/mint v1.3.1/go.mod h1:/yxELlJQ0ufhjUwhshSj+wFjZ78CnZ48/1wtmBH1OTc= github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaRUnok+kx1WdO15EQc= github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ= github.com/pborman/uuid v1.2.1 h1:+ZZIw58t/ozdjRaXh/3awHfmWRbzYxJoAdNJxe/3pvw= github.com/pborman/uuid v1.2.1/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= -github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= -github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= -github.com/pelletier/go-toml/v2 v2.0.5 h1:ipoSadvV8oGUjnUbMub59IDPPwfxF694nG/jwbMiyQg= -github.com/pelletier/go-toml/v2 v2.0.5/go.mod h1:OMHamSCAODeSsVrwwvcJOaoN0LIUIaFVNZzmWyNfXas= github.com/peterbourgon/g2s v0.0.0-20170223122336-d4e7ad98afea h1:sKwxy1H95npauwu8vtF95vG/syrL0p8fSZo/XlDg5gk= github.com/peterbourgon/g2s v0.0.0-20170223122336-d4e7ad98afea/go.mod h1:1VcHEd3ro4QMoHfiNl/j7Jkln9+KQuorp0PItHMJYNg= github.com/phpdave11/gofpdf v1.4.2/go.mod h1:zpO6xFn9yxo3YLyMvW8HcKWVdbNqgIfOOp2dXMnm1mY= @@ -1209,7 +950,6 @@ github.com/pierrec/lz4/v4 v4.1.15/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFu github.com/pivotal-cf/brokerapi/v10 v10.0.0 h1:cC2zdIF1jh1twD196xWpHjiX2JEbU+RMLH2jpmLDRT8= github.com/pivotal-cf/brokerapi/v10 v10.0.0/go.mod h1:LVexXnzj0Zj7lxIJXnDqc794/XHwEzkOPzAZdEaKM5M= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -1217,42 +957,17 @@ github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZ github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/polyfloyd/go-errorlint v1.4.2 h1:CU+O4181IxFDdPH6t/HT7IiDj1I7zxNi1RIUxYwn8d0= -github.com/polyfloyd/go-errorlint v1.4.2/go.mod h1:k6fU/+fQe38ednoZS51T7gSIGQW1y94d6TkSr35OzH8= -github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8= -github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lFEugiJ9HzIqaAx4LKc= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_golang v1.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= +github.com/prometheus/client_golang v1.17.0/go.mod h1:VeL+gMmOAxkS2IqfCq0ZmHSL+LjWfWDUmp1mBz9JgUY= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= -github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.42.0 h1:EKsfXEYo4JpWMHH5cg+KOUWeuJSov1Id8zGR8eeI1YM= -github.com/prometheus/common v0.42.0/go.mod h1:xBwqVerjNdUDjgODMpudtOMwlOwf2SaTr1yjz4b7Zbc= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+PymziUAg= -github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= -github.com/quasilyte/go-ruleguard v0.3.19 h1:tfMnabXle/HzOb5Xe9CUZYWXKfkS1KwRmZyPmD9nVcc= -github.com/quasilyte/go-ruleguard v0.3.19/go.mod h1:lHSn69Scl48I7Gt9cX3VrbsZYvYiBYszZOZW4A+oTEw= -github.com/quasilyte/gogrep v0.5.0 h1:eTKODPXbI8ffJMN+W2aE0+oL0z/nh8/5eNdiO34SOAo= -github.com/quasilyte/gogrep v0.5.0/go.mod h1:Cm9lpz9NZjEoL1tgZ2OgeUKPIxL1meE7eo60Z6Sk+Ng= -github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 h1:TCg2WBOl980XxGFEZSS6KlBGIV0diGdySzxATTWoqaU= -github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727/go.mod h1:rlzQ04UMyJXu/aOvhd8qT+hvDrFpiwqp8MRXDY9szc0= -github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 h1:M8mH9eK4OUR4lu7Gd+PU1fV2/qnDNfzT635KRSObncs= -github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567/go.mod h1:DWNGW8A4Y+GyBgPuaQJuWiy0XYftx4Xm/y5Jqk9I6VQ= +github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16 h1:v7DLqVdK4VrYkVD5diGdl4sxJurKJEMnODWRJlxV9oM= +github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= +github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= +github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= +github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= +github.com/prometheus/procfs v0.11.1/go.mod h1:eesXgaPo1q7lBpVMoMy0ZOFTth9hBn4W/y0/p/ScXhY= github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= @@ -1261,78 +976,19 @@ github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/f github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rubyist/circuitbreaker v2.2.1+incompatible h1:KUKd/pV8Geg77+8LNDwdow6rVCAYOp8+kHUyFvL6Mhk= github.com/rubyist/circuitbreaker v2.2.1+incompatible/go.mod h1:Ycs3JgJADPuzJDwffe12k6BZT8hxVi6lFK+gWYJLN4A= -github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= -github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ruudk/golang-pdf417 v0.0.0-20181029194003-1af4ab5afa58/go.mod h1:6lfFZQK844Gfx8o5WFuvpxWRwnSoipWe/p622j1v06w= github.com/ruudk/golang-pdf417 v0.0.0-20201230142125-a7e3863a1245/go.mod h1:pQAZKsJ8yyVxGRWYNEm9oFB8ieLgKFnamEyDmSA0BRk= -github.com/ryancurrah/gomodguard v1.3.0 h1:q15RT/pd6UggBXVBuLps8BXRvl5GPBcwVA7BJHMLuTw= -github.com/ryancurrah/gomodguard v1.3.0/go.mod h1:ggBxb3luypPEzqVtq33ee7YSN35V28XeGnid8dnni50= -github.com/ryanrolds/sqlclosecheck v0.4.0 h1:i8SX60Rppc1wRuyQjMciLqIzV3xnoHB7/tXbr6RGYNI= -github.com/ryanrolds/sqlclosecheck v0.4.0/go.mod h1:TBRRjzL31JONc9i4XMinicuo+s+E8yKZ5FN8X3G6CKQ= -github.com/sanposhiho/wastedassign/v2 v2.0.7 h1:J+6nrY4VW+gC9xFzUc+XjPD3g3wF3je/NsJFwFK7Uxc= -github.com/sanposhiho/wastedassign/v2 v2.0.7/go.mod h1:KyZ0MWTwxxBmfwn33zh3k1dmsbF2ud9pAAGfoLfjhtI= -github.com/sashamelentyev/interfacebloat v1.1.0 h1:xdRdJp0irL086OyW1H/RTZTr1h/tMEOsumirXcOJqAw= -github.com/sashamelentyev/interfacebloat v1.1.0/go.mod h1:+Y9yU5YdTkrNvoX0xHc84dxiN1iBi9+G8zZIhPVoNjQ= -github.com/sashamelentyev/usestdlibvars v1.23.0 h1:01h+/2Kd+NblNItNeux0veSL5cBF1jbEOPrEhDzGYq0= -github.com/sashamelentyev/usestdlibvars v1.23.0/go.mod h1:YPwr/Y1LATzHI93CqoPUN/2BzGQ/6N/cl/KwgR0B/aU= github.com/sclevine/spec v1.4.0 h1:z/Q9idDcay5m5irkZ28M7PtQM4aOISzOpj4bUPkDee8= -github.com/securego/gosec/v2 v2.16.0 h1:Pi0JKoasQQ3NnoRao/ww/N/XdynIB9NRYYZT5CyOs5U= -github.com/securego/gosec/v2 v2.16.0/go.mod h1:xvLcVZqUfo4aAQu56TNv7/Ltz6emAOQAEsrZrt7uGlI= -github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c h1:W65qqJCIOVP4jpqPQ0YvHYKwcMEMVWIzWC5iNQQfBTU= -github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c/go.mod h1:/PevMnwAxekIXwN8qQyfc5gl2NlkB3CQlkizAbOkeBs= -github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= -github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk= -github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ= -github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= -github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= -github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= -github.com/sivchari/containedctx v1.0.3 h1:x+etemjbsh2fB5ewm5FeLNi5bUjK0V8n0RB+Wwfd0XE= -github.com/sivchari/containedctx v1.0.3/go.mod h1:c1RDvCbnJLtH4lLcYD/GqwiBSSf4F5Qk0xld2rBqzJ4= -github.com/sivchari/nosnakecase v1.7.0 h1:7QkpWIRMe8x25gckkFd2A5Pi6Ymo0qgr4JrhGt95do8= -github.com/sivchari/nosnakecase v1.7.0/go.mod h1:CwDzrzPea40/GB6uynrNLiorAlgFRvRbFSgJx2Gs+QY= -github.com/sivchari/tenv v1.7.1 h1:PSpuD4bu6fSmtWMxSGWcvqUUgIn7k3yOJhOIzVWn8Ak= -github.com/sivchari/tenv v1.7.1/go.mod h1:64yStXKSOxDfX47NlhVwND4dHwfZDdbp2Lyl018Icvg= -github.com/smallstep/assert v0.0.0-20200723003110-82e2b9b3b262 h1:unQFBIznI+VYD1/1fApl1A+9VcBk+9dcqGfnePY87LY= -github.com/smallstep/assert v0.0.0-20200723003110-82e2b9b3b262/go.mod h1:MyOHs9Po2fbM1LHej6sBUT8ozbxmMOFG+E+rx/GSGuc= -github.com/sonatard/noctx v0.0.2 h1:L7Dz4De2zDQhW8S0t+KUjY0MAQJd6SgVwhzNIc4ok00= -github.com/sonatard/noctx v0.0.2/go.mod h1:kzFz+CzWSjQ2OzIm46uJZoXuBpa2+0y3T36U18dWqIo= -github.com/sourcegraph/go-diff v0.7.0 h1:9uLlrd5T46OXs5qpp8L/MTltk0zikUGi0sNNyCpA8G0= -github.com/sourcegraph/go-diff v0.7.0/go.mod h1:iBszgVvyxdc8SFZ7gm69go2KDdt3ag071iBaWPF6cjs= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4= github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= -github.com/spf13/afero v1.9.2 h1:j49Hj62F0n+DaZ1dDCvhABaPNSGNkt32oRFxI33IEMw= github.com/spf13/afero v1.9.2/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= -github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.4.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= -github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= -github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= -github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= -github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= -github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= -github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= -github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.13.0 h1:BWSJ/M+f+3nmdz9bxB+bWX28kkALN2ok11D0rSo8EJU= -github.com/spf13/viper v1.13.0/go.mod h1:Icm2xNL3/8uyh/wFuB1jI7TiTNKp8632Nwegu+zgdYw= -github.com/square/certstrap v1.3.0 h1:N9P0ZRA+DjT8pq5fGDj0z3FjafRKnBDypP0QHpMlaAk= -github.com/square/certstrap v1.3.0/go.mod h1:wGZo9eE1B7WX2GKBn0htJ+B3OuRl2UsdCFySNooy9hU= -github.com/ssgreg/nlreturn/v2 v2.2.1 h1:X4XDI7jstt3ySqGU86YGAURbxw3oTDPK9sPEi6YEwQ0= -github.com/ssgreg/nlreturn/v2 v2.2.1/go.mod h1:E/iiPB78hV7Szg2YfRgyIrk1AD6JVMTRkkxBiELzh2I= -github.com/stbenjam/no-sprintf-host-port v0.1.1 h1:tYugd/yrm1O0dV+ThCbaKZh195Dfm07ysF0U6JQXczc= -github.com/stbenjam/no-sprintf-host-port v0.1.1/go.mod h1:TLhvtIvONRzdmkFiio4O8LHsN9N74I+PhRquPsxpL0I= +github.com/square/certstrap v1.2.0 h1:ecgyABrbFLr8jSbOC6oTBmBek0t/HqtgrMUZCPuyfdw= github.com/steinfletcher/apitest v1.5.15 h1:AAdTN0yMbf0VMH/PMt9uB2I7jljepO6i+5uhm1PjH3c= github.com/steinfletcher/apitest v1.5.15/go.mod h1:mF+KnYaIkuHM0C4JgGzkIIOJAEjo+EA5tTjJ+bHXnQc= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= -github.com/stretchr/testify v1.1.4/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= @@ -1342,54 +998,17 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/subosito/gotenv v1.4.1 h1:jyEFiXpy21Wm81FBN71l9VoMMV8H8jG+qIK3GCpY6Qs= -github.com/subosito/gotenv v1.4.1/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= -github.com/t-yuki/gocover-cobertura v0.0.0-20180217150009-aaee18c8195c h1:+aPplBwWcHBo6q9xrfWdMrT9o4kltkmmvpemgIjep/8= -github.com/t-yuki/gocover-cobertura v0.0.0-20180217150009-aaee18c8195c/go.mod h1:SbErYREK7xXdsRiigaQiQkI9McGRzYMvlKYaP3Nimdk= -github.com/tdakkota/asciicheck v0.2.0 h1:o8jvnUANo0qXtnslk2d3nMKTFNlOnJjRrNcj0j9qkHM= -github.com/tdakkota/asciicheck v0.2.0/go.mod h1:Qb7Y9EgjCLJGup51gDHFzbI08/gbGhL/UVhYIPWG2rg= github.com/tedsuo/ifrit v0.0.0-20230330192023-5cba443a66c4/go.mod h1:eyZnKCc955uh98WQvzOm0dgAeLnf2O0Rz0LPoC5ze+0= github.com/tedsuo/ifrit v0.0.0-20230516164442-7862c310ad26 h1:mWCRvpoEMVlslxEvvptKgIUb35va9yj9Oq5wGw/er5I= github.com/tedsuo/ifrit v0.0.0-20230516164442-7862c310ad26/go.mod h1:0uD3VMXkZ7Bw0ojGCwDzebBBzPBXtzEZeXai+56BLX4= -github.com/tenntenn/modver v1.0.1 h1:2klLppGhDgzJrScMpkj9Ujy3rXPUspSjAcev9tSEBgA= -github.com/tenntenn/modver v1.0.1/go.mod h1:bePIyQPb7UeioSRkw3Q0XeMhYZSMx9B8ePqg6SAMGH0= -github.com/tenntenn/text/transform v0.0.0-20200319021203-7eef512accb3 h1:f+jULpRQGxTSkNYKJ51yaw6ChIqO+Je8UqsTKN/cDag= -github.com/tenntenn/text/transform v0.0.0-20200319021203-7eef512accb3/go.mod h1:ON8b8w4BN/kE1EOhwT0o+d62W65a6aPw1nouo9LMgyY= -github.com/tetafro/godot v1.4.11 h1:BVoBIqAf/2QdbFmSwAWnaIqDivZdOV0ZRwEm6jivLKw= -github.com/tetafro/godot v1.4.11/go.mod h1:LR3CJpxDVGlYOWn3ZZg1PgNZdTUvzsZWu8xaEohUpn8= -github.com/timakin/bodyclose v0.0.0-20230421092635-574207250966 h1:quvGphlmUVU+nhpFa4gg4yJyTRJ13reZMDHrKwYw53M= -github.com/timakin/bodyclose v0.0.0-20230421092635-574207250966/go.mod h1:27bSVNWSBOHm+qRp1T9qzaIpsWEP6TbUnei/43HK+PQ= -github.com/timonwong/loggercheck v0.9.4 h1:HKKhqrjcVj8sxL7K77beXh0adEm6DLjV/QOGeMXEVi4= -github.com/timonwong/loggercheck v0.9.4/go.mod h1:caz4zlPcgvpEkXgVnAJGowHAMW2NwHaNlpS8xDbVhTg= -github.com/tomarrell/wrapcheck/v2 v2.8.1 h1:HxSqDSN0sAt0yJYsrcYVoEeyM4aI9yAm3KQpIXDJRhQ= -github.com/tomarrell/wrapcheck/v2 v2.8.1/go.mod h1:/n2Q3NZ4XFT50ho6Hbxg+RV1uyo2Uow/Vdm9NQcl5SE= -github.com/tommy-muehle/go-mnd/v2 v2.5.1 h1:NowYhSdyE/1zwK9QCLeRb6USWdoif80Ie+v+yU8u1Zw= -github.com/tommy-muehle/go-mnd/v2 v2.5.1/go.mod h1:WsUAkMJMYww6l/ufffCD3m+P7LEvr8TnZn9lwVDlgzw= -github.com/ultraware/funlen v0.0.3 h1:5ylVWm8wsNwH5aWo9438pwvsK0QiqVuUrt9bn7S/iLA= -github.com/ultraware/funlen v0.0.3/go.mod h1:Dp4UiAus7Wdb9KUZsYWZEWiRzGuM2kXM1lPbfaF6xhA= -github.com/ultraware/whitespace v0.0.5 h1:hh+/cpIcopyMYbZNVov9iSxvJU3OYQg78Sfaqzi/CzI= -github.com/ultraware/whitespace v0.0.5/go.mod h1:aVMh/gQve5Maj9hQ/hg+F75lr/X5A89uZnzAmWSineA= -github.com/urfave/cli v1.22.9 h1:cv3/KhXGBGjEXLC4bH0sLuJ9BewaAbpk5oyMOveu4pw= -github.com/urfave/cli v1.22.9/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/uudashr/gocognit v1.0.6 h1:2Cgi6MweCsdB6kpcVQp7EW4U23iBFQWfTXiWlyp842Y= -github.com/uudashr/gocognit v1.0.6/go.mod h1:nAIUuVBnYU7pcninia3BHOvQkpQCeO76Uscky5BOwcY= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f h1:J9EGpcZtP0E/raorCMxlFGSTBrsSlaDGf3jU/qvAE2c= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74= github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= -github.com/xen0n/gosmopolitan v1.2.1 h1:3pttnTuFumELBRSh+KQs1zcz4fN6Zy7aB0xlnQSn1Iw= -github.com/xen0n/gosmopolitan v1.2.1/go.mod h1:JsHq/Brs1o050OOdmzHeOr0N7OtlnKRAGAsElF8xBQA= -github.com/yagipy/maintidx v1.0.0 h1:h5NvIsCz+nRDapQ0exNv4aJ0yXSI0420omVANTv3GJM= -github.com/yagipy/maintidx v1.0.0/go.mod h1:0qNf/I/CCZXSMhsRsrEPDZ+DkekpKLXAJfsTACwgXLk= -github.com/yeya24/promlinter v0.2.0 h1:xFKDQ82orCU5jQujdaD8stOHiv8UN68BSdn2a8u8Y3o= -github.com/yeya24/promlinter v0.2.0/go.mod h1:u54lkmBOZrpEbQQ6gox2zWKKLKu2SGe+2KOiextY+IA= -github.com/ykadowak/zerologlint v0.1.2 h1:Um4P5RMmelfjQqQJKtE8ZW+dLZrXrENeIzWWKw800U4= -github.com/ykadowak/zerologlint v0.1.2/go.mod h1:KaUskqF3e/v59oPmdq1U1DnKcuHokl2/K1U4pmIELKg= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -1399,9 +1018,6 @@ github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1 github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/zeebo/assert v1.3.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0= github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaDcA= -gitlab.com/bosi/decorder v0.2.3 h1:gX4/RgK16ijY8V+BRQHAySfQAb354T7/xQpDB2n10P0= -gitlab.com/bosi/decorder v0.2.3/go.mod h1:9K1RB5+VPNQYtXtTDAzd2OEftsZb1oV0IrJrzChSdGE= -go-simpler.org/assert v0.5.0 h1:+5L/lajuQtzmbtEfh69sr5cRf2/xZzyJhFjoOz/PPqs= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= @@ -1413,33 +1029,18 @@ go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.opentelemetry.io/proto/otlp v0.15.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= go.opentelemetry.io/proto/otlp v0.19.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= -go.step.sm/crypto v0.16.2 h1:Pr9aazTwWBBZNogUsOqhOrPSdwAa9pPs+lMB602lnDA= -go.step.sm/crypto v0.16.2/go.mod h1:1WkTOTY+fOX/RY4TnZREp6trQAsBHRQ7nu6QJBiNQF8= -go.tmz.dev/musttag v0.7.0 h1:QfytzjTWGXZmChoX0L++7uQN+yRCPfyFm+whsM+lfGc= -go.tmz.dev/musttag v0.7.0/go.mod h1:oTFPvgOkJmp5kYL02S8+jrH0eLrBIl57rzWeA26zDEM= -go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= -go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= -go.uber.org/goleak v1.1.11 h1:wy28qYRKZgnJTxGxvye5/wgWr1EKjmUDGYox5mGlRlI= -go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= -go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= -go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60= -go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200414173820-0848c9571904/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= -golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= -golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= +golang.org/x/crypto v0.13.0 h1:mvySKfSWJ+UKUii46M40LOvyWfN0s2U+46/jDd0e6Ck= +golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -1455,12 +1056,8 @@ golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20220827204233-334a2380cb91/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= -golang.org/x/exp v0.0.0-20230711023510-fffb14384f22 h1:FqrVOBQxQ8r/UwwXibI0KMolVhvFiGobSfdE33deHJM= -golang.org/x/exp v0.0.0-20230711023510-fffb14384f22/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= -golang.org/x/exp/typeparams v0.0.0-20220428152302-39d4317da171/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= -golang.org/x/exp/typeparams v0.0.0-20230203172020-98cc5a0785f9/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= -golang.org/x/exp/typeparams v0.0.0-20230224173230-c95f2b4c22f2 h1:J74nGeMgeFnYQJN59eFwh06jX/V8g0lB7LWpjSLxtgU= -golang.org/x/exp/typeparams v0.0.0-20230224173230-c95f2b4c22f2/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= +golang.org/x/exp v0.0.0-20230905200255-921286631fa9 h1:GoHiUyI/Tp2nVkLI2mCxVkOjsbSXD66ic0XW0js0R9g= +golang.org/x/exp v0.0.0-20230905200255-921286631fa9/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k= golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= @@ -1506,12 +1103,11 @@ golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.11.0 h1:bUO06HqtnRcc/7l71XBe4WcqTZ+3AH1J59zWDDwLKgU= -golang.org/x/mod v0.11.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= +golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -1519,7 +1115,6 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -1549,11 +1144,8 @@ golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLd golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211216030914-fe4d6282115f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= @@ -1576,8 +1168,8 @@ golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= -golang.org/x/net v0.12.0 h1:cfawfvKITfUsFCeJIHJrbSxpeu/E81khclypR0GVT50= -golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= +golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8= +golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1623,16 +1215,14 @@ golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20220819030929-7fc1605a5dde/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.2.0 h1:PUR+T4wwASmuSTYdKjYHI5TD22Wy5ogLU5qZCOLxBrI= -golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= +golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1641,10 +1231,10 @@ golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1658,8 +1248,6 @@ golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1668,7 +1256,6 @@ golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210304124612-50617c2ba197/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1680,7 +1267,6 @@ golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1689,14 +1275,11 @@ golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210915083310-ed5796bab164/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211105183446-c75c47738b0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1710,8 +1293,6 @@ golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220702020025-31831981b65f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1724,8 +1305,8 @@ golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA= -golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= +golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -1736,8 +1317,6 @@ golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= -golang.org/x/term v0.10.0 h1:3R7pNqamzBraeqj/Tj8qt1aQ2HpmlC+Cx/qL/7hn4/c= -golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1754,8 +1333,8 @@ golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/text v0.11.0 h1:LAntKIrcmeSKERyiOh0XMV39LXS8IE9UL2yP7+f5ij4= -golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1771,7 +1350,6 @@ golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3 golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190321232350-e250d351ecad/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= @@ -1779,11 +1357,9 @@ golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgw golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190910044552-dd2b5c81c578/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190927191325-030b2cf1153e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -1801,21 +1377,15 @@ golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapK golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200324003944-a576cf524670/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200329025819-fd4102a86c65/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200724022722-7017fd6b1305/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200820010801-b793a1359eac/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= -golang.org/x/tools v0.0.0-20201001104356-43ebab892c4c/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= -golang.org/x/tools v0.0.0-20201023174141-c8cfbd0f21e6/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201124115921-2c860bdd6e78/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= @@ -1824,8 +1394,6 @@ golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -golang.org/x/tools v0.1.1-0.20210205202024-ef80cdb6ec6d/go.mod h1:9bzcO0MWcOuT0tm1iBGzDVPshzfwoVvREIui8C+MHqU= -golang.org/x/tools v0.1.1-0.20210302220138-2ac05c832e1a/go.mod h1:9bzcO0MWcOuT0tm1iBGzDVPshzfwoVvREIui8C+MHqU= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= @@ -1833,17 +1401,15 @@ golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= -golang.org/x/tools v0.1.11/go.mod h1:SgwaegtQh8clINPpECJMqnxLv9I09HLqnW3RMqW0CA4= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= golang.org/x/tools v0.3.0/go.mod h1:/rWhSS2+zyEVwoJf8YAX6L2f0ntZ7Kn/mGgAWcipA5k= golang.org/x/tools v0.4.0/go.mod h1:UE5sM2OK9E/d67R0ANs2xJizIymRP5gJU295PvKXxjQ= -golang.org/x/tools v0.5.0/go.mod h1:N+Kgy78s5I24c24dU8OfWNEotWjutIs8SnJvn5IDq+k= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s= golang.org/x/tools v0.8.0/go.mod h1:JxBZ99ISMI5ViVkT1tr6tdNmXeTrcpVSD3vZ1RsRdN4= -golang.org/x/tools v0.9.3 h1:Gn1I8+64MsuTb/HpH+LmQtNas23LhUVr3rYZ0eKuaMM= -golang.org/x/tools v0.9.3/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= +golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ= +golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -2055,8 +1621,13 @@ google.golang.org/genproto v0.0.0-20230320184635-7606e756e683/go.mod h1:NWraEVix google.golang.org/genproto v0.0.0-20230323212658-478b75c54725/go.mod h1:UUQDJDOlWu4KYeJZffbWgBkS1YFobzKbLVfK69pe0Ak= google.golang.org/genproto v0.0.0-20230330154414-c0448cd141ea/go.mod h1:UUQDJDOlWu4KYeJZffbWgBkS1YFobzKbLVfK69pe0Ak= google.golang.org/genproto v0.0.0-20230331144136-dcfb400f0633/go.mod h1:UUQDJDOlWu4KYeJZffbWgBkS1YFobzKbLVfK69pe0Ak= -google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 h1:KpwkzHKEF7B9Zxg18WzOa7djJ+Ha5DzthMyZYQfEn2A= google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU= +google.golang.org/genproto v0.0.0-20230711160842-782d3b101e98 h1:Z0hjGZePRE0ZBWotvtrwxFNrNE9CUAGtplaDK5NNI/g= +google.golang.org/genproto v0.0.0-20230711160842-782d3b101e98/go.mod h1:S7mY02OqCJTD0E1OiQy1F72PWFB4bZJ87cAtLPYgDR0= +google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98 h1:FmF5cCW94Ij59cfpoLiwTgodWmm60eEV0CjlsVg2fuw= +google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98/go.mod h1:rsr7RhLuwsDKL7RmgDDCUc6yaGr1iqceVb5Wv6f6YvQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 h1:bVf09lpb+OJbByTj913DRJioFFAjf/ZGxEz7MajTp2U= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -2099,8 +1670,8 @@ google.golang.org/grpc v1.52.3/go.mod h1:pu6fVzoFb+NBYNAvQL08ic+lvB2IojljRYuun5v google.golang.org/grpc v1.53.0/go.mod h1:OnIrk0ipVdj4N5d9IUoFUx72/VlD7+jUsHwZgwSMQpw= google.golang.org/grpc v1.54.0/go.mod h1:PUSEXI6iWghWaB6lXM4knEgpJNu2qUcKfDtNci3EC2g= google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGONTY8= -google.golang.org/grpc v1.56.2 h1:fVRFRnXvU+x6C4IlHZewvJOVHoOv1TUuQyoRsYnB4bI= -google.golang.org/grpc v1.56.2/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= +google.golang.org/grpc v1.58.2 h1:SXUpjxeVF3FKrTYQI4f4KvbGD5u2xccdYdurwowix5I= +google.golang.org/grpc v1.58.2/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/grpc/examples v0.0.0-20230512210959-5dcfb37c0b43/go.mod h1:irORyHPQXotoshbRTZVFvPDcfTfFHL23efQeop+H45M= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= @@ -2119,28 +1690,21 @@ google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.29.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= +google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= -gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/square/go-jose.v2 v2.6.0/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= @@ -2153,8 +1717,6 @@ honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.1.3/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las= -honnef.co/go/tools v0.4.3 h1:o/n5/K5gXqk8Gozvs2cnL0F2S1/g1vcGCAx2vETjITw= -honnef.co/go/tools v0.4.3/go.mod h1:36ZgoUOrqOk1GxwHhyryEkq8FQWkUO2xGuSMhUCcdvA= lukechampine.com/uint128 v1.1.1/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk= lukechampine.com/uint128 v1.2.0/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk= modernc.org/cc/v3 v3.36.0/go.mod h1:NFUHyPn4ekoC/JHeZFfZurN6ixxawE1BnVonP/oahEI= @@ -2189,14 +1751,6 @@ modernc.org/strutil v1.1.3/go.mod h1:MEHNA7PdEnEwLvspRMtWTNnp2nnyvMfkimT1NKNAGbw modernc.org/tcl v1.13.1/go.mod h1:XOLfOwzhkljL4itZkK6T72ckMgvj0BDsnKNdZVUOecw= modernc.org/token v1.0.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= modernc.org/z v1.5.1/go.mod h1:eWFB510QWW5Th9YGZT81s+LwvaAs3Q2yr4sP0rmLkv8= -mvdan.cc/gofumpt v0.5.0 h1:0EQ+Z56k8tXjj/6TQD25BFNKQXpCvT0rnansIc7Ug5E= -mvdan.cc/gofumpt v0.5.0/go.mod h1:HBeVDtMKRZpXyxFciAirzdKklDlGu8aAy1wEbH5Y9js= -mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed h1:WX1yoOaKQfddO/mLzdV4wptyWgoH/6hwLs7QHTixo0I= -mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed/go.mod h1:Xkxe497xwlCKkIaQYRfC7CSLworTXY9RMqwhhCm+8Nc= -mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b h1:DxJ5nJdkhDlLok9K6qO+5290kphDJbHOQO1DFFFTeBo= -mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b/go.mod h1:2odslEg/xrtNQqCYg2/jCoyKnw3vv5biOc3JnIcYfL4= -mvdan.cc/unparam v0.0.0-20221223090309-7455f1af531d h1:3rvTIIM22r9pvXk+q3swxUQAQOxksVMGK7sml4nG57w= -mvdan.cc/unparam v0.0.0-20221223090309-7455f1af531d/go.mod h1:IeHQjmn6TOD+e4Z3RFiZMMsLVL+A96Nvptar8Fj71is= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= diff --git a/src/autoscaler/scalingengine/scalingengine_test.go b/src/autoscaler/scalingengine/scalingengine_test.go index a8bbf1cd2a..d5fc7bf653 100644 --- a/src/autoscaler/scalingengine/scalingengine_test.go +++ b/src/autoscaler/scalingengine/scalingengine_test.go @@ -104,7 +104,6 @@ var _ = Describe("ScalingEngine", func() { Expect(scalingResult.Status).To(Equal(models.ScalingStatusSucceeded)) Expect(scalingResult.Adjustment).To(Equal(1)) Expect(scalingResult.CooldownExpiredAt).To(Equal(clock.Now().Add(30 * time.Second).UnixNano())) - }) }) @@ -131,7 +130,6 @@ var _ = Describe("ScalingEngine", func() { Expect(scalingResult.Status).To(Equal(models.ScalingStatusIgnored)) Expect(scalingResult.Adjustment).To(Equal(0)) Expect(scalingResult.CooldownExpiredAt).To(Equal(int64(0))) - }) }) @@ -192,7 +190,6 @@ var _ = Describe("ScalingEngine", func() { Expect(scalingResult.Status).To(Equal(models.ScalingStatusIgnored)) Expect(scalingResult.Adjustment).To(Equal(0)) Expect(scalingResult.CooldownExpiredAt).To(Equal(int64(0))) - }) }) @@ -202,7 +199,6 @@ var _ = Describe("ScalingEngine", func() { setAppAndProcesses(5, appState) scalingEngineDB.CanScaleAppReturns(true, clock.Now().Add(0-30*time.Second).UnixNano(), nil) policyDB.GetAppPolicyReturns(&models.ScalingPolicy{InstanceMin: 1, InstanceMax: 6}, nil) - }) It("updates the app instance with max instances and stores the succeeded scaling history", func() { @@ -231,7 +227,6 @@ var _ = Describe("ScalingEngine", func() { Expect(scalingResult.Status).To(Equal(models.ScalingStatusSucceeded)) Expect(scalingResult.Adjustment).To(Equal(1)) Expect(scalingResult.CooldownExpiredAt).To(Equal(clock.Now().Add(30 * time.Second).UnixNano())) - }) }) @@ -241,7 +236,6 @@ var _ = Describe("ScalingEngine", func() { setAppAndProcesses(6, appState) scalingEngineDB.CanScaleAppReturns(true, clock.Now().Add(0-30*time.Second).UnixNano(), nil) policyDB.GetAppPolicyReturns(&models.ScalingPolicy{InstanceMin: 1, InstanceMax: 6}, nil) - }) It("updates the app instance with max instances and stores the ignored scaling history", func() { @@ -265,7 +259,6 @@ var _ = Describe("ScalingEngine", func() { Expect(scalingResult.Status).To(Equal(models.ScalingStatusIgnored)) Expect(scalingResult.Adjustment).To(Equal(0)) Expect(scalingResult.CooldownExpiredAt).To(Equal(int64(0))) - }) }) @@ -300,7 +293,6 @@ var _ = Describe("ScalingEngine", func() { Expect(scalingResult.Status).To(Equal(models.ScalingStatusSucceeded)) Expect(scalingResult.Adjustment).To(Equal(-1)) Expect(scalingResult.CooldownExpiredAt).To(Equal(clock.Now().Add(30 * time.Second).UnixNano())) - }) }) @@ -343,11 +335,10 @@ var _ = Describe("ScalingEngine", func() { Expect(scalingResult.Status).To(Equal(models.ScalingStatusSucceeded)) Expect(scalingResult.Adjustment).To(Equal(1)) Expect(scalingResult.CooldownExpiredAt).To(Equal(clock.Now().Add(30 * time.Second).UnixNano())) - }) }) - Context("when it exceeds min instances limit in active schedule", func() { + Context("when it exceeds min instances limit in active schedule", func() { BeforeEach(func() { trigger.Adjustment = "-60%" setAppAndProcesses(5, appState) @@ -377,10 +368,8 @@ var _ = Describe("ScalingEngine", func() { Expect(scalingResult.Status).To(Equal(models.ScalingStatusSucceeded)) Expect(scalingResult.Adjustment).To(Equal(-2)) Expect(scalingResult.CooldownExpiredAt).To(Equal(clock.Now().Add(30 * time.Second).UnixNano())) - }) }) - }) Context("when getting app info from cloud foundry fails", func() { diff --git a/src/autoscaler/scalingengine/server/scaling_handler.go b/src/autoscaler/scalingengine/server/scaling_handler.go index 72523eeff8..146a10897e 100644 --- a/src/autoscaler/scalingengine/server/scaling_handler.go +++ b/src/autoscaler/scalingengine/server/scaling_handler.go @@ -1,6 +1,9 @@ package server import ( + "errors" + + "code.cloudfoundry.org/app-autoscaler/src/autoscaler/cf" "code.cloudfoundry.org/app-autoscaler/src/autoscaler/db" "code.cloudfoundry.org/app-autoscaler/src/autoscaler/models" "code.cloudfoundry.org/app-autoscaler/src/autoscaler/scalingengine" @@ -49,9 +52,23 @@ func (h *ScalingHandler) Scale(w http.ResponseWriter, r *http.Request, vars map[ if err != nil { logger.Error("failed-to-scale", err, lager.Data{"trigger": trigger}) - handlers.WriteJSONResponse(w, http.StatusInternalServerError, models.ErrorResponse{ - Code: "Internal-server-error", - Message: "Error taking scaling action"}) + + var cfApiClientErrTypeProxy *cf.CfError + if errors.As(err, &cfApiClientErrTypeProxy) { + errorDescription, err := json.Marshal(cfApiClientErrTypeProxy) + if err != nil { + logger.Error("failed-to-serialize cf-api-error", err) + } + + handlers.WriteJSONResponse(w, cfApiClientErrTypeProxy.StatusCode, models.ErrorResponse{ + Code: "Error on request to the cloud-controller via a cf-client", + Message: fmt.Sprintf("Error taking scaling action:\n%s", string(errorDescription))}) + } else { + handlers.WriteJSONResponse(w, http.StatusInternalServerError, models.ErrorResponse{ + Code: "Internal-server-error", + Message: "Error taking scaling action"}) + } + return } diff --git a/src/autoscaler/scalingengine/server/scaling_handler_test.go b/src/autoscaler/scalingengine/server/scaling_handler_test.go index 1983d05d82..127311409d 100644 --- a/src/autoscaler/scalingengine/server/scaling_handler_test.go +++ b/src/autoscaler/scalingengine/server/scaling_handler_test.go @@ -1,6 +1,9 @@ package server_test import ( + "fmt" + + "code.cloudfoundry.org/app-autoscaler/src/autoscaler/cf" "code.cloudfoundry.org/app-autoscaler/src/autoscaler/db" "code.cloudfoundry.org/app-autoscaler/src/autoscaler/fakes" "code.cloudfoundry.org/app-autoscaler/src/autoscaler/models" @@ -106,6 +109,51 @@ var _ = Describe("ScalingHandler", func() { }) }) + Context("when an internal cf-call fails", func() { + BeforeEach(func() { + cfAPIError := cf.CfError{ + Errors: cf.ErrorItems([]cf.CfErrorItem{{ + Code: http.StatusNotFound, + Title: "Some title", + Detail: "Something went wrong.", + }}), + StatusCode: http.StatusNotFound, ResourceId: "unknown resource", Url: "https://some.url", + } + cfAPIErrorJson, err := json.Marshal(cfAPIError) + Expect(err).NotTo(HaveOccurred()) // Test implementation wrong: Object not json-serializable!" + requestError := cf.NewCfError( + "A URL for an cloud-controller", "resourceID", cfAPIError.StatusCode, cfAPIErrorJson) + clientError := fmt.Errorf("Error doing a request: %w", requestError) + + scalingEngine.ScaleReturns(&models.AppScalingResult{ + AppId: "an-app-id", + Status: models.ScalingStatusFailed, + Adjustment: 0, + CooldownExpiredAt: 0, + }, clientError) + + trigger = &models.Trigger{ + MetricType: testMetricName, + Adjustment: "+1", + } + body, err = json.Marshal(trigger) + Expect(err).NotTo(HaveOccurred()) + + req, err = http.NewRequest("POST", "", bytes.NewReader(body)) + Expect(err).NotTo(HaveOccurred()) + }) + + It("returns the status code of the cloud api", func() { + Expect(resp.Code).To(Equal(http.StatusNotFound)) + + errJson := &models.ErrorResponse{} + err = json.Unmarshal(resp.Body.Bytes(), errJson) + + Expect(err).ToNot(HaveOccurred()) + Expect(errJson.Code).To(Equal("Error on request to the cloud-controller via a cf-client")) + }) + }) + Context("when scaling app fails", func() { BeforeEach(func() { scalingEngine.ScaleReturns(&models.AppScalingResult{ diff --git a/src/autoscaler/tools.go b/src/autoscaler/tools.go index 26b4e78683..26fb269986 100644 --- a/src/autoscaler/tools.go +++ b/src/autoscaler/tools.go @@ -1,10 +1,10 @@ -// +build tools +//go:build tools package main import ( - _ "github.com/golangci/golangci-lint/cmd/golangci-lint" _ "github.com/maxbrunsfeld/counterfeiter/v6" - _ "github.com/onsi/ginkgo/v2/ginkgo" - _ "github.com/square/certstrap" ) + +// This file imports packages that are used when running go generate, +// but not otherwise depended on by built code. diff --git a/src/changelog/Makefile b/src/changelog/Makefile index c6afe53c82..6ecb51efa3 100644 --- a/src/changelog/Makefile +++ b/src/changelog/Makefile @@ -1,15 +1,33 @@ SHELL := /bin/bash -.SHELLFLAGS = -euo pipefail -c -MAKEFLAGS = -s +.SHELLFLAGS := -eu -o pipefail -c +MAKEFLAGS := -s + GO := GO111MODULE=on GO15VENDOREXPERIMENT=1 go GO_NOMOD := GO111MODULE=off go -GO_VERSION := $(shell $(GO) version | sed -e 's/^[^0-9.]*\([0-9.]*\).*/\1/') -GO_DEPENDENCIES := $(shell find . -type f -name '*.go') -PACKAGE_DIRS := $(shell $(GO) list ./... | grep -v /vendor/ | grep -v e2e) -CGO_ENABLED = 0 +GO_VERSION := $(shell ${GO} version | sed --expression='s/^[^0-9.]*\([0-9.]*\).*/\1/') +GO_DEPENDENCIES = $(shell find . -type f -name '*.go') +PACKAGE_DIRS = $(shell ${GO} list './...' | grep --invert-match --regexp='/vendor/' \ + | grep --invert-match --regexp='e2e') + +CGO_ENABLED := 0 +export GOWORK := off BUILDTAGS := +GINKGO_VERSION = v$(shell cat '../../.tool-versions' | grep --regexp='ginkgo' \ + | cut --delimiter=' ' --fields='2') +GOLANGCI_LINT_VERSION = v$(shell cat '../../.tool-versions' | grep --regexp='golangci-lint' \ + | cut --delimiter=' ' --fields='2' ) + + +.PHONY: go-mod-tidy go-mod-vendor +go-mod-tidy: + go mod tidy +go-mod-vendor: + go mod vendor + + + build: @echo "# building changelog" @CGO_ENABLED=$(CGO_ENABLED) $(GO) build $(BUILDTAGS) $(BUILDFLAGS) -o changelog main.go @@ -23,14 +41,14 @@ build_test-%: cd $* &&\ for package in $$( go list ./... | sed 's|.*/autoscaler/$*|.|' | awk '{ print length, $$0 }' | sort -n -r | cut -d" " -f2- );\ do\ - export test_file=$${build_folder}/$${package}.test;\ - echo " - compiling $${package} to $${test_file}";\ - go test -c -o $${test_file} $${package};\ + export test_file=$${build_folder}/$${package}.test;\ + echo " - compiling $${package} to $${test_file}";\ + go test -c -o $${test_file} $${package};\ done; check: fmt lint build test test: - ginkgo -r --race --randomize-all --keep-going + go run github.com/onsi/ginkgo/v2/ginkgo@${GINKGO_VERSION} -r --race --randomize-all --keep-going get-fmt-deps: ## Install goimports $(GO_NOMOD) get golang.org/x/tools/cmd/goimports @@ -44,7 +62,7 @@ fmt: importfmt @([[ ! -z "$(FORMATTED)" ]] && printf "Fixed unformatted files:\n$(FORMATTED)") || true lint: - golangci-lint run + @go run github.com/golangci/golangci-lint/cmd/golangci-lint@${GOLANGCI_LINT_VERSION} run lint-fix: - golangci-lint run --fix + go run github.com/golangci/golangci-lint/cmd/golangci-lint@${GOLANGCI_LINT_VERSION} run --fix diff --git a/src/changelog/go.mod b/src/changelog/go.mod index 5bc11a918d..9a3cb869fa 100644 --- a/src/changelog/go.mod +++ b/src/changelog/go.mod @@ -6,7 +6,7 @@ require ( github.com/Masterminds/semver/v3 v3.2.1 github.com/shurcooL/githubv4 v0.0.0-20230704064427-599ae7bbf278 github.com/stretchr/testify v1.8.4 - golang.org/x/oauth2 v0.10.0 + golang.org/x/oauth2 v0.12.0 ) require ( @@ -14,7 +14,7 @@ require ( github.com/golang/protobuf v1.5.3 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/shurcooL/graphql v0.0.0-20200928012149-18c5c3165e3a // indirect - golang.org/x/net v0.12.0 // indirect + golang.org/x/net v0.15.0 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/protobuf v1.31.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/src/changelog/go.sum b/src/changelog/go.sum index 4b1546f09e..dfd442c8b8 100644 --- a/src/changelog/go.sum +++ b/src/changelog/go.sum @@ -18,10 +18,10 @@ github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcU github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.12.0 h1:cfawfvKITfUsFCeJIHJrbSxpeu/E81khclypR0GVT50= -golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= -golang.org/x/oauth2 v0.10.0 h1:zHCpF2Khkwy4mMB4bv0U37YtJdTGW8jI0glAApi0Kh8= -golang.org/x/oauth2 v0.10.0/go.mod h1:kTpgurOux7LqtuxjuyZa4Gj2gdezIt/jQtGnNFfypQI= +golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8= +golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= +golang.org/x/oauth2 v0.12.0 h1:smVPGxink+n1ZI5pkQa8y6fZT0RW0MgCO5bFpepy4B4= +golang.org/x/oauth2 v0.12.0/go.mod h1:A74bZ3aGXgCY0qaIC9Ahg6Lglin4AMAco8cIv9baba4= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= diff --git a/src/changeloglockcleaner/Makefile b/src/changeloglockcleaner/Makefile index 99a1be6ea9..8239c61d69 100644 --- a/src/changeloglockcleaner/Makefile +++ b/src/changeloglockcleaner/Makefile @@ -1,15 +1,33 @@ SHELL := /bin/bash -.SHELLFLAGS = -euo pipefail -c -MAKEFLAGS = -s +.SHELLFLAGS := -eu -o pipefail -c +MAKEFLAGS := -s + GO := GO111MODULE=on GO15VENDOREXPERIMENT=1 go GO_NOMOD := GO111MODULE=off go -GO_VERSION := $(shell $(GO) version | sed -e 's/^[^0-9.]*\([0-9.]*\).*/\1/') -GO_DEPENDENCIES := $(shell find . -type f -name '*.go') -PACKAGE_DIRS := $(shell $(GO) list ./... | grep -v /vendor/ | grep -v e2e) -CGO_ENABLED = 0 +GO_VERSION := $(shell ${GO} version | sed --expression='s/^[^0-9.]*\([0-9.]*\).*/\1/') +GO_DEPENDENCIES = $(shell find . -type f -name '*.go') +PACKAGE_DIRS = $(shell ${GO} list './...' | grep --invert-match --regexp='/vendor/' \ + | grep --invert-match --regexp='e2e') + +CGO_ENABLED := 0 +export GOWORK := off BUILDTAGS := +GINKGO_VERSION = v$(shell cat '../../.tool-versions' | grep --regexp='ginkgo' \ + | cut --delimiter=' ' --fields='2') +GOLANGCI_LINT_VERSION = v$(shell cat '../../.tool-versions' | grep --regexp='golangci-lint' \ + | cut --delimiter=' ' --fields='2' ) + + +.PHONY: go-mod-tidy go-mod-vendor +go-mod-tidy: + go mod tidy +go-mod-vendor: + go mod vendor + + + build: @echo "# building changeloglockcleaner" @CGO_ENABLED=$(CGO_ENABLED) $(GO) build $(BUILDTAGS) $(BUILDFLAGS) -o changeloglockcleaner main.go @@ -23,15 +41,15 @@ build_test-%: cd $* &&\ for package in $$( go list ./... | sed 's|.*/autoscaler/$*|.|' | awk '{ print length, $$0 }' | sort -n -r | cut -d" " -f2- );\ do\ - export test_file=$${build_folder}/$${package}.test;\ - echo " - compiling $${package} to $${test_file}";\ - go test -c -o $${test_file} $${package};\ + export test_file=$${build_folder}/$${package}.test;\ + echo " - compiling $${package} to $${test_file}";\ + go test -c -o $${test_file} $${package};\ done; check: fmt lint build test test: - ginkgo -r --race --randomize-all --keep-going + go run github.com/onsi/ginkgo/v2/ginkgo@${GINKGO_VERSION} -r --race --randomize-all --keep-going get-fmt-deps: ## Install goimports $(GO_NOMOD) get golang.org/x/tools/cmd/goimports @@ -45,7 +63,7 @@ fmt: importfmt @([[ ! -z "$(FORMATTED)" ]] && printf "Fixed unformatted files:\n$(FORMATTED)") || true lint: - golangci-lint run + @go run github.com/golangci/golangci-lint/cmd/golangci-lint@${GOLANGCI_LINT_VERSION} run lint-fix: - golangci-lint run --fix + go run github.com/golangci/golangci-lint/cmd/golangci-lint@${GOLANGCI_LINT_VERSION} run --fix diff --git a/src/changeloglockcleaner/go.mod b/src/changeloglockcleaner/go.mod index c0cc786a81..cbcd0b0b20 100644 --- a/src/changeloglockcleaner/go.mod +++ b/src/changeloglockcleaner/go.mod @@ -4,10 +4,10 @@ go 1.20 require ( github.com/go-sql-driver/mysql v1.7.1 - github.com/jackc/pgx/v5 v5.4.1 + github.com/jackc/pgx/v5 v5.4.3 github.com/jmoiron/sqlx v1.3.5 - github.com/onsi/ginkgo/v2 v2.11.0 - github.com/onsi/gomega v1.27.8 + github.com/onsi/ginkgo/v2 v2.12.1 + github.com/onsi/gomega v1.27.10 ) require ( @@ -19,10 +19,10 @@ require ( github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect github.com/kr/text v0.2.0 // indirect github.com/rogpeppe/go-internal v1.9.0 // indirect - golang.org/x/crypto v0.9.0 // indirect - golang.org/x/net v0.10.0 // indirect - golang.org/x/sys v0.9.0 // indirect - golang.org/x/text v0.9.0 // indirect - golang.org/x/tools v0.9.3 // indirect + golang.org/x/crypto v0.12.0 // indirect + golang.org/x/net v0.14.0 // indirect + golang.org/x/sys v0.12.0 // indirect + golang.org/x/text v0.12.0 // indirect + golang.org/x/tools v0.12.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/src/changeloglockcleaner/go.sum b/src/changeloglockcleaner/go.sum index 497fef83b2..201d0a06de 100644 --- a/src/changeloglockcleaner/go.sum +++ b/src/changeloglockcleaner/go.sum @@ -22,8 +22,8 @@ github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsI github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg= github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a h1:bbPeKD0xmW/Y25WS6cokEszi5g+S0QxI/d45PkRi7Nk= github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM= -github.com/jackc/pgx/v5 v5.4.1 h1:oKfB/FhuVtit1bBM3zNRRsZ925ZkMN3HXL+LgLUM9lE= -github.com/jackc/pgx/v5 v5.4.1/go.mod h1:q6iHT8uDNXWiFNOlRqJzBTaSH3+2xCXkokxHZC5qWFY= +github.com/jackc/pgx/v5 v5.4.3 h1:cxFyXhxlvAifxnkKKdlxv8XqUf59tDlYjnV5YYfsJJY= +github.com/jackc/pgx/v5 v5.4.3/go.mod h1:Ig06C2Vu0t5qXC60W8sqIthScaEnFvojjj9dSljmHRA= github.com/jmoiron/sqlx v1.3.5 h1:vFFPA71p1o5gAeqtEAwLU4dnX2napprKtHr7PYIcN3g= github.com/jmoiron/sqlx v1.3.5/go.mod h1:nRVWtLre0KfCLJvgxzCsLVMogSvQ1zNJtpYr2Ccp0mQ= github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= @@ -33,10 +33,10 @@ github.com/lib/pq v1.2.0 h1:LXpIM/LZ5xGFhOpXAQUIMM1HdyqzVYM13zNdjCEEcA0= github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/mattn/go-sqlite3 v1.14.6 h1:dNPt6NO46WmLVt2DLNpwczCmdV5boIZ6g/tlDrlRUbg= github.com/mattn/go-sqlite3 v1.14.6/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= -github.com/onsi/ginkgo/v2 v2.11.0 h1:WgqUCUt/lT6yXoQ8Wef0fsNn5cAuMK7+KT9UFRz2tcU= -github.com/onsi/ginkgo/v2 v2.11.0/go.mod h1:ZhrRA5XmEE3x3rhlzamx/JJvujdZoJ2uvgI7kR0iZvM= -github.com/onsi/gomega v1.27.8 h1:gegWiwZjBsf2DgiSbf5hpokZ98JVDMcWkUiigk6/KXc= -github.com/onsi/gomega v1.27.8/go.mod h1:2J8vzI/s+2shY9XHRApDkdgPo1TKT7P2u6fXeJKFnNQ= +github.com/onsi/ginkgo/v2 v2.12.1 h1:uHNEO1RP2SpuZApSkel9nEh1/Mu+hmQe7Q+Pepg5OYA= +github.com/onsi/ginkgo/v2 v2.12.1/go.mod h1:TE309ZR8s5FsKKpuB1YAQYBzCaAfUgatB/xlT/ETL/o= +github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= +github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= @@ -46,18 +46,18 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= -golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g= -golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= -golang.org/x/mod v0.10.0 h1:lFO9qtOdlre5W1jxS3r/4szv2/6iXxScdzjoBMXNhYk= -golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M= -golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/crypto v0.12.0 h1:tFM/ta59kqch6LlvYnPa0yx5a83cL2nHflFhYKvv9Yk= +golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= +golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= +golang.org/x/net v0.14.0 h1:BONx9s002vGdD9umnlX1Po8vOZmrgH34qlHcD1MfK14= +golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.9.0 h1:KS/R3tvhPqvJvwcKfnBHJwwthS11LRhmM5D59eEXa0s= -golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= -golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/tools v0.9.3 h1:Gn1I8+64MsuTb/HpH+LmQtNas23LhUVr3rYZ0eKuaMM= -golang.org/x/tools v0.9.3/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= +golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= +golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc= +golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/tools v0.12.0 h1:YW6HUoUmYBpwSgyaGaZq1fHjrBjX1rlpZ54T6mu2kss= +golang.org/x/tools v0.12.0/go.mod h1:Sc0INKfu04TlqNoRA1hgpFZbhYXHPr4V5DzpSBTPqQM= google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= diff --git a/src/changeloglockcleaner/tools.go b/src/changeloglockcleaner/tools.go deleted file mode 100644 index 5f2ebed160..0000000000 --- a/src/changeloglockcleaner/tools.go +++ /dev/null @@ -1,7 +0,0 @@ -// +build tools - -package main - -import ( - _ "github.com/onsi/ginkgo/v2/ginkgo" -) diff --git a/src/db/pom.xml b/src/db/pom.xml index 4be759e7e3..685221f32f 100644 --- a/src/db/pom.xml +++ b/src/db/pom.xml @@ -20,12 +20,12 @@ org.liquibase liquibase-core - 4.23.0 + 4.24.0 org.yaml snakeyaml - 2.0 + 2.2 org.postgresql diff --git a/src/scheduler/pom.xml b/src/scheduler/pom.xml index 9b1d88d209..2292862719 100644 --- a/src/scheduler/pom.xml +++ b/src/scheduler/pom.xml @@ -5,7 +5,7 @@ org.springframework.boot spring-boot-starter-parent - 3.1.1 + 3.1.4 @@ -83,12 +83,12 @@ com.mysql mysql-connector-j - 8.0.33 + 8.1.0 org.apache.commons commons-dbcp2 - 2.9.0 + 2.10.0 org.apache.httpcomponents.client5 @@ -135,7 +135,7 @@ org.projectlombok lombok - 1.18.28 + 1.18.30 provided @@ -189,7 +189,7 @@ com.puppycrawl.tools checkstyle - 10.12.1 + 10.12.4 @@ -197,7 +197,7 @@ com.github.spotbugs spotbugs-maven-plugin - 4.7.3.5 + 4.7.3.6 Max medium diff --git a/templates/app-autoscaler.yml b/templates/app-autoscaler.yml index 957cd5a88f..80f55caaad 100644 --- a/templates/app-autoscaler.yml +++ b/templates/app-autoscaler.yml @@ -920,6 +920,8 @@ variables: options: common_name: metricScraperCA is_ca: true + key_length: 4096 + duration: 180 - name: loggregator_agent_metrics_tls type: certificate update_mode: converge @@ -930,3 +932,6 @@ variables: - loggregator_agent_server extended_key_usage: - server_auth + key_length: 4096 + duration: 180 +