Skip to content

fix: invalid check in remote content sync logic #1286

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

Closed
wants to merge 2 commits into from

Conversation

wywywywy
Copy link

@wywywywy wywywywy commented Jul 2, 2025

Fixing a mistake introduced in #1274

The checks here are the wrong way round.

This causes a fatal error if the repository doesn't have the contentSynchronisation attribute.

@wywywywy wywywywy requested a review from chukka as a code owner July 2, 2025 14:14
Copy link

github-actions bot commented Jul 2, 2025

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@wywywywy
Copy link
Author

wywywywy commented Jul 2, 2025

I have read the CLA Document and I hereby sign the CLA

@wywywywy
Copy link
Author

wywywywy commented Jul 2, 2025

recheck

@srinivasgowda097
Copy link
Collaborator

@wywywywy : Could you please share a sample example where it is failing with a fatal error, and also mention the provider version?

@wywywywy
Copy link
Author

wywywywy commented Jul 2, 2025

Broken in v12.9.6, worked in v12.9.5.

Do a terraform plan with token that's not a project admin. When it's not a project admin, the GET request of the repositories REST API call doesn't return the contentSynchronisation attribute.

@wywywywy
Copy link
Author

wywywywy commented Jul 2, 2025

This is the relevant line in v12.9.5

if apiModel.ContentSynchronisation != nil && apiModel.ContentSynchronisation.Enabled {

@srinivasgowda097
Copy link
Collaborator

@wywywywy Here is the PR: #1295, which addresses your use case. We are closing your PR, as it comprehensively covers all relevant combinations

@wywywywy
Copy link
Author

Thanks. I'll retest when the new version is released.

@srinivasgowda097
Copy link
Collaborator

@wywywywy v12.10.0 is released.

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

Successfully merging this pull request may close these issues.

2 participants