Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore: fix terraform/provider testdata to use latest terraform-provider#16309

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
defelmnq merged 2 commits intomainfromclean-tf-testdata
Jan 29, 2025

Conversation

defelmnq
Copy link
Contributor

provisioner/terraform/testdata current version has been generated using outdated version of terraform-provider - with some parameters that are not relevant anymore, causinggenerate.sh to fail when trying to generate new data.

@defelmnqdefelmnq self-assigned thisJan 28, 2025
Copy link
Member

@johnstcnjohnstcn left a comment

Choose a reason for hiding this comment

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

Have we validated that using version 1.x of thecoder/coder provider still works after this change (in a template)?

matifali reacted with eyes emoji
@github-actionsGitHub Actions
Copy link


🚀 Deploying PR 16309 ...

github-actions[bot] reacted with eyes emoji

Copy link
Contributor

@dannykoppingdannykopping left a comment
edited
Loading

Choose a reason for hiding this comment

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

I think we have a wider problem here, if we're concerned about compatibility.

$ grep coder/coder -A1 provisioner/terraform/testdata/**/*.tf -rh| grep version| sort| uniq -c     20       version ="0.22.0"

We have sprawl across our modules, although they at least all evaluate to the latest version:

$ grep coder/coder -A1**/*.tf -rh| grep version| sort| uniq -c      2       version =">= 0.11"     11       version =">= 0.12"      4       version =">= 0.12.4"      9       version =">= 0.17"      7       version =">= 0.23"

Our example templates are a bit all over the place; only 2 of the 18 example templates haveany version constraint, and the two that do:

$ grep'"coder/coder"' -A1 examples/templates/**/*.tf -rh| grep version| uniq -c      2       version ="~> 1.0.0"

willonly get patch versions on the 1.0 release (source), i.e. nothing from1.1 onwards.

I think this is a larger effort that we need to undertake.

We should either remove the version constraint from all modules/templates/testdata to always use the latest version (my preference), or add a linter to ensure they're all set to a specific version.

@defelmnq as an aside, where in this PR did you update the version to the latest? I can't see that in the changes; I just see the result.

@matifali
Copy link
Member

matifali commentedJan 29, 2025
edited
Loading

Our example templates are a bit all over the place; only 2 of the 18 example templates have any version constraint, and the two that do:

We intentionally dropped the version constraint from example templates so that we could encourage the use of the latest providers. A better option would be to set version constraints that we auto-bump when new provider versions are released.


We should definitely drop support forv0.x.x of the provider but ensure we work with versionv1.0.0 and above.

@johnstcn
Copy link
Member

A better option would be to set version constraints that we auto-bump when new provider versions are released.

We could possibly couple this to the release workflow of the provider:

  • After a release, clone the Coder repo at main
  • Run a script that updates the provider version in the required places
  • Commit and push a branch, and create a PR on coder/coder

WDYT@matifali ?

matifali reacted with hooray emoji

@matifali
Copy link
Member

A better option would be to set version constraints that we auto-bump when new provider versions are released.

We could possibly couple this to the release workflow of the provider:

  • After a release, clone the Coder repo at main
  • Run a script that updates the provider version in the required places
  • Commit and push a branch, and create a PR on coder/coder

WDYT@matifali ?

I agree. This should work. We can move this as an issue tocoder/terraform-provider-coder.

johnstcn reacted with thumbs up emoji

@johnstcn
Copy link
Member

johnstcn commentedJan 29, 2025
edited
Loading

For now:

@defelmnq
Copy link
ContributorAuthor

Smoke tested as discussed together - with the following steps :

✅ Started Docker in localusing this version

✅ Defined the terraform-provider version to 1.0.0 using

    coder = {      source = "coder/coder"      version = "1.0.0"    }

in the Docker template.

✅ Built the template, started a workspace, all good.

✅ Tried to use parameters that are deprecated in >2.0.0based on that:

data "coder_git_auth" "example" {  id = "example"}

Worked, with a deprecated warning. (Failed later due to the example used)

Copy link
Member

@johnstcnjohnstcn left a comment

Choose a reason for hiding this comment

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

Thanks for double-checking@defelmnq !

@defelmnqdefelmnq merged commit6caa29a intomainJan 29, 2025
32 checks passed
@defelmnqdefelmnq deleted the clean-tf-testdata branchJanuary 29, 2025 14:26
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsJan 29, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@dannykoppingdannykoppingdannykopping left review comments

@johnstcnjohnstcnjohnstcn approved these changes

@matifalimatifaliAwaiting requested review from matifali

Assignees

@defelmnqdefelmnq

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

4 participants
@defelmnq@matifali@johnstcn@dannykopping

[8]ページ先頭

©2009-2025 Movatter.jp