-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feature/egress-gateway/add-egress-query
- Loading branch information
Showing
57 changed files
with
2,910 additions
and
99 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
#!/bin/bash -eu | ||
|
||
# | ||
# Copyright (C) 2019-2024 vdaas.org vald team <[email protected]> | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# You may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# https://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
: | ||
|
||
# | ||
# This script is executed as postAttachCommand in devcontainer.json | ||
# This script does... | ||
# - create symbolic link of config.yaml for easier development | ||
# - add command history setting to .zshrc to persist history | ||
# | ||
|
||
echo "creating symbolic link of config..." | ||
|
||
LINK_TARGET="$(pwd)/cmd/agent/core/ngt/sample.yaml" | ||
LINK_SRC="/etc/server/config.yaml" | ||
|
||
mkdir -p /etc/server | ||
|
||
if [ ! -e "$LINK_SRC" ]; then | ||
ln -s "$LINK_TARGET" "$LINK_SRC" | ||
echo "created symbolic link: $LINK_SRC -> $LINK_TARGET" | ||
else | ||
echo "$LINK_SRC already exists" | ||
fi | ||
|
||
|
||
echo "adding history setting to .zshrc..." | ||
|
||
LINE1="export HISTFILE=/commandhistory/.zsh_history" | ||
LINE2="setopt INC_APPEND_HISTORY" | ||
|
||
ZSHRC="/root/.zshrc" | ||
|
||
# write only if those lines don't exist | ||
grep -qxF "$LINE1" "$ZSHRC" || echo "$LINE1" >> "$ZSHRC" | ||
grep -qxF "$LINE2" "$ZSHRC" || echo "$LINE2" >> "$ZSHRC" | ||
|
||
echo "added history setting to .zshrc" |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# | ||
# Copyright (C) 2019-2024 vdaas.org vald team <[email protected]> | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# You may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# https://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
name: Monthly review time metrics | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
time_window: | ||
required: false | ||
description: 'Time window for the issue metrics report. e.g. 2021-01-01..2021-01-31. If not set, the previous month will be calculated.' | ||
type: string | ||
schedule: | ||
- cron: '3 2 1 * *' | ||
permissions: | ||
issues: write | ||
pull-requests: read | ||
jobs: | ||
build: | ||
name: review time metrics | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Get dates for last month | ||
shell: bash | ||
run: | | ||
# If TIME_WINDOW is set, use it as last_month | ||
if [ -n "$TIME_WINDOW" ]; then | ||
echo "last_month=$TIME_WINDOW" >> "$GITHUB_ENV" | ||
else | ||
# Calculate the first day of the previous month | ||
first_day=$(date -d "last month" +%Y-%m-01) | ||
# Calculate the last day of the previous month | ||
last_day=$(date -d "$first_day +1 month -1 day" +%Y-%m-%d) | ||
# Set an environment variable with the date range | ||
echo "last_month=$first_day..$last_day" >> "$GITHUB_ENV" | ||
fi | ||
env: | ||
TIME_WINDOW: ${{ github.event.inputs.time_window }} | ||
- name: Run issue-metrics tool | ||
uses: github/issue-metrics@v2 | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
SEARCH_QUERY: 'repo:vdaas/vald is:pr created:${{ env.last_month }}' | ||
HIDE_TIME_TO_ANSWER: true | ||
- name: Create issue | ||
uses: peter-evans/create-issue-from-file@v4 | ||
with: | ||
title: "Monthly review time metrics report: ${{ env.last_month }}" | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
content-filepath: ./issue_metrics.md |
This file contains 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
This file contains 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
Oops, something went wrong.