Skip to content

Conversation

@lhhyung
Copy link
Member

@lhhyung lhhyung commented Dec 10, 2024

Category

  • New feature
  • Bug fix
  • Improvement
  • Refactor
  • etc

Description

Refactor Region service

Known issue

@lhhyung lhhyung self-assigned this Dec 10, 2024
@github-actions
Copy link

⚠️ @lhhyung the signed-off-by was not found in the following 6 commits:

  • 1055076: Merge remote-tracking branch 'upstream/master'
  • d1d458e: Merge branch 'cloudforet-io:master' into master
  • 6f4be2d: Merge branch 'cloudforet-io:master' into master
  • a0135bf: Merge branch 'cloudforet-io:master' into master
  • 384eae9: Merge remote-tracking branch 'origin/master'
  • 1b342dd: Merge remote-tracking branch 'origin/master'

✅ Why it is required

The Developer Certificate of Origin (DCO) is a lightweight way for contributors to certify that they wrote or otherwise have the right to submit the code they are contributing to the project. Here is the full text of the DCO.

Contributors sign-off that they adhere to these requirements by adding a Signed-off-by line to commit messages.

This is my commit message

Signed-off-by: Random Developer <randomdeveloper@example.com>

Git even has a -s command line option to append this automatically to your commit message:

$ git commit -s -m 'This is my commit message'

Signed-off-by: lhhyung <lhhyung511@megazone.com>
Signed-off-by: lhhyung <lhhyung511@megazone.com>
@github-actions
Copy link

⚠️ @lhhyung the signed-off-by was not found in the following 6 commits:

  • 1055076: Merge remote-tracking branch 'upstream/master'
  • d1d458e: Merge branch 'cloudforet-io:master' into master
  • 6f4be2d: Merge branch 'cloudforet-io:master' into master
  • a0135bf: Merge branch 'cloudforet-io:master' into master
  • 384eae9: Merge remote-tracking branch 'origin/master'
  • 1b342dd: Merge remote-tracking branch 'origin/master'

✅ Why it is required

The Developer Certificate of Origin (DCO) is a lightweight way for contributors to certify that they wrote or otherwise have the right to submit the code they are contributing to the project. Here is the full text of the DCO.

Contributors sign-off that they adhere to these requirements by adding a Signed-off-by line to commit messages.

This is my commit message

Signed-off-by: Random Developer <randomdeveloper@example.com>

Git even has a -s command line option to append this automatically to your commit message:

$ git commit -s -m 'This is my commit message'

@github-actions
Copy link

⚠️ @lhhyung the signed-off-by was not found in the following 6 commits:

  • 1055076: Merge remote-tracking branch 'upstream/master'
  • d1d458e: Merge branch 'cloudforet-io:master' into master
  • 6f4be2d: Merge branch 'cloudforet-io:master' into master
  • a0135bf: Merge branch 'cloudforet-io:master' into master
  • 384eae9: Merge remote-tracking branch 'origin/master'
  • 1b342dd: Merge remote-tracking branch 'origin/master'

✅ Why it is required

The Developer Certificate of Origin (DCO) is a lightweight way for contributors to certify that they wrote or otherwise have the right to submit the code they are contributing to the project. Here is the full text of the DCO.

Contributors sign-off that they adhere to these requirements by adding a Signed-off-by line to commit messages.

This is my commit message

Signed-off-by: Random Developer <randomdeveloper@example.com>

Git even has a -s command line option to append this automatically to your commit message:

$ git commit -s -m 'This is my commit message'

Signed-off-by: lhhyung <lhhyung511@megazone.com>
@github-actions
Copy link

⚠️ @lhhyung the signed-off-by was not found in the following 6 commits:

  • 1055076: Merge remote-tracking branch 'upstream/master'
  • d1d458e: Merge branch 'cloudforet-io:master' into master
  • 6f4be2d: Merge branch 'cloudforet-io:master' into master
  • a0135bf: Merge branch 'cloudforet-io:master' into master
  • 384eae9: Merge remote-tracking branch 'origin/master'
  • 1b342dd: Merge remote-tracking branch 'origin/master'

✅ Why it is required

The Developer Certificate of Origin (DCO) is a lightweight way for contributors to certify that they wrote or otherwise have the right to submit the code they are contributing to the project. Here is the full text of the DCO.

Contributors sign-off that they adhere to these requirements by adding a Signed-off-by line to commit messages.

