Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Terraform SDK to V2 #1139

Merged

Conversation

ozerovandrei
Copy link
Member

@ozerovandrei ozerovandrei commented Jan 21, 2021

Use v2.7.1 version of terraform-plugin-sdk.

Cleanup imports.

Change validation.SingleIP() -> validation.IsIPAddress,
validation.ValidateRFC3339TimeString -> validation.IsRFC3339Time.

Replace Removed Schema property with Deprecated.

Provide context into CustomizeDiff functions.

Use functions with the new signatures to configure the Provider with
Terraform SDK V2.

Add context into resourceImagesImageV2UpdateComputedAttributes.

Fix gofmt in pathorcontents package.

Fix networking_port_v2 datasource issue: "profile: StateFunc is
extraneous, value should just be changed before setting on computed-only
field" by removing custom StateFunc.

Fix containerinfra_cluster_v1 resource issuze: "kubeconfig: TypeMap with
Elem *Resource not supported, use TypeList/TypeSet with Elem *Resource
or TypeMap with Elem *Schema" by changing type to Type.Schema and
updating flattenContainerInfraV1Kubeconfig function.

Change the deprecated "Providers" field of resource.Test to
"ProviderFactories".

Use CreateContext, ReadContext, UpdateContext, DeleteContext instead of
deprecated resource functions. Use diag.Diagnostics and Context for
those functions.

Disable TestAccComputeV2SecGroup_self,
TestAccComputeV2SecGroup_lowerCaseCIDR, TestAccNetworkingV2Subnet_allocationPool
tests since SDK V2 currently does not support indexes into TypeSet.

Disable TestAccComputeV2FloatingIPAssociate_attachToFirstNetwork test
since SDK V2 fails with collection error.

Add image_name, power_state attributes to compute_instance_v2 datasource
since we try to set them just like in resource.

Convert blockstorage quotaset volume types map to map of strings before
calling Set.

Update TestAccBlockStorageQuotasetV3_basic volume types quotas.

Disabled flacky TestAccNetworkingV2Trunk_trunkUpdateSubports test since
it can fail with PortInUse error.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Jan 21, 2021

Build failed.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Feb 3, 2021

Merge Failed.

This change or one of its cross-repo dependencies was unable to be automatically merged with the current state of its repository. Please rebase the change and upload a new patchset.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Feb 8, 2021

Build failed.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Feb 27, 2021

Build failed.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Jun 19, 2021

@theopenlab-ci
Copy link

theopenlab-ci bot commented Jun 19, 2021

@ozerovandrei ozerovandrei marked this pull request as ready for review June 19, 2021 14:43
@theopenlab-ci
Copy link

theopenlab-ci bot commented Jun 19, 2021

Build failed.

@nikParasyr
Copy link
Member

recheck

@theopenlab-ci
Copy link

theopenlab-ci bot commented Jul 5, 2021

@theopenlab-ci
Copy link

theopenlab-ci bot commented Aug 1, 2021

@ozerovandrei
Copy link
Member Author

recheck

@theopenlab-ci
Copy link

theopenlab-ci bot commented Aug 1, 2021

Build failed.

@ozerovandrei
Copy link
Member Author

recheck

@theopenlab-ci
Copy link

theopenlab-ci bot commented Aug 3, 2021

@ozerovandrei
Copy link
Member Author

recheck

@theopenlab-ci
Copy link

theopenlab-ci bot commented Aug 5, 2021

@ozerovandrei
Copy link
Member Author

2021-08-04 01:33:03.350195 | TASK [fetch-zuul-cloner : Install zuul-cloner shim dependencies]
2021-08-04 01:33:04.775880 | ubuntu-focal | ERROR
2021-08-04 01:33:04.776159 | ubuntu-focal | {
2021-08-04 01:33:04.776199 | ubuntu-focal |   "exception": "Traceback (most recent call last):\n  File \"/tmp/ansible_pip_payload_HbJNZV/ansible_pip_payload.zip/ansible/modules/packaging/language/pip.py\", line 271, in <module>\nImportError: No module named pkg_resources\n",
2021-08-04 01:33:04.776227 | ubuntu-focal |   "msg": "Failed to import the required Python library (setuptools) on ubuntu's Python /usr/bin/python2. Please read module documentation and install in the appropriate location. If the required library is installed, but Ansible is using the wrong Python interpreter, please consult the documentation on ansible_python_interpreter"
2021-08-04 01:33:04.776251 | ubuntu-focal | }

