Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
name: Bug Report
description: Report a reproducible problem in tdc.
description: Report a reproducible problem in ti.
title: "[Bug] "
labels:
- bug
body:
- type: markdown
attributes:
value: |
Thank you for reporting a tdc issue. Remove credentials, tokens, connection strings, SQL containing sensitive data, and customer data before submitting.
Thank you for reporting a ti issue. Remove credentials, tokens, connection strings, SQL containing sensitive data, and customer data before submitting.
- type: input
id: version
attributes:
label: tdc version
description: Run `tdc --version`.
label: ti version
description: Run `ti --version`.
placeholder: v0.1.2
validations:
required: true
Expand Down Expand Up @@ -77,7 +77,7 @@ body:
id: logs
attributes:
label: Sanitized logs
description: Add relevant `~/.tdc/logs/tdc.jsonl` or mount-log entries after removing all sensitive data.
description: Add relevant `~/.ti/logs/ti.jsonl` or mount-log entries after removing all sensitive data.
render: text
- type: checkboxes
id: confirmation
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Security vulnerability
url: https://github.com/tidbcloud/tdc/security/advisories/new
url: https://github.com/tidbcloud/ti-cli/security/advisories/new
about: Report security vulnerabilities privately. Do not open a public issue.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Feature Request
description: Propose a tdc capability or command improvement.
description: Propose a ti capability or command improvement.
title: "[Feature] "
labels:
- enhancement
Expand All @@ -19,7 +19,7 @@ body:
id: current_workflow
attributes:
label: Current workflow
description: Show how users or agents handle this today, including relevant tdc commands.
description: Show how users or agents handle this today, including relevant ti commands.
validations:
required: true
- type: textarea
Expand Down
46 changes: 23 additions & 23 deletions .github/workflows/live-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ jobs:
live-e2e:
runs-on: ubuntu-latest
env:
TDC_REGION_CODE: ${{ vars.TDC_REGION_CODE }}
TDC_PUBLIC_KEY: ${{ secrets.TDC_PUBLIC_KEY }}
TDC_PRIVATE_KEY: ${{ secrets.TDC_PRIVATE_KEY }}
TDC_LIVE_HOME: /tmp/tdc-live-home-${{ github.run_id }}-${{ github.run_attempt }}
TDC_LIVE_FS_NAME: tdc-live-e2e-${{ github.run_id }}-${{ github.run_attempt }}
TI_REGION_CODE: ${{ vars.TI_REGION_CODE }}
TIDB_CLOUD_PUBLIC_KEY: ${{ secrets.TIDB_CLOUD_PUBLIC_KEY }}
TIDB_CLOUD_PRIVATE_KEY: ${{ secrets.TIDB_CLOUD_PRIVATE_KEY }}
TI_LIVE_HOME: /tmp/ti-live-home-${{ github.run_id }}-${{ github.run_attempt }}
TI_LIVE_FS_NAME: ti-live-e2e-${{ github.run_id }}-${{ github.run_attempt }}
steps:
- name: Checkout
uses: actions/checkout@v6
Expand All @@ -37,18 +37,18 @@ jobs:
- name: Mask live secrets
run: |
set -euo pipefail
if [ -n "${TDC_PUBLIC_KEY:-}" ]; then
echo "::add-mask::$TDC_PUBLIC_KEY"
if [ -n "${TIDB_CLOUD_PUBLIC_KEY:-}" ]; then
echo "::add-mask::$TIDB_CLOUD_PUBLIC_KEY"
fi
if [ -n "${TDC_PRIVATE_KEY:-}" ]; then
echo "::add-mask::$TDC_PRIVATE_KEY"
if [ -n "${TIDB_CLOUD_PRIVATE_KEY:-}" ]; then
echo "::add-mask::$TIDB_CLOUD_PRIVATE_KEY"
fi

- name: Validate live configuration
run: |
set -euo pipefail
missing=0
for name in TDC_REGION_CODE TDC_PUBLIC_KEY TDC_PRIVATE_KEY; do
for name in TI_REGION_CODE TIDB_CLOUD_PUBLIC_KEY TIDB_CLOUD_PRIVATE_KEY; do
if [ -z "${!name:-}" ]; then
echo "::error::$name is required for live-e2e"
missing=1
Expand All @@ -75,36 +75,36 @@ jobs:

- name: Configure live profile
env:
HOME: ${{ env.TDC_LIVE_HOME }}
HOME: ${{ env.TI_LIVE_HOME }}
run: |
set -euo pipefail
mkdir -p "$HOME"
bin/tdc configure --profile live-e2e --non-interactive
bin/ti configure --profile live-e2e --non-interactive

- name: Create temporary tdc fs resource
- name: Create temporary ti fs resource
env:
HOME: ${{ env.TDC_LIVE_HOME }}
HOME: ${{ env.TI_LIVE_HOME }}
run: |
set -euo pipefail
bin/tdc fs create-file-system \
bin/ti fs create-file-system \
--profile live-e2e \
--file-system-name "$TDC_LIVE_FS_NAME"
--file-system-name "$TI_LIVE_FS_NAME"

- name: Run live e2e
env:
HOME: ${{ env.TDC_LIVE_HOME }}
HOME: ${{ env.TI_LIVE_HOME }}
run: make live-e2e

- name: Delete temporary tdc fs resource
- name: Delete temporary ti fs resource
if: always()
env:
HOME: ${{ env.TDC_LIVE_HOME }}
HOME: ${{ env.TI_LIVE_HOME }}
run: |
set -euo pipefail
if [ ! -f "$HOME/.tdc/config" ] || [ ! -f "$HOME/.tdc/credentials" ]; then
echo "Skipping tdc fs cleanup because live profile files were not created."
if [ ! -f "$HOME/.ti/config" ] || [ ! -f "$HOME/.ti/credentials" ]; then
echo "Skipping ti fs cleanup because live profile files were not created."
exit 0
fi
bin/tdc fs delete-file-system \
bin/ti fs delete-file-system \
--profile live-e2e \
--file-system-name "$TDC_LIVE_FS_NAME"
--file-system-name "$TI_LIVE_FS_NAME"
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/bin/
/dist/
/tdc
/ti
.env
.env.local
.env.telemetry
Expand Down
26 changes: 13 additions & 13 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
version: 2

project_name: tdc
project_name: ti

before:
hooks:
- go mod download

builds:
- id: tdc
main: ./cmd/tdc
binary: tdc
- id: ti
main: ./cmd/ti
binary: ti
env:
- CGO_ENABLED=0
goos:
Expand All @@ -24,17 +24,17 @@ builds:
goarch: arm64
ldflags:
- -s -w
- -X github.com/tidbcloud/tdc/internal/version.version={{ .Version }}
- -X github.com/tidbcloud/tdc/internal/version.commit={{ .Commit }}
- -X github.com/tidbcloud/tdc/internal/version.date={{ .Date }}
- -X github.com/tidbcloud/tdc/internal/version.installSource=archive
- -X github.com/tidbcloud/tdc/internal/version.releaseChannel=stable
- -X github.com/tidbcloud/tdc/internal/version.telemetryEndpoint=https://tdc-telemetry.tidbcloud.com/v1/telemetry/batch
- -X github.com/tidbcloud/ti-cli/internal/version.version={{ .Version }}
- -X github.com/tidbcloud/ti-cli/internal/version.commit={{ .Commit }}
- -X github.com/tidbcloud/ti-cli/internal/version.date={{ .Date }}
- -X github.com/tidbcloud/ti-cli/internal/version.installSource=archive
- -X github.com/tidbcloud/ti-cli/internal/version.releaseChannel=stable
- -X github.com/tidbcloud/ti-cli/internal/version.telemetryEndpoint=https://tdc-telemetry.tidbcloud.com/v1/telemetry/batch

archives:
- id: tdc
- id: ti
ids:
- tdc
- ti
name_template: "{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}"
formats:
- tar.gz
Expand All @@ -54,7 +54,7 @@ snapshot:
release:
github:
owner: tidbcloud
name: tdc
name: ti-cli
prerelease: auto
make_latest: true
mode: replace
Expand Down
Loading