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: added missing examples and plugged test gaps #384

Merged
merged 14 commits into from
Feb 5, 2025
Merged

Conversation

Aditya-ranjan-16
Copy link
Contributor

@Aditya-ranjan-16 Aditya-ranjan-16 commented Jan 9, 2025

Description

added missing examples and covered test gaps

GIT Issue

Release required?

  • No release
  • Patch release (x.x.X)
  • Minor release (x.X.x)
  • Major release (X.x.x)
Release notes content

adds missing examples and covers test gaps

Run the pipeline

If the CI pipeline doesn't run when you create the PR, the PR requires a user with GitHub collaborators access to run the pipeline.

Run the CI pipeline when the PR is ready for review and you expect tests to pass. Add a comment to the PR with the following text:

/run pipeline

Checklist for reviewers

  • If relevant, a test for the change is included or updated with this PR.
  • If relevant, documentation for the change is included or updated with this PR.

For mergers

  • Use a conventional commit message to set the release level. Follow the guidelines.
  • Include information that users need to know about the PR in the commit message. The commit message becomes part of the GitHub release notes.
  • Use the Squash and merge option.

@Aditya-ranjan-16 Aditya-ranjan-16 changed the title [WIP]feat: added missing examples and plugged test gaps feat: added missing examples and plugged test gaps Jan 27, 2025
@Aditya-ranjan-16 Aditya-ranjan-16 marked this pull request as ready for review January 27, 2025 08:01
@Aditya-ranjan-16
Copy link
Contributor Author

/run pipeline

@Aditya-ranjan-16 Aditya-ranjan-16 linked an issue Jan 27, 2025 that may be closed by this pull request
@Aditya-ranjan-16
Copy link
Contributor Author

/run pipeline

@Aditya-ranjan-16
Copy link
Contributor Author

/run pipeline

@Aditya-ranjan-16
Copy link
Contributor Author

pipeline failing by the error

    tests.go:140: 
        	Error Trace:	/go/pkg/mod/github.com/terraform-ibm-modules/[email protected]/testschematic/tests.go:140
        	            				/__w/terraform-ibm-icd-elasticsearch/terraform-ibm-icd-elasticsearch/tests/pr_test.go:146
        	Error:      	Received unexpected error:
        	            	time exceeded waiting for schematic job to finish
        	Test:       	TestRunStandardSolutionSchematics
        	Messages:   	error waiting for APPLY to finish - [ els-sr-da-fllhsk (us-south.workspace.els-sr-da-fllhsk.3db90209) ]
    schematics.go:367: [SCHEMATICS] RETRY DestroyWorkspaceCommand, status code: 409
    schematics.go:367: [SCHEMATICS] RETRY DestroyWorkspaceCommand, status code: 409
    schematics.go:367: [SCHEMATICS] RETRY DestroyWorkspaceCommand, status code: 409
    schematics.go:367: [SCHEMATICS] RETRY DestroyWorkspaceCommand, status code: 409
    schematics.go:367: [SCHEMATICS] RETRY DestroyWorkspaceCommand, status code: 409
    tests.go:155: 
        	Error Trace:	/go/pkg/mod/github.com/terraform-ibm-modules/[email protected]/testschematic/tests.go:155
        	            				/__w/terraform-ibm-icd-elasticsearch/terraform-ibm-icd-elasticsearch/tests/pr_test.go:146
        	Error:      	Received unexpected error:
        	            	The workspace was temporarily locked by [email protected] at 2025-01-27 09:28:06.763463705 +0000 UTC. Please wait until any current actions against your Workspace have completed.
        	Test:       	TestRunStandardSolutionSchematics
        	Messages:   	error creating DESTROY - [ els-sr-da-fllhsk (us-south.workspace.els-sr-da-fllhsk.3db90209) ]
--- FAIL: TestRunStandardSolutionSchematics (3927.42s)

re-running the pipeline

@Aditya-ranjan-16
Copy link
Contributor Author

/run pipeline

@Aditya-ranjan-16
Copy link
Contributor Author

pipeline failing by the error

