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

Fix: provider can't be added since 1.4 as context abused && Feat: add cache for remote terraform module in vela show #4256

Merged
merged 3 commits into from Jun 27, 2022

Conversation

wonderflow
Copy link
Collaborator

@wonderflow wonderflow commented Jun 25, 2022

Signed-off-by: Jianbo Sun jianbo.sjb@alibaba-inc.com

Description of your changes

  • Fixes the error:
vela provider add terraform-alibaba --ALICLOUD_ACCESS_KEY xxx --ALICLOUD_SECRET_KEY xxx --ALICLOUD_REGION cn-hangzhou
Error: failed to authenticate Terraform cloud provider terraform-alibaba err: failed to authenticate Terraform cloud provider default for terraform-alibaba: context canceled
  • Feat: add cache for remote terraform module in vela show

I have:

  • Read and followed KubeVela's contribution process.
  • Related Docs updated properly. In a new feature or configuration option, an update to the documentation is necessary.
  • Run make reviewable to ensure this PR is ready for review.
  • Added backport release-x.y labels to auto-backport this PR if necessary.

How has this code been tested

Special notes for your reviewer

@wonderflow wonderflow added the backport release-1.4 add this label will automatically backport this PR to release-1.4 branch label Jun 25, 2022
@codecov
Copy link

codecov bot commented Jun 25, 2022

Codecov Report

Merging #4256 (438145b) into master (15a5640) will increase coverage by 0.54%.
The diff coverage is 78.57%.

@@            Coverage Diff             @@
##           master    #4256      +/-   ##
==========================================
+ Coverage   59.87%   60.41%   +0.54%     
==========================================
  Files         338      338              
  Lines       32909    32908       -1     
==========================================
+ Hits        19703    19881     +178     
+ Misses      10594    10415     -179     
  Partials     2612     2612              
Flag Coverage Δ
apiserver-unittests 34.53% <0.00%> (-0.09%) ⬇️
core-unittests 55.19% <42.85%> (+0.01%) ⬆️
e2e-multicluster-test 20.47% <0.00%> (+<0.01%) ⬆️
e2e-rollout-tests 22.33% <76.92%> (+0.01%) ⬆️
e2etests 29.38% <76.92%> (-4.19%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...ler/core.oam.dev/v1alpha2/application/generator.go 87.22% <ø> (ø)
pkg/utils/config/application.go 0.00% <0.00%> (ø)
pkg/controller/utils/capability.go 80.70% <83.33%> (+1.28%) ⬆️
...troller/core.oam.dev/v1alpha2/application/apply.go 86.81% <100.00%> (+1.09%) ⬆️
...kg/apiserver/infrastructure/datastore/datastore.go 66.66% <0.00%> (-11.12%) ⬇️
...tepdefinition/workflowstepdefinition_controller.go 58.51% <0.00%> (-10.64%) ⬇️
pkg/apiserver/event/sync/cr2ux.go 40.29% <0.00%> (-8.96%) ⬇️
pkg/apiserver/event/sync/worker.go 71.73% <0.00%> (-4.35%) ⬇️
...server/infrastructure/datastore/kubeapi/kubeapi.go 63.49% <0.00%> (-3.43%) ⬇️
pkg/apiserver/domain/service/application.go 59.81% <0.00%> (-0.21%) ⬇️
... and 29 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 15a5640...438145b. Read the comment docs.

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
@wonderflow wonderflow changed the title Fix: provider can't be added since 1.4 as context abused Fix: provider can't be added since 1.4 as context abused && Feat: add cache for remote terraform module in vela show Jun 25, 2022
@wonderflow wonderflow force-pushed the fixprovider branch 3 times, most recently from a3ccfce to b221e09 Compare June 25, 2022 21:32
@wonderflow wonderflow force-pushed the fixprovider branch 2 times, most recently from 368c931 to 7c45e20 Compare June 26, 2022 00:41
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
tmpPath := filepath.Join("./tmp/terraform", name)
// Check if the directory exists. If yes, remove it.
if _, err := os.Stat(tmpPath); err == nil {
err := os.RemoveAll(tmpPath)
Copy link
Collaborator

Choose a reason for hiding this comment

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

When will the cache path be cleaned up?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

users manually cleaned that

@github-actions
Copy link

Successfully created backport PR #4263 for release-1.4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport release-1.4 add this label will automatically backport this PR to release-1.4 branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants