You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "lingsamuel (via GitHub)" <gi...@apache.org> on 2023/03/23 05:47:56 UTC

[GitHub] [apisix-ingress-controller] lingsamuel opened a new pull request, #1742: feat: support comparison in resource sync

lingsamuel opened a new pull request, #1742:
URL: https://github.com/apache/apisix-ingress-controller/pull/1742

   Signed-off-by: Ling Samuel <li...@gmail.com><!-- Please answer these questions before submitting a pull request -->
   
   ### Type of change:
   
   - [x] New feature provided
   
   ### What this PR does / why we need it:
   
   Add an optional *comparison* mechanics before PUT requests for periodic synchronizations to avoid unnecessary write to etcd.
   
   ### Pre-submission checklist:
   
   - [x] Did you explain what problem does this PR solve? Or what new features have been added?
   - [x] Have you added corresponding test cases?
   - [ ] Have you modified the corresponding document?
   - [x] Is this PR backward compatible? **If it is not backward compatible, please discuss on the [mailing list](https://github.com/apache/apisix-ingress-controller#community) first**
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] AlinsRan commented on a diff in pull request #1742: feat: support comparison in resource sync

Posted by "AlinsRan (via GitHub)" <gi...@apache.org>.
AlinsRan commented on code in PR #1742:
URL: https://github.com/apache/apisix-ingress-controller/pull/1742#discussion_r1155518957


##########
test/e2e/suite-features/sync-delay.go:
##########
@@ -0,0 +1,325 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+package features
+
+import (
+	"fmt"
+	"os/exec"
+	"strconv"
+	"strings"
+	"time"
+
+	"github.com/apache/apisix-ingress-controller/pkg/log"
+	ginkgo "github.com/onsi/ginkgo/v2"
+	"github.com/stretchr/testify/assert"
+
+	"github.com/apache/apisix-ingress-controller/test/e2e/scaffold"
+)
+
+func getApisixResourceRequestsCount(s *scaffold.Scaffold, res string) int {

Review Comment:
   ![image](https://user-images.githubusercontent.com/79972061/229425381-b6095dac-8bd1-43e5-bb41-2e8e0740ba72.png)
   Maybe we can reuse it.
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] codecov-commenter commented on pull request #1742: [draft] feat: support comparison in resource sync

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #1742:
URL: https://github.com/apache/apisix-ingress-controller/pull/1742#issuecomment-1491640626

   ## [Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/1742?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#1742](https://codecov.io/gh/apache/apisix-ingress-controller/pull/1742?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (5bafa25) into [master](https://codecov.io/gh/apache/apisix-ingress-controller/commit/405b6fb2f9740d23cd75a19c831cd17c35cd6ebb?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (405b6fb) will **decrease** coverage by `1.97%`.
   > The diff coverage is `10.99%`.
   
   > :exclamation: Current head 5bafa25 differs from pull request most recent head 4c89c30. Consider uploading reports for the commit 4c89c30 to get more accurate results
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #1742      +/-   ##
   ==========================================
   - Coverage   41.69%   39.72%   -1.97%     
   ==========================================
     Files          90       92       +2     
     Lines        7702     8065     +363     
   ==========================================
   - Hits         3211     3204       -7     
   - Misses       4127     4457     +330     
   - Partials      364      404      +40     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/apisix-ingress-controller/pull/1742?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [pkg/apisix/apisix.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/1742?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2FwaXNpeC9hcGlzaXguZ28=) | `61.22% <ø> (ø)` | |
   | [pkg/apisix/cache/noop\_db.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/1742?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2FwaXNpeC9jYWNoZS9ub29wX2RiLmdv) | `0.00% <0.00%> (ø)` | |
   | [pkg/apisix/noop.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/1742?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2FwaXNpeC9ub29wLmdv) | `0.00% <0.00%> (ø)` | |
   | [pkg/apisix/plugin\_metadata.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/1742?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2FwaXNpeC9wbHVnaW5fbWV0YWRhdGEuZ28=) | `4.65% <0.00%> (+0.25%)` | :arrow_up: |
   | [pkg/apisix/upstreamservicerelation.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/1742?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2FwaXNpeC91cHN0cmVhbXNlcnZpY2VyZWxhdGlvbi5nbw==) | `59.45% <0.00%> (ø)` | |
   | [.../providers/gateway/translation/gateway\_tlsroute.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/1742?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3Byb3ZpZGVycy9nYXRld2F5L3RyYW5zbGF0aW9uL2dhdGV3YXlfdGxzcm91dGUuZ28=) | `0.00% <0.00%> (ø)` | |
   | [.../providers/gateway/translation/gateway\_udproute.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/1742?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3Byb3ZpZGVycy9nYXRld2F5L3RyYW5zbGF0aW9uL2dhdGV3YXlfdWRwcm91dGUuZ28=) | `0.00% <0.00%> (ø)` | |
   | [pkg/providers/ingress/ingress.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/1742?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3Byb3ZpZGVycy9pbmdyZXNzL2luZ3Jlc3MuZ28=) | `4.64% <0.00%> (ø)` | |
   | [pkg/providers/utils/manifest.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/1742?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3Byb3ZpZGVycy91dGlscy9tYW5pZmVzdC5nbw==) | `41.17% <0.00%> (ø)` | |
   | [pkg/types/event.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/1742?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3R5cGVzL2V2ZW50Lmdv) | `62.50% <0.00%> (-37.50%)` | :arrow_down: |
   | ... and [14 more](https://codecov.io/gh/apache/apisix-ingress-controller/pull/1742?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] tao12345666333 merged pull request #1742: feat: support comparison in resource sync

Posted by "tao12345666333 (via GitHub)" <gi...@apache.org>.
tao12345666333 merged PR #1742:
URL: https://github.com/apache/apisix-ingress-controller/pull/1742


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org