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

1.2.21 #390

Merged
merged 77 commits into from
Oct 21, 2024
Merged

1.2.21 #390

merged 77 commits into from
Oct 21, 2024

Conversation

flarco
Copy link
Collaborator

@flarco flarco commented Sep 27, 2024

1.2.21

GitHub Actions Workflows

  • Updated flarco/infisical-action from v2 to v3 across multiple workflow files
  • Modified version output handling in build-dev.yml
  • Updated Go setup and caching configurations

Configuration and Environment Variables

  • Added support for SLING_TASK_CONFIG environment variable in sling_run.go

Code Improvements

  • Refactored replication and task configuration handling in sling_run.go
  • Updated SQL query detection logic in sling_conns.go
  • Modified error messages and documentation references

Testing

  • Added new test files and updated existing test configurations
  • Expanded CLI test suite with new scenarios

Documentation

  • Updated README.md with new contributing guidelines and test instructions
  • Added .goreleaser.notes.md with a link to the project repository

Dependencies

  • Updated various Go module dependencies to newer versions

Build Scripts

  • Modified MinIO client (mc) download URLs in CI preparation scripts

yokofly and others added 30 commits September 13, 2024 02:54
1. processClickhouseInsertRow => processProtonInsertRow
2. remove an empty blank
now incremental supported
```
./sling run --primary-key id  --src-conn PROTON --src-stream 'v' --tgt-conn PROTON --tgt-object test_table --mode incremental
```
…xecution( for example we can do data mutation)
…ry did not work well in clickhouse/protondb, because grammer.

```
./sling conns exec CLICKHOUSE "insert into his_v select * from v"
fatal:
~ SQL Error for:
select * from (
  insert into his_v select * from v
) as t limit 100
code: 62, message: Syntax error: failed at position 19 ('insert') (line 2, col 3): insert into his_v select * from v
) as t limit 100. Expected one of: SELECT query, possibly with UNION, list of union elements, SELECT query, subquery, possibly with UNION, SELECT subquery, SELECT query, WITH, FROM, SELECT, EXPLAIN, EXPLAIN

```
```
 ✗ ./sling run --src-conn LOCAL --src-stream file://cmd/sling/tests/files/test7.csv --src-options '{ delimiter: "|", quote: "'"'"'", escape: "\\" }' --stdout
2024-09-27 02:48:17 DBG Starting pprof webserver @ localhost:6060
2024-09-27 02:48:17 DBG opened "file" connection (conn-file-dUY)
2024-09-27 02:48:17 DBG Sling version: dev (linux amd64)
2024-09-27 02:48:17 DBG type is file-file
2024-09-27 02:48:17 DBG using: {"columns":null,"mode":"full-refresh","transforms":null}
2024-09-27 02:48:17 DBG using source options: {"trim_space":false,"empty_as_null":true,"header":true,"fields_per_rec":-1,"compression":"auto","null_if":"NULL","datetime_format":"AUTO","skip_blank_lines":false,"delimiter":"|","escape":"\\","quote":"'","max_decimals":-1}
2024-09-27 02:48:17 DBG using target options: {"datetime_format":"auto","file_max_rows":0,"max_decimals":-1,"use_bulk":true,"add_new_columns":true,"adjust_column_type":false,"column_casing":"source"}
2024-09-27 02:48:17 INF reading from source file system (file)
2024-09-27 02:48:17 DBG opened "file" connection (conn-file-L9y)
2024-09-27 02:48:17 DBG reading single datastream from file://cmd/sling/tests/files/test7.csv [format=csv]
2024-09-27 02:48:17 DBG merging csv readers of 1 files [concurrency=1] from file://cmd/sling/tests/files/test7.csv
2024-09-27 02:48:17 DBG processing reader from file://cmd/sling/tests/files/test7.csv
2024-09-27 02:48:17 INF writing to target stream (stdout)
col1,header,col3
data1,data with single quote,data3
data with pipe | inside,data2,data3
data with backslash \\ inside,"data with \""escaped\"" double quotes",data3
2024-09-27 02:48:17 DBG wrote 164 B: 3 rows [483 r/s]
2024-09-27 02:48:17 INF wrote 3 rows to stdout in 0 secs [476 r/s]
2024-09-27 02:48:17 INF execution succeeded
 ✗ cat cmd/sling/tests/files/test7.csv
col1|header|col3
data1|'data with single quote \' inside'|data3
'data with pipe | inside'|data2|data3
'data with backslash \\ inside'|'data with \"escaped\" double quotes'|data3
 ✗
 ```
```
(base) ➜  sling-cli git:(support-quote-customized) ✗ cat cmd/sling/tests/files/test8.csv
col1|header|col3
data1|$data with single quote \' inside$|data3
$data with pipe | inside$|data2|data3
$data with backslash \\ inside$|$data with \"escaped\" double quotes$|data3
(base) ➜  sling-cli git:(support-quote-customized) ✗ ./sling run --src-conn LOCAL --src-stream file://cmd/sling/tests/files/test8.csv --src-options '{ delimiter: "|", quote: "$", escape: "\\" }' --stdout
2024-09-27 03:08:25 DBG Starting pprof webserver @ localhost:6060
2024-09-27 03:08:25 DBG opened "file" connection (conn-file-PhR)
2024-09-27 03:08:25 DBG Sling version: dev (linux amd64)
2024-09-27 03:08:25 DBG type is file-file
2024-09-27 03:08:25 DBG using: {"columns":null,"mode":"full-refresh","transforms":null}
2024-09-27 03:08:25 DBG using source options: {"trim_space":false,"empty_as_null":true,"header":true,"fields_per_rec":-1,"compression":"auto","null_if":"NULL","datetime_format":"AUTO","skip_blank_lines":false,"delimiter":"|","escape":"\\","quote":"$","max_decimals":-1}
2024-09-27 03:08:25 DBG using target options: {"datetime_format":"auto","file_max_rows":0,"max_decimals":-1,"use_bulk":true,"add_new_columns":true,"adjust_column_type":false,"column_casing":"source"}
2024-09-27 03:08:25 INF reading from source file system (file)
2024-09-27 03:08:25 DBG opened "file" connection (conn-file-AGU)
2024-09-27 03:08:25 DBG reading single datastream from file://cmd/sling/tests/files/test8.csv [format=csv]
2024-09-27 03:08:25 DBG merging csv readers of 1 files [concurrency=1] from file://cmd/sling/tests/files/test8.csv
2024-09-27 03:08:25 DBG processing reader from file://cmd/sling/tests/files/test8.csv
2024-09-27 03:08:25 INF writing to target stream (stdout)
col1,header,col3
data1,data with single quote \' inside,data3
data with pipe | inside,data2,data3
data with backslash \\ inside,"data with \""escaped\"" double quotes",data3
2024-09-27 03:08:25 DBG wrote 174 B: 3 rows [521 r/s]
2024-09-27 03:08:25 INF wrote 3 rows to stdout in 0 secs [514 r/s]
2024-09-27 03:08:25 INF execution succeeded
```
@yokofly
Copy link
Contributor

yokofly commented Oct 9, 2024

seems some code broke the replication. I locally build with commit 256b075

 export DEBUG=LOW                                       
(base) ➜  sling-cli git:(1.2.21) ✗ ./sling run --src-conn LOCAL --src-stream file://cmd/sling/tests/files/test8.csv --src-options '{ delimiter: "|", quote: "$", escape: "\\" }'
fatal:
--- proc.go:271 main ---
--- sling_cli.go:458 main ---
--- sling_cli.go:494 cliInit ---
--- cli.go:286 CliProcess ---
--- sling_run.go:187 processRun ---
cannot get replication configuration.
(base) ➜  sling-cli git:(1.2.21) ✗ 

@flarco
Copy link
Collaborator Author

flarco commented Oct 9, 2024

@yun, thanks, fixed with 2bc9e43

@flarco
Copy link
Collaborator Author

flarco commented Oct 16, 2024

@yokofly no pressure, do you think you'll get to open the other PR this week? Want to release 1.2.21 this weekend.
If not, we can include direct-write in next release.

@yokofly
Copy link
Contributor

yokofly commented Oct 16, 2024

@flarco I already have a pr, but I am worried about the rollback handle. let's discussed more in #404

@yokofly no pressure, do you think you'll get to open the other PR this week? Want to release 1.2.21 this weekend. If not, we can include direct-write in next release.

@flarco flarco merged commit 73216e1 into main Oct 21, 2024
6 checks passed
@flarco flarco deleted the 1.2.21 branch October 21, 2024 01:02
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.

2 participants