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

Feat/improvement for data sources #289

Open
wants to merge 132 commits into
base: fix/consistent_data_sources
Choose a base branch
from

Conversation

gabriel-savu
Copy link
Contributor

@gabriel-savu gabriel-savu commented Jun 30, 2022

What does this fix or implement?

Checklist

  • PR name added as appropriate (e.g. feat:/fix:/doc:/test:/refactor:)
  • Tests added or updated
  • Documentation updated
  • Changelog updated and version incremented (label: upcoming release)
  • Github Issue linked if any
  • Jira task updated

iblindu and others added 22 commits April 27, 2022 14:39
* fix: k8s_nodepool test

* docs: updated CHANGELOG.md

* fix: k8s_nodepool test
…vider-ionoscloud into feat/improvement-for-data-sources

� Conflicts:
�	ionoscloud/data_source_image.go
�	ionoscloud/resource_natgateway_test.go
ionoscloud/data_source_dbaas_pgsql_cluster.go Show resolved Hide resolved
ionoscloud/data_source_dbaas_pgsql_cluster.go Outdated Show resolved Hide resolved
ionoscloud/data_source_dbaas_pgsql_cluster.go Show resolved Hide resolved
ionoscloud/data_source_dbaas_pgsql_cluster.go Outdated Show resolved Hide resolved
ionoscloud/data_source_dbaas_pgsql_cluster.go Outdated Show resolved Hide resolved
ionoscloud/data_source_natgateway_rule.go Show resolved Hide resolved
ionoscloud/data_source_natgateway_rule.go Outdated Show resolved Hide resolved
ionoscloud/data_source_natgateway_rule.go Outdated Show resolved Hide resolved
ionoscloud/data_source_networkloadbalancer.go Show resolved Hide resolved
ionoscloud/data_source_networkloadbalancer.go Outdated Show resolved Hide resolved
@iblindu
Copy link
Contributor

iblindu commented Jul 1, 2022

When it comes to data-sources the general feedback is:

  • documentation should be updated with all new arguments
  • errors should also be updated where needed
  • the comment form data_source_dbaas_cluster is available in almost all data sources

This block with ListClusters should be in the else branch of partial match (like before) since if partial match is set you are making an additional unnecessary call. Also taking into consideration that you've added additional parameters, you should firstly verify nameOk, and after this the partial_match, since you don't want to filter by name if the user did not want this (if you have tests with this, something is wrong there).
On the else branch of nameOk you can make another ListClusters call to be sure that result have all clusters for the filters after.

@sonarcloud
Copy link

sonarcloud bot commented Jul 21, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 10 Code Smells

No Coverage information No Coverage information
3.3% 3.3% Duplication

Gabriel Savu and others added 30 commits December 12, 2022 20:54
* add DBaaS Mongo Template data source

* add tests and documentation
…or volume basic test and updated changelog
…vider-ionoscloud into fix/create-share-mixup

# Conflicts:
#	CHANGELOG.md
fix: mix up share and edit privileges on create
…vider-ionoscloud into feat/improvement-for-data-sources

# Conflicts:
#	docs/data-sources/user.md
#	go.sum
#	ionoscloud/constants.go
#	ionoscloud/data_source_backup_unit.go
#	ionoscloud/data_source_datacenter.go
#	ionoscloud/data_source_dbaas_pgsql_cluster.go
#	ionoscloud/data_source_firewall.go
#	ionoscloud/data_source_group.go
#	ionoscloud/data_source_ipblock.go
#	ionoscloud/data_source_k8s_cluster.go
#	ionoscloud/data_source_k8s_node_pool.go
#	ionoscloud/data_source_lan.go
#	ionoscloud/data_source_location.go
#	ionoscloud/data_source_natgateway.go
#	ionoscloud/data_source_natgateway_rule.go
#	ionoscloud/data_source_networkloadbalancer.go
#	ionoscloud/data_source_networkloadbalancer_forwardingrule.go
#	ionoscloud/data_source_private_crossconnect.go
#	ionoscloud/data_source_snapshot.go
#	ionoscloud/data_source_user.go
#	ionoscloud/data_source_volume.go
#	ionoscloud/resource_k8s_node_pool_test.go
#	ionoscloud/resource_user_test.go
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

7 participants