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

release-21.2: sqlproxyccl: Add codeUnavailable to the list of error codes #77848

Conversation

alyshanjahani-crl
Copy link
Collaborator

Backport 1/1 commits from #77442.

/cc @cockroachdb/release


Release justification: fixes for high-priority bug in existing functionality

Previously, if a tenant cluster had maxPods set to 0 the error returned by
directory.EnsureTenantAddr was not treated as a non-retryable error.

The tenant directory implementation used in CockroachCloud now identifies
this situation and returns a status error with codes.FailedPrecondition and
a descriptive message.

This patch adds a check for the FailedPrecondition error in
connector.lookupAddr.

Release note: None

@alyshanjahani-crl alyshanjahani-crl requested review from a team as code owners March 15, 2022 16:56
@blathers-crl
Copy link

blathers-crl bot commented Mar 15, 2022

Thanks for opening a backport.

Please check the backport criteria before merging:

  • Patches should only be created for serious issues or test-only changes.
  • Patches should not break backwards-compatibility.
  • Patches should change as little code as possible.
  • Patches should not change on-disk formats or node communication protocols.
  • Patches should not add new functionality.
  • Patches must not add, edit, or otherwise modify cluster versions; or add version gates.
If some of the basic criteria cannot be satisfied, ensure that the exceptional criteria are satisfied within.
  • There is a high priority need for the functionality that cannot wait until the next release and is difficult to address in another way.
  • The new functionality is additive-only and only runs for clusters which have specifically “opted in” to it (e.g. by a cluster setting).
  • New code is protected by a conditional check that is trivial to verify and ensures that it only runs for opt-in clusters.
  • The PM and TL on the team that owns the changed code have signed off that the change obeys the above rules.

Add a brief release justification to the body of your PR to justify this backport.

Some other things to consider:

  • What did we do to ensure that a user that doesn’t know & care about this backport, has no idea that it happened?
  • Will this work in a cluster of mixed patch versions? Did we test that?
  • If a user upgrades a patch version, uses this feature, and then downgrades, what happens?

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@alyshanjahani-crl
Copy link
Collaborator Author

@jaylim-crl , @jeffswenson since the connector refactor isn't backported, i had to manually make this backport. Pls take another look.

@alyshanjahani-crl alyshanjahani-crl force-pushed the backport21.2-77442 branch 2 times, most recently from db98361 to 0bed3a4 Compare March 15, 2022 19:57
@@ -58,6 +58,10 @@ const backendError = "Backend error!"
// the test directory server.
const notFoundTenantID = 99

// unavailableTenantID is used to trigger a FailedPrecondition error when it is requested in
// the test directory server.
const unavailableTenantID = 99
Copy link
Collaborator

Choose a reason for hiding this comment

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

If the tenant IDs are the same, wouldn’t we hit the NotFound case? 🤔

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yep haha was WIP, i make changes locally then push to remote branch and pull/test on gceworker.
Should be good now

Release justification: fixes for high-priority bug in existing functionality

Previously, if a tenant cluster had maxPods set to 0 the error returned by
directory.EnsureTenantAddr was not treated as a non-retryable error.

The tenant directory implementation used in CockroachCloud now identifies
this situation and returns a status error with codes.FailedPrecondition and
a descriptive message.

This patch adds a check for the FailedPrecondition error when
proxyHandler.Handle calls proxyHandler.outgoingAddress.

Release note: None
@alyshanjahani-crl
Copy link
Collaborator Author

Screen Shot 2022-03-15 at 4 45 37 PM

hmmm not sure why Bazel failing to build

@alyshanjahani-crl
Copy link
Collaborator Author

I tried retriggering the Bazel CI TC build but it still failed.. This is what im seeing as an error

Failed to resolve artifact dependency <Cockroach / CI / Builds / Build (Linux x86_64), build #70080 [id 4580459]>: No files matched for patterns "bazel-bin/pkg/cmd/cockroach/cockroach_/cockroach,bazel-bin/c-deps/libgeos/lib/libgeos_c.so,bazel-bin/c-deps/libgeos/lib/libgeos.so" from <Cockroach / CI / Builds / Build (Linux x86_64), build #70080 [id 4580459]> (jetbrains.buildServer.artifacts.impl.SourcePathAwareResolvingFailedException)
Failed to resolve artifacts from <Cockroach / CI / Builds / Build (Linux x86_64), build #70080 [id 4580459]>

Gonna retry again, and post to dev-inf if i get the same issue.

Copy link
Collaborator

@jaylim-crl jaylim-crl left a comment

Choose a reason for hiding this comment

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

:lgtm: once tests pass. I've never seen the CI issue before. As you suggested, dev-inf would be a good place to reach out.

Reviewed 4 of 6 files at r1, 2 of 2 files at r2, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @alyshanjahani-crl)

@alyshanjahani-crl
Copy link
Collaborator Author

Dev-inf told me i can ignore this, saying bazel CI doesn't matter for release-21.2 and prior.

DIdn't realize that the failure wasn't stopping us from merging.

Tests are passing, going to merge. TFTR @jaylim-crl !

@alyshanjahani-crl alyshanjahani-crl merged commit 5c5205d into cockroachdb:release-21.2 Mar 16, 2022
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.

3 participants