Skip to content

Fix an issue which cause failure when updating a sub-CA #12495

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

Merged
merged 1 commit into from
Dec 9, 2024

Conversation

gfxcc
Copy link
Contributor

@gfxcc gfxcc commented Dec 5, 2024

See b/382313978 for details

Release Note Template for Downstream PRs (will be copied)

See Write release notes for guidance.

privateca: fixed an issue which causes error when updating labels for activated sub-CA

@github-actions github-actions bot requested a review from ScottSuarez December 5, 2024 03:04
Copy link

github-actions bot commented Dec 5, 2024

Hello! I am a robot. Tests will require approval from a repository maintainer to run.

@ScottSuarez, a repository maintainer, has been assigned to review your changes. If you have not received review feedback within 2 business days, please leave a comment on this PR asking them to take a look.

You can help make sure that review is quick by doing a self-review and by running impacted tests locally.

@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 2 files changed, 64 insertions(+), 3 deletions(-))
google-beta provider: Diff ( 2 files changed, 64 insertions(+), 3 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 40
Passed tests: 32
Skipped tests: 8
Affected tests: 0

Click here to see the affected service packages
  • privateca
#### Non-exercised tests

🔴 Tests were added that are skipped in VCR:

  • TestAccPrivatecaCertificateAuthority_subordinateCaCanUpdateLabel
    🟢 All tests passed!

View the build log

// directly by older version of providers.
// For backward compatibility, delete `certificateAuthority` only if `pemIssuerChain` is presented.
if _, ok := subConfig["pemIssuerChain"]; ok {
delete(subConfig, "certificateAuthority")
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm worried about API state here.

We are explicitly removing certificateAuthority from the API request then it is possible API state will no longer retain subordinateConfig.certificateAuthority while the users config will. Resulting in a diff.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

certificateAuthority was not be sent to API backend. It was only used to fetch pemIssuerChain which is the value specified when calling backend.
With that, certificateAuthority only stay locally.

Copy link
Contributor

Choose a reason for hiding this comment

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

@ScottSuarez
Copy link
Contributor

I also left a comment on the bug. I am not sure why API is not respecting updateMask here

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.

3 participants