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 gitlab_project_id changes every apply #145

Merged
merged 5 commits into from
Sep 22, 2021

Conversation

razbensimon
Copy link
Contributor

@razbensimon razbensimon commented Sep 19, 2021

Issue & Steps to Reproduce / Feature Request

gitlab_project_id always gets changed on TF apply.

image

Solution

  • remove the Set call because this field doesn't exist on the blueprint
  • change readme for less mistakes with personal paths
  • fix broken existing test + add test

@razbensimon
Copy link
Contributor Author

@razbensimon razbensimon self-assigned this Sep 19, 2021
@razbensimon razbensimon requested a review from a team September 19, 2021 08:31
@@ -243,7 +243,6 @@ func resourceTemplateRead(ctx context.Context, d *schema.ResourceData, meta inte
d.Set("description", template.Description)
d.Set("github_installation_id", template.GithubInstallationId)
d.Set("token_id", template.TokenId)
d.Set("gitlab_project_id", template.GitlabProjectId)
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we cover this with some test?
It feels like we aren't asserting that the value is set after create/update.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

3fbecee

I am not sure if I did it correctly or if I missed something on mocks. please take a look @yaronya

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed 7ae0d91

@razbensimon
Copy link
Contributor Author

f9f9cd3 fixed broken test

@eranelbaz
Copy link
Member

@razbensimon looks like something is still broken here

@razbensimon
Copy link
Contributor Author

@yaronya please rereview

@razbensimon razbensimon merged commit a399839 into main Sep 22, 2021
@razbensimon razbensimon deleted the fix-gitlab-project-id-changes branch September 22, 2021 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants