Skip to content

feat: add dafault value roundrobin for upstream_schema#8180

Merged
spacewander merged 6 commits into
apache:masterfrom
Hazel6869:fix_default_value
Nov 2, 2022
Merged

feat: add dafault value roundrobin for upstream_schema#8180
spacewander merged 6 commits into
apache:masterfrom
Hazel6869:fix_default_value

Conversation

@Hazel6869

@Hazel6869 Hazel6869 commented Oct 26, 2022

Copy link
Copy Markdown
Contributor

Description

Fixes #8114

the docs pr #8191

Checklist

  • I have explained the need for this PR and the problem it solves
  • I have explained the changes or the new features added to this PR
  • I have added tests corresponding to this change
  • I have updated the documentation to reflect this change
  • I have verified that this change is backward compatible (If not, please discuss on the APISIX mailing list first)

@Hazel6869
Hazel6869 marked this pull request as draft October 26, 2022 07:34
@tzssangglass

Copy link
Copy Markdown
Member

we need to update test cases and docs

@Hazel6869

Copy link
Copy Markdown
Contributor Author

we need to update test cases and docs

ok i will do it

@Hazel6869
Hazel6869 marked this pull request as ready for review October 27, 2022 09:36
@Hazel6869
Hazel6869 marked this pull request as draft October 27, 2022 09:36
@Hazel6869
Hazel6869 marked this pull request as ready for review October 27, 2022 09:45
Comment thread t/admin/upstream.t
"nodes": {
"127.0.0.1:8080": 1
}
}]]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Better to check the default value of type like

"value": {

@tzssangglass

Copy link
Copy Markdown
Member

Do we need to remove a lot of type = "roundrobin" in test cases? what's your option? cc @spacewander

Comment thread t/admin/upstream.t Outdated
ngx.say(body)

local res = assert(etcd.get('/upstreams/admin_up'))
local create_time = res.body.node.value.create_time

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We don't need to check xxx_time, right?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Right, I have fixed it.

@spacewander

Copy link
Copy Markdown
Member

Do we need to remove a lot of type = "roundrobin" in test cases? what's your option? cc @spacewander

Yes, let's do it with script.

Comment thread apisix/schema_def.lua
type = {
description = "algorithms of load balancing",
type = "string",
default = "roundrobin",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do we need to update the doc too?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

+1. cc @Hazel6869

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I have done. pls see description. @spacewander @tokers

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Could you please put the doc in the same PR next time?
So people don't need to check another one.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

ok

@spacewander
spacewander merged commit f120076 into apache:master Nov 2, 2022
Liu-Junlin pushed a commit to Liu-Junlin/apisix that referenced this pull request Nov 4, 2022
hongbinhsu added a commit to fitphp/apix that referenced this pull request Nov 7, 2022
* upstream/master: (94 commits)
  test: add test cases for ai module (apache#8222)
  fix(ai): typo key name (apache#8232)
  docs:  update the docs of admin API  (apache#8191)
  Update standalone docs for change in SSL parameter (apache#8242)
  fix: can not modify x-forwarded-host in proxy rewrite (apache#8200)
  chore: export the set cert/key process so we can hook it (apache#8228)
  test: add cases of ai module (apache#8214)
  feat: add dafault value roundrobin for upstream_schema (apache#8180)
  docs: update limit plugin docs (apache#8154)
  dix remote_addr (apache#8210)
  fix(zipkin): send trace IDs with a reject sampling decision (apache#8099)
  docs: update hmac-auth doc (apache#8192)
  docs: update limit count plugin doc (apache#8196)
  docs: fix building apisix misled (apache#8189)
  fix: meta.filter in plugin doesn't work in response-rewrite plugin (apache#8162)
  feat: release 3.0 (apache#8179)
  docs: refactor admin api doc (apache#8145)
  docs: refactor health check doc (apache#8129)
  docs: protect-api.md typo, remove redundant braces. (apache#8139)
  feat: renew route lrucache when the routes change (apache#8157)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: As a user, I want to provide a default value for upstream.type, so that we can save lots of typing

5 participants