@ozerovandrei
Copy link
Member Author

Related issue: theopenlab/openlab#808

@ozerovandrei
Copy link
Member Author

recheck

@theopenlab-ci
Copy link

theopenlab-ci bot commented Sep 8, 2021

@ozerovandrei
Copy link
Member Author

recheck

@theopenlab-ci
Copy link

theopenlab-ci bot commented Sep 9, 2021

@theopenlab-ci
Copy link

theopenlab-ci bot commented Sep 10, 2021

@theopenlab-ci
Copy link

theopenlab-ci bot commented Sep 10, 2021

@theopenlab-ci
Copy link

theopenlab-ci bot commented Sep 11, 2021

@theopenlab-ci
Copy link

theopenlab-ci bot commented Sep 12, 2021

@ozerovandrei
Copy link
Member Author

recheck

@theopenlab-ci
Copy link

theopenlab-ci bot commented Sep 12, 2021

@ozerovandrei
Copy link
Member Author

recheck

@theopenlab-ci
Copy link

theopenlab-ci bot commented Sep 13, 2021

@ozerovandrei
Copy link
Member Author

recheck

@theopenlab-ci
Copy link

theopenlab-ci bot commented Sep 14, 2021

@ozerovandrei
Copy link
Member Author

recheck

@theopenlab-ci
Copy link

theopenlab-ci bot commented Sep 18, 2021

@theopenlab-ci
Copy link

theopenlab-ci bot commented Sep 21, 2021

Use v2.7.1 version of terraform-plugin-sdk.

Cleanup imports.

Change `validation.SingleIP()` -> `validation.IsIPAddress`,
`validation.ValidateRFC3339TimeString` -> `validation.IsRFC3339Time`.

Replace `Removed` Schema property with `Deprecated`.

Provide context into CustomizeDiff functions.

Use functions with the new signatures to configure the Provider with
Terraform SDK V2.

Add context into resourceImagesImageV2UpdateComputedAttributes.

Fix gofmt in pathorcontents package.

Fix networking_port_v2 datasource issue: "profile: StateFunc is
extraneous, value should just be changed before setting on computed-only
field" by removing custom StateFunc.

Fix containerinfra_cluster_v1 resource issuze: "kubeconfig: TypeMap with
Elem *Resource not supported, use TypeList/TypeSet with Elem *Resource
or TypeMap with Elem *Schema" by changing type to Type.Schema and
updating flattenContainerInfraV1Kubeconfig function.

Change the deprecated "Providers" field of resource.Test to
"ProviderFactories".

Use CreateContext, ReadContext, UpdateContext, DeleteContext instead of
deprecated resource functions. Use diag.Diagnostics and Context for
those functions.

Disable `TestAccComputeV2SecGroup_self`,
`TestAccComputeV2SecGroup_lowerCaseCIDR`, `TestAccNetworkingV2Subnet_allocationPool`
tests since SDK V2 currently does not support indexes into TypeSet.

Disable `TestAccComputeV2FloatingIPAssociate_attachToFirstNetwork` test
since SDK V2 fails with collection error.

Add `image_name`, `power_state` attributes to `compute_instance_v2` datasource
since we try to set them just like in resource.

Convert blockstorage quotaset volume types map to map of strings before
calling Set.

Update `TestAccBlockStorageQuotasetV3_basic` volume types quotas.

Disabled flacky `TestAccNetworkingV2Trunk_trunkUpdateSubports` test since
it can fail with `PortInUse` error.
@theopenlab-ci
Copy link

theopenlab-ci bot commented Sep 22, 2021

Build succeeded.

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.

None yet

2 participants