This is my commit message

Signed-off-by: Random Developer <randomdeveloper@example.com>

Git even has a -s command line option to append this automatically to your commit message:

$ git commit -s -m 'This is my commit message'

Signed-off-by: lhhyung <lhhyung511@megazone.com>
@github-actions
Copy link

⚠️ @lhhyung the signed-off-by was not found in the following 6 commits:

  • 1055076: Merge remote-tracking branch 'upstream/master'
  • d1d458e: Merge branch 'cloudforet-io:master' into master
  • 6f4be2d: Merge branch 'cloudforet-io:master' into master
  • a0135bf: Merge branch 'cloudforet-io:master' into master
  • 384eae9: Merge remote-tracking branch 'origin/master'
  • 1b342dd: Merge remote-tracking branch 'origin/master'

✅ Why it is required

The Developer Certificate of Origin (DCO) is a lightweight way for contributors to certify that they wrote or otherwise have the right to submit the code they are contributing to the project. Here is the full text of the DCO.

Contributors sign-off that they adhere to these requirements by adding a Signed-off-by line to commit messages.

This is my commit message

Signed-off-by: Random Developer <randomdeveloper@example.com>

Git even has a -s command line option to append this automatically to your commit message:

$ git commit -s -m 'This is my commit message'

Signed-off-by: lhhyung <lhhyung511@megazone.com>
@github-actions
Copy link

⚠️ @lhhyung the signed-off-by was not found in the following 6 commits:

  • 1055076: Merge remote-tracking branch 'upstream/master'
  • d1d458e: Merge branch 'cloudforet-io:master' into master
  • 6f4be2d: Merge branch 'cloudforet-io:master' into master
  • a0135bf: Merge branch 'cloudforet-io:master' into master
  • 384eae9: Merge remote-tracking branch 'origin/master'
  • 1b342dd: Merge remote-tracking branch 'origin/master'

✅ Why it is required

The Developer Certificate of Origin (DCO) is a lightweight way for contributors to certify that they wrote or otherwise have the right to submit the code they are contributing to the project. Here is the full text of the DCO.

Contributors sign-off that they adhere to these requirements by adding a Signed-off-by line to commit messages.

This is my commit message

Signed-off-by: Random Developer <randomdeveloper@example.com>

Git even has a -s command line option to append this automatically to your commit message:

$ git commit -s -m 'This is my commit message'

…e method in Region Service

Signed-off-by: lhhyung <lhhyung511@megazone.com>
@github-actions
Copy link

⚠️ @lhhyung the signed-off-by was not found in the following 6 commits:

  • 1055076: Merge remote-tracking branch 'upstream/master'
  • d1d458e: Merge branch 'cloudforet-io:master' into master
  • 6f4be2d: Merge branch 'cloudforet-io:master' into master
  • a0135bf: Merge branch 'cloudforet-io:master' into master
  • 384eae9: Merge remote-tracking branch 'origin/master'
  • 1b342dd: Merge remote-tracking branch 'origin/master'

✅ Why it is required

The Developer Certificate of Origin (DCO) is a lightweight way for contributors to certify that they wrote or otherwise have the right to submit the code they are contributing to the project. Here is the full text of the DCO.

Contributors sign-off that they adhere to these requirements by adding a Signed-off-by line to commit messages.

This is my commit message

Signed-off-by: Random Developer <randomdeveloper@example.com>

Git even has a -s command line option to append this automatically to your commit message:

$ git commit -s -m 'This is my commit message'


class RegionUpdateRequest(BaseModel):
region_id: str
name: str = None
Copy link
Member

Choose a reason for hiding this comment

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

This field is optional. As our convention, it is recommended that it be of type Union[str, None].

role_types=["DOMAIN_ADMIN", "WORKSPACE_OWNER"],
)
def update(self, params: dict) -> Region:
@change_value_by_rule("APPEND", "workspace_id", "*")
Copy link
Member

Choose a reason for hiding this comment

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

I think I misinformed you; this decorator should only be used in the read operation.

Suggested change
@change_value_by_rule("APPEND", "workspace_id", "*")

'name': 'str', # required
'region_code': 'str', # required
'provider': 'str', # required
'region_id': 'str,
Copy link
Member

Choose a reason for hiding this comment

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

region_id field has been removed from the RegionCreateRequest.

region_vo = self.create_resource(params.dict())

return self.create_resource(params)
# return self.create_resource(params)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
# return self.create_resource(params)

