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

Ref data source contains incomplete code #1108

Closed
youcandanch opened this issue Apr 9, 2022 · 4 comments
Closed

Ref data source contains incomplete code #1108

youcandanch opened this issue Apr 9, 2022 · 4 comments

Comments

@youcandanch
Copy link
Contributor

Terraform Version

1.1.8

Affected Data Source

  • ref

Terraform Configuration Files

provider "github" {}
data "github_ref" "this" {
  owner      = "integrations"
  repository = "terraform-provider-github"
  ref        = "tags/v4.23.0"
}

Expected Behavior

Should get back ref information on the branch/tag.

Actual Behavior

│ Error: Missing required argument
│
│   on github.tf line 46, in data "github_ref" "this":
│   46: data "github_ref" "this" {
│
│ The argument "branch" is required, but no definition was found.

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. Grab the snippet above, and throw it in a Terraform file.
  2. Try a terraform plan.

Important Factoids

It looks like when I introduced this data source in #1084, the last commit on the branch was from an older working version. I'm going to open a PR to fix this, but also going to eye the unit tests from that PR, as I'm a little bit perplexed as to how tests ended up passing.

References

@youcandanch
Copy link
Contributor Author

@kfcampbell just want to make sure I understand something about workflow with this repo -- are tests supposed to run on push? It looks like they're in the CI file, but not actually running. This is the most recent build (as of right now) on main:

https://github.com/integrations/terraform-provider-github/runs/5890079414?check_suite_focus=true

...and it looks like the test step finishes in anywhere from 10-15s, with this as the output:

image

If this is intentional that's totally fine, but if it's not I'll open a separate issue for that.

@kfcampbell
Copy link
Member

@youcandanch our testing situation is a little goofy right now. We're running unit tests on push, which are executing quite quickly as you've pointed out. Integration tests are run weekly, although they've been reliably failing for some time and aren't currently bringing much value to the product.

Once a few immediate fires are put out (EMU support, Dependabot secrets, authorization fixes) I would love to find some time to put towards our testing strategy to gain more confidence with releases.

@youcandanch
Copy link
Contributor Author

@kfcampbell totally understood, only so many hours in the day. Happy to help where I can!

@youcandanch
Copy link
Contributor Author

Using this in a project now totally smoothly, so gonna close this out as resolved.

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

No branches or pull requests

2 participants