Skip to content

Commit

Permalink
Merge branch 'main' into deps/update
Browse files Browse the repository at this point in the history
Signed-off-by: kpango <kpango@vdaas.org>
  • Loading branch information
kpango committed Apr 1, 2024
2 parents 84cfcd7 + 5ad9e27 commit ded74d9
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 12 deletions.
33 changes: 21 additions & 12 deletions .github/workflows/backport.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,20 @@
#
name: "Run backport PR"
on:
pull_request:
types:
- "closed"
push:
branches:
- main
- "release/v*.*"
- "!release/v*.*.*"
env:
TARGET_LABEL_NAME_PREFIX: "actions/backport/"
BACKPORT_BRANCH_NAME_PREFIX: "backport"
FETCHED_GITHUB_INFO_PATH: github_info.json
GITHUB_USER: ${{ secrets.DISPATCH_USER }}
GITHUB_TOKEN: ${{ secrets.DISPATCH_TOKEN }}
jobs:
dump-contexts-to-log:
runs-on: ubuntu-latest
if: ${{ github.event.pull_request.merged == true }}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/dump-context
Expand All @@ -44,28 +48,33 @@ jobs:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
git_user_signingkey: true
git_commit_gpgsign: true
- name: Fetch PR info
run: |
gh pr list --limit 10 --json number,title,body,labels,headRefName,headRefOid,mergeCommit --state merged | \
jq --arg oid "${GITHUB_SHA}" '.[] | select(.mergeCommit.oid == $oid)' > ${FETCHED_GITHUB_INFO_PATH}
cat ${FETCHED_GITHUB_INFO_PATH}
echo ${GITHUB_SHA}
- name: Set context
id: set_context
run: |
LABEL_NAMES=`cat ${GITHUB_EVENT_PATH} | jq -r --arg PREFIX $TARGET_LABEL_NAME_PREFIX '[.pull_request.labels[]? | select(.name | startswith($PREFIX)) | .name] | join(" ")'`
LABEL_NAMES=`cat ${FETCHED_GITHUB_INFO_PATH} | jq -r --arg PREFIX $TARGET_LABEL_NAME_PREFIX '[.labels[]? | select(.name | startswith($PREFIX)) | .name] | join(" ")'`
echo "LABEL_NAMES=${LABEL_NAMES}" >> $GITHUB_OUTPUT # e.g.) actions/backport/v1.7 actions/backport/v1.8
echo "${LABEL_NAMES}"
- name: Create PR
if: ${{ steps.set_context.outputs.LABEL_NAMES != '' }}
env:
LABEL_NAMES: ${{ steps.set_context.outputs.LABEL_NAMES }}
GITHUB_USER: ${{ secrets.DISPATCH_USER }}
GITHUB_TOKEN: ${{ secrets.DISPATCH_TOKEN }}
run: |
PR_TITLE=`cat $GITHUB_EVENT_PATH | jq -r ".pull_request.title"`
PR_BODY=`cat $GITHUB_EVENT_PATH | jq -r ".pull_request.body"`
PR_NUM=`cat $GITHUB_EVENT_PATH | jq -r ".pull_request.number"`
PR_TITLE=`cat $FETCHED_GITHUB_INFO_PATH | jq -r ".title"`
PR_BODY=`cat $FETCHED_GITHUB_INFO_PATH | jq -r ".body"`
PR_NUM=`cat $FETCHED_GITHUB_INFO_PATH | jq -r ".number"`
PR_BRANCH_NAME=`cat $FETCHED_GITHUB_INFO_PATH | jq -r ".headRefName"`
echo "${PR_NUM} ${PR_TITLE}: ${PR_BODY}"
for LABEL_NAME in ${LABEL_NAMES}; do
BRANCH_NAME=`echo "${LABEL_NAME}" | sed -e "s:^${TARGET_LABEL_NAME_PREFIX}::"` # e.g) release/vx.x, main
BACKPORT_BRANCH_NAME="${BACKPORT_BRANCH_NAME_PREFIX}/${BRANCH_NAME}/${GITHUB_HEAD_REF}" # e.g) backport/release/vx.x/{current branch name}
BACKPORT_BRANCH_NAME="${BACKPORT_BRANCH_NAME_PREFIX}/${BRANCH_NAME}/${PR_BRANCH_NAME}" # e.g) backport/release/vx.x/{current branch name}
echo "BRANCH_NAME=${BRANCH_NAME}"
echo "BACKPORT_BRANCH_NAME=${BACKPORT_BRANCH_NAME}"
Expand All @@ -75,7 +84,7 @@ jobs:
git checkout -b ${BACKPORT_BRANCH_NAME}
# Force cherry-pick. The conflicts will be modified within the backport PR.
git cherry-pick $GITHUB_SHA || (git add -A && git cherry-pick --continue --no-edit)
git cherry-pick ${GITHUB_SHA} || (git add -A && git cherry-pick --continue --no-edit)
git push origin ${BACKPORT_BRANCH_NAME}
gh pr create --base ${BRANCH_NAME} \
Expand Down
4 changes: 4 additions & 0 deletions rust/libs/proto/src/filter.egress.v1.tonic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ pub mod filter_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
/** Represent the egress filter service.
*/
#[derive(Debug, Clone)]
pub struct FilterClient<T> {
inner: tonic::client::Grpc<T>,
Expand Down Expand Up @@ -187,6 +189,8 @@ pub mod filter_server {
tonic::Status,
>;
}
/** Represent the egress filter service.
*/
#[derive(Debug)]
pub struct FilterServer<T: Filter> {
inner: _Inner<T>,
Expand Down
4 changes: 4 additions & 0 deletions rust/libs/proto/src/filter.ingress.v1.tonic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ pub mod filter_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
/** Represent the ingress filter service.
*/
#[derive(Debug, Clone)]
pub struct FilterClient<T> {
inner: tonic::client::Grpc<T>,
Expand Down Expand Up @@ -187,6 +189,8 @@ pub mod filter_server {
tonic::Status,
>;
}
/** Represent the ingress filter service.
*/
#[derive(Debug)]
pub struct FilterServer<T: Filter> {
inner: _Inner<T>,
Expand Down
8 changes: 8 additions & 0 deletions rust/libs/proto/src/vald.v1.tonic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ pub mod filter_client {
.insert(GrpcMethod::new("vald.v1.Filter", "SearchObject"));
self.inner.unary(req, path, codec).await
}
/** A method to search multiple objects.
*/
pub async fn multi_search_object(
&mut self,
request: impl tonic::IntoRequest<
Expand Down Expand Up @@ -475,6 +477,8 @@ pub mod filter_server {
tonic::Response<super::super::super::payload::v1::search::Response>,
tonic::Status,
>;
/** A method to search multiple objects.
*/
async fn multi_search_object(
&self,
request: tonic::Request<
Expand Down Expand Up @@ -3411,6 +3415,8 @@ pub mod search_client {
req.extensions_mut().insert(GrpcMethod::new("vald.v1.Search", "Search"));
self.inner.unary(req, path, codec).await
}
/** A method to search indexed vectors by ID.
*/
pub async fn search_by_id(
&mut self,
request: impl tonic::IntoRequest<
Expand Down Expand Up @@ -3761,6 +3767,8 @@ pub mod search_server {
tonic::Response<super::super::super::payload::v1::search::Response>,
tonic::Status,
>;
/** A method to search indexed vectors by ID.
*/
async fn search_by_id(
&self,
request: tonic::Request<super::super::super::payload::v1::search::IdRequest>,
Expand Down

0 comments on commit ded74d9

Please sign in to comment.