Error: StandardUpgradeSolution 2025-01-27T11:43:36Z logger.go:66: │ Error: [ERROR] Error while creating key ring : kp.Error: correlation_id='65d51186-fb41-4c44-8de6-344e9bef892e', msg='This operation cannot be completed. Please try your request at a later time. If the issue persists, please contact IBM KeyProtect.'
TestRunStandardUpgradeSolution 2025-01-27T11:43:36Z logger.go:66: │ 
TestRunStandardUpgradeSolution 2025-01-27T11:43:36Z logger.go:66: │   with module.kms[0].module.kms_key_rings["elasticsearch-key-ring"].ibm_kms_key_rings.key_ring,
TestRunStandardUpgradeSolution 2025-01-27T11:43:36Z logger.go:66: │   on .terraform/modules/kms.kms_key_rings/main.tf line 5, in resource "ibm_kms_key_rings" "key_ring":
TestRunStandardUpgradeSolution 2025-01-27T11:43:36Z logger.go:66: │    5: resource "ibm_kms_key_rings" "key_ring" {
TestRunStandardUpgradeSolution 2025-01-27T11:43:36Z logger.go:66: │ 
TestRunStandardUpgradeSolution 2025-01-27T11:43:36Z logger.go:66: │ ---
TestRunStandardUpgradeSolution 2025-01-27T11:43:36Z logger.go:66: │ id: terraform-46882f4c
Error: StandardUpgradeSolution 2025-01-27T11:43:36Z logger.go:66: │ summary: '[ERROR] Error while creating key ring : kp.Error:
TestRunStandardUpgradeSolution 2025-01-27T11:43:36Z logger.go:66: │ correlation_id=''65d51186-fb41-4c44-8de6-344e9bef892e'',
TestRunStandardUpgradeSolution 2025-01-27T11:43:36Z logger.go:66: │   msg=''This operation cannot be completed. Please try your request at a later time.
TestRunStandardUpgradeSolution 2025-01-27T11:43:36Z logger.go:66: │   If the issue persists, please contact IBM KeyProtect.'''
TestRunStandardUpgradeSolution 2025-01-27T11:43:36Z logger.go:66: │ severity: error
TestRunStandardUpgradeSolution 2025-01-27T11:43:36Z logger.go:66: │ resource: ibm_kms_key_rings
TestRunStandardUpgradeSolution 2025-01-27T11:43:36Z logger.go:66: │ operation: create
TestRunStandardUpgradeSolution 2025-01-27T11:43:36Z logger.go:66: │ component:
TestRunStandardUpgradeSolution 2025-01-27T11:43:36Z logger.go:66: │   name: github.com/IBM-Cloud/terraform-provider-ibm
TestRunStandardUpgradeSolution 2025-01-27T11:43:36Z logger.go:66: │   version: 1.74.0
TestRunStandardUpgradeSolution 2025-01-27T11:43:36Z logger.go:66: │ ---
TestRunStandardUpgradeSolution 2025-01-27T11:43:36Z logger.go:66: │ 
TestRunStandardUpgradeSolution 2025-01-27T11:43:36Z logger.go:66: ╵

re-running the pipeline

@Aditya-ranjan-16
Copy link
Contributor Author

/run pipeline

@Aashiq-J Aashiq-J mentioned this pull request Jan 28, 2025
6 tasks
@shemau
Copy link
Contributor

shemau commented Jan 28, 2025

pipeline failing by the error

Error: StandardUpgradeSolution 2025-01-27T11:43:36Z logger.go:66: │ Error: [ERROR] Error while creating key ring : kp.Error: correlation_id='65d51186-fb41-4c44-8de6-344e9bef892e', msg='This operation cannot be completed. Please try your request at a later time. If the issue persists, please contact IBM KeyProtect.'
TestRunStandardUpgradeSolution 2025-01-27T11:43:36Z logger.go:66: │ 
TestRunStandardUpgradeSolution 2025-01-27T11:43:36Z logger.go:66: │   with module.kms[0].module.kms_key_rings["elasticsearch-key-ring"].ibm_kms_key_rings.key_ring,
TestRunStandardUpgradeSolution 2025-01-27T11:43:36Z logger.go:66: │   on .terraform/modules/kms.kms_key_rings/main.tf line 5, in resource "ibm_kms_key_rings" "key_ring":
TestRunStandardUpgradeSolution 2025-01-27T11:43:36Z logger.go:66: │    5: resource "ibm_kms_key_rings" "key_ring" {
TestRunStandardUpgradeSolution 2025-01-27T11:43:36Z logger.go:66: │ 
TestRunStandardUpgradeSolution 2025-01-27T11:43:36Z logger.go:66: │ ---
TestRunStandardUpgradeSolution 2025-01-27T11:43:36Z logger.go:66: │ id: terraform-46882f4c
Error: StandardUpgradeSolution 2025-01-27T11:43:36Z logger.go:66: │ summary: '[ERROR] Error while creating key ring : kp.Error:
TestRunStandardUpgradeSolution 2025-01-27T11:43:36Z logger.go:66: │ correlation_id=''65d51186-fb41-4c44-8de6-344e9bef892e'',
TestRunStandardUpgradeSolution 2025-01-27T11:43:36Z logger.go:66: │   msg=''This operation cannot be completed. Please try your request at a later time.
TestRunStandardUpgradeSolution 2025-01-27T11:43:36Z logger.go:66: │   If the issue persists, please contact IBM KeyProtect.'''
TestRunStandardUpgradeSolution 2025-01-27T11:43:36Z logger.go:66: │ severity: error
TestRunStandardUpgradeSolution 2025-01-27T11:43:36Z logger.go:66: │ resource: ibm_kms_key_rings
TestRunStandardUpgradeSolution 2025-01-27T11:43:36Z logger.go:66: │ operation: create
TestRunStandardUpgradeSolution 2025-01-27T11:43:36Z logger.go:66: │ component:
TestRunStandardUpgradeSolution 2025-01-27T11:43:36Z logger.go:66: │   name: github.com/IBM-Cloud/terraform-provider-ibm
TestRunStandardUpgradeSolution 2025-01-27T11:43:36Z logger.go:66: │   version: 1.74.0
TestRunStandardUpgradeSolution 2025-01-27T11:43:36Z logger.go:66: │ ---
TestRunStandardUpgradeSolution 2025-01-27T11:43:36Z logger.go:66: │ 
TestRunStandardUpgradeSolution 2025-01-27T11:43:36Z logger.go:66: ╵

re-running the pipeline

This was because the KMS (us-south HPCS) was being upgraded/migrated at the time the test ran.

Copy link
Contributor

@shemau shemau left a comment

Choose a reason for hiding this comment

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

At a higher level, it should be unnecessary to include common-dev-assets in a PR. This should be bumped on a standalone cycle and by including it, there is a risk of merge conflicts as the main branch changes or potentially rolling it back.

It is good to see backup-restore coverage being added to elasticsearch. However, when compared to etcd and mongodb example it is different. The ICD module tests should be converging, not diverging with every commit.

The basic example changes are good. Converging the source, so that it is more consistent across modules. This reduces maintenance moving forward, allow for cut-n-paste or possibly cherry picking changes from one module to another.

examples/backup-restore/main.tf Show resolved Hide resolved
examples/backup-restore/variables.tf Show resolved Hide resolved
examples/backup-restore/variables.tf Outdated Show resolved Hide resolved
examples/backup-restore/variables.tf Outdated Show resolved Hide resolved
solutions/standard/main.tf Show resolved Hide resolved
tests/pr_test.go Show resolved Hide resolved
@Aditya-ranjan-16
Copy link
Contributor Author

/run pipeline

@Aditya-ranjan-16
Copy link
Contributor Author

/run pipeline

@Aditya-ranjan-16
Copy link
Contributor Author

/run pipeline

@Aditya-ranjan-16
Copy link
Contributor Author

At a higher level, it should be unnecessary to include common-dev-assets in a PR. This should be bumped on a standalone cycle and by including it, there is a risk of merge conflicts as the main branch changes or potentially rolling it back.

It is good to see backup-restore coverage being added to elasticsearch. However, when compared to etcd and mongodb example it is different. The ICD module tests should be converging, not diverging with every commit.

The basic example changes are good. Converging the source, so that it is more consistent across modules. This reduces maintenance moving forward, allow for cut-n-paste or possibly cherry picking changes from one module to another.

The main branch common-dev-assets was last updated a long time back 3 months ago , and it doesn't include the latest elastic search permanent CRN I added recently . hence I updated common-dev-assets to point to a latest commit in my branch

Not sure why this is the case , but I don't see any recent renovate PR to update CI depnedecies

@shemau
Copy link
Contributor

shemau commented Feb 4, 2025

/run pipeline

shemau
shemau previously approved these changes Feb 4, 2025
Copy link
Contributor

@shemau shemau left a comment

Choose a reason for hiding this comment

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

LGTM

I will follow up as to why renovate is not bumping common-dev-assets automatically.

@ocofaigh
Copy link
Member

ocofaigh commented Feb 4, 2025

/run pipeline

@Aditya-ranjan-16
Copy link
Contributor Author

/run pipeline

@Aditya-ranjan-16
Copy link
Contributor Author

/run pipeline

@Aditya-ranjan-16
Copy link
Contributor Author

/run pipeline

@Aditya-ranjan-16
Copy link
Contributor Author

/run pipeline

@Aditya-ranjan-16 Aditya-ranjan-16 self-assigned this Feb 5, 2025
Copy link
Contributor

@shemau shemau left a comment

Choose a reason for hiding this comment

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

LGTM. All issues addressed.

@ocofaigh
Copy link
Member

ocofaigh commented Feb 5, 2025

@Aditya-ranjan-16 FYI, there are no code changes to the module or DA, just the example and test - so this means we do no need a new release. See Release versioning for more info

@ocofaigh ocofaigh merged commit 2095c3d into main Feb 5, 2025
2 checks passed
@ocofaigh ocofaigh deleted the test-coverage branch February 5, 2025 14:23
@terraform-ibm-modules-ops
Copy link
Contributor

🎉 This PR is included in version 1.28.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Review module test coverage/gaps
5 participants