if isinstance(params["tags"], list):
params["tags"] = utils.tags_to_dict(params["tags"])

identity_mgr = IdentityManager()
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
identity_mgr = IdentityManager()

role_types=["DOMAIN_ADMIN", "WORKSPACE_OWNER"],
)
def delete(self, params: dict) -> None:
@change_value_by_rule("APPEND", "workspace_id", "*")
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
@change_value_by_rule("APPEND", "workspace_id", "*")

region_id: str
name: str = None
tags: Union[dict, None] = None
workspace_id: Union[list, str, None] = None
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
workspace_id: Union[list, str, None] = None
workspace_id: Union[str, None] = None


class RegionDeleteRequest(BaseModel):
region_id: str
workspace_id: Union[list, str, None] = None
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
workspace_id: Union[list, str, None] = None
workspace_id: Union[str, None] = None

Signed-off-by: lhhyung <lhhyung511@megazone.com>
@github-actions
Copy link

⚠️ @lhhyung the signed-off-by was not found in the following 6 commits:

  • 1055076: Merge remote-tracking branch 'upstream/master'
  • d1d458e: Merge branch 'cloudforet-io:master' into master
  • 6f4be2d: Merge branch 'cloudforet-io:master' into master
  • a0135bf: Merge branch 'cloudforet-io:master' into master
  • 384eae9: Merge remote-tracking branch 'origin/master'
  • 1b342dd: Merge remote-tracking branch 'origin/master'

✅ Why it is required

The Developer Certificate of Origin (DCO) is a lightweight way for contributors to certify that they wrote or otherwise have the right to submit the code they are contributing to the project. Here is the full text of the DCO.

Contributors sign-off that they adhere to these requirements by adding a Signed-off-by line to commit messages.

This is my commit message

Signed-off-by: Random Developer <randomdeveloper@example.com>

Git even has a -s command line option to append this automatically to your commit message:

$ git commit -s -m 'This is my commit message'

…thods

Signed-off-by: lhhyung <lhhyung511@megazone.com>
@github-actions
Copy link

⚠️ @lhhyung the signed-off-by was not found in the following 6 commits:

  • 1055076: Merge remote-tracking branch 'upstream/master'
  • d1d458e: Merge branch 'cloudforet-io:master' into master
  • 6f4be2d: Merge branch 'cloudforet-io:master' into master
  • a0135bf: Merge branch 'cloudforet-io:master' into master
  • 384eae9: Merge remote-tracking branch 'origin/master'
  • 1b342dd: Merge remote-tracking branch 'origin/master'

✅ Why it is required

The Developer Certificate of Origin (DCO) is a lightweight way for contributors to certify that they wrote or otherwise have the right to submit the code they are contributing to the project. Here is the full text of the DCO.

Contributors sign-off that they adhere to these requirements by adding a Signed-off-by line to commit messages.

This is my commit message

Signed-off-by: Random Developer <randomdeveloper@example.com>

Git even has a -s command line option to append this automatically to your commit message:

$ git commit -s -m 'This is my commit message'

…equest

Signed-off-by: lhhyung <lhhyung511@megazone.com>
@github-actions
Copy link

⚠️ @lhhyung the signed-off-by was not found in the following 6 commits:

  • 1055076: Merge remote-tracking branch 'upstream/master'
  • d1d458e: Merge branch 'cloudforet-io:master' into master
  • 6f4be2d: Merge branch 'cloudforet-io:master' into master
  • a0135bf: Merge branch 'cloudforet-io:master' into master
  • 384eae9: Merge remote-tracking branch 'origin/master'
  • 1b342dd: Merge remote-tracking branch 'origin/master'

✅ Why it is required

The Developer Certificate of Origin (DCO) is a lightweight way for contributors to certify that they wrote or otherwise have the right to submit the code they are contributing to the project. Here is the full text of the DCO.

Contributors sign-off that they adhere to these requirements by adding a Signed-off-by line to commit messages.

This is my commit message

Signed-off-by: Random Developer <randomdeveloper@example.com>

Git even has a -s command line option to append this automatically to your commit message:

$ git commit -s -m 'This is my commit message'

Copy link
Member

@ImMin5 ImMin5 left a comment

Choose a reason for hiding this comment

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

LGTM

@lhhyung lhhyung merged commit 3edf832 into cloudforet-io:master Dec 11, 2024
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants