You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Honor Python binding overrides in metadata audit commands - #14708
The wrapper put the audit directory ahead of --fdb-python on PYTHONPATH. Running a script by filename also put that directory first, so its adjacent fdb/ always won.
Move the offline package under vendor/ and put binding selection in a module shared by the four entry points. The wrapper passes its explicit selection as FDB_PYTHON_PATH. Direct invocations use the same setting and both entry points default to the bundled package. A missing explicit package reports the path. The eight vendor files move byte for byte, including the API-version adaptation for older C libraries. The wrapper includes the audit directory on PYTHONPATH so Python can find the tool modules with PYTHONSAFEPATH=1.
Ran bash -n metadata-audit.sh and python3 -B -m unittest discover -s tests in contrib/metadata_audit. Four offline tests exercise the wrapper with Python safe path enabled, all four direct entry points, the default package and invalid overrides.
Ran the wrapper’s repair-coalesce --type serverKeys --dry-run against disposable 7.3.81 and 8.0.1 clusters with matching C libraries and PYTHONSAFEPATH=1. For each release, verified a metadata read with the bundled package and with --fdb-python pointing to a separate installation of the matching Python distribution.
Error: `Error while executing command: # compatible with bash and zsh
ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i ${HOME}/.ssh_key
-o ServerAliveInterval=9 ec2-user@${MAC_EC2_HOST} "
set -e -o noclobber
BUILDNUM=${CODEBUILD_BUILD_NUMBER}
WAIT_TIME=14400 # 4 hours
LOCK_STALE=4500 # 75 minutes
LOCK=/tmp/ci.lock
"'
macOS stat flags, not linux compatible
lock_mtime() { stat -f %m $LOCK || echo 0 }
I=0
while ! (echo $BUILDNUM >$LOCK) 2>/dev/null ; do
if (( ++I >= WAIT_TIME )); then
echo "timeout waiting for ci.lock after $I seconds"
exit 3
fi
if (( $(date +%s) - $(lock_mtime) >= LOCK_STALE )); then
echo "lock expired after $LOCK_STALE seconds ..."
# racy but sleep so chances are low
sleep $(( 3 + RANDOM % 8 ))
if (( $(date +%s) - $(lock_mtime) >= LOCK_STALE )); then
echo "lock holder is gone"
rm -f $LOCK
else
echo "new lock holder"
fi
fi
sleep 1
done
echo "acquired ci.lock"
'
. Reason: exit status 3`
Error: `Error while executing command: # compatible with bash and zsh
ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i ${HOME}/.ssh_key
-o ServerAliveInterval=9 ec2-user@${MAC_EC2_HOST} "
set -e -o noclobber
BUILDNUM=${CODEBUILD_BUILD_NUMBER}
WAIT_TIME=14400 # 4 hours
LOCK_STALE=4500 # 75 minutes
LOCK=/tmp/ci.lock
"'
macOS stat flags, not linux compatible
lock_mtime() { stat -f %m $LOCK || echo 0 }
I=0
while ! (echo $BUILDNUM >$LOCK) 2>/dev/null ; do
if (( ++I >= WAIT_TIME )); then
echo "timeout waiting for ci.lock after $I seconds"
exit 3
fi
if (( $(date +%s) - $(lock_mtime) >= LOCK_STALE )); then
echo "lock expired after $LOCK_STALE seconds ..."
# racy but sleep so chances are low
sleep $(( 3 + RANDOM % 8 ))
if (( $(date +%s) - $(lock_mtime) >= LOCK_STALE )); then
echo "lock holder is gone"
rm -f $LOCK
else
echo "new lock holder"
fi
fi
sleep 1
done
echo "acquired ci.lock"
'
. Reason: exit status 3`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The wrapper put the audit directory ahead of
--fdb-pythononPYTHONPATH. Running a script by filename also put that directory first, so its adjacentfdb/always won.Move the offline package under
vendor/and put binding selection in a module shared by the four entry points. The wrapper passes its explicit selection asFDB_PYTHON_PATH. Direct invocations use the same setting and both entry points default to the bundled package. A missing explicit package reports the path. The eight vendor files move byte for byte, including the API-version adaptation for older C libraries. The wrapper includes the audit directory onPYTHONPATHso Python can find the tool modules withPYTHONSAFEPATH=1.Ran
bash -n metadata-audit.shandpython3 -B -m unittest discover -s testsincontrib/metadata_audit. Four offline tests exercise the wrapper with Python safe path enabled, all four direct entry points, the default package and invalid overrides.Ran the wrapper’s
repair-coalesce --type serverKeys --dry-runagainst disposable 7.3.81 and 8.0.1 clusters with matching C libraries andPYTHONSAFEPATH=1. For each release, verified a metadata read with the bundled package and with--fdb-pythonpointing to a separate installation of the matching Python distribution.