Skip to content

Commit

Permalink
Normalization: Checking --event-buffer-size on old dbt crashed entryp…
Browse files Browse the repository at this point in the history
…oint.sh (#12924)

* Fixed checking --event-buffer-size on old dbt crashed entrypoint.sh

Signed-off-by: Sergey Chvalyuk <[email protected]>
  • Loading branch information
grubberr authored and suhomud committed May 23, 2022
1 parent 476b6d7 commit 61ca26c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion airbyte-integrations/bases/base-normalization/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ WORKDIR /airbyte
ENV AIRBYTE_ENTRYPOINT "/airbyte/entrypoint.sh"
ENTRYPOINT ["/airbyte/entrypoint.sh"]

LABEL io.airbyte.version=0.2.0
LABEL io.airbyte.version=0.2.1
LABEL io.airbyte.name=airbyte/normalization
10 changes: 8 additions & 2 deletions airbyte-integrations/bases/base-normalization/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ function config_cleanup() {
rm -f "${CONFIG_FILE}"
}

function check_dbt_event_buffer_size() {
ret=0
dbt --help | grep -E -- '--event-buffer-size' && return
ret=1
}

PROJECT_DIR=$(pwd)

# How many commits should be downloaded from git to view history of a branch
Expand Down Expand Up @@ -116,8 +122,8 @@ function main() {

# We don't run dbt 1.0.x on all destinations (because their plugins don't support it yet)
# So we need to only pass `--event-buffer-size` if it's supported by DBT.
dbt --help | grep -E -- '--event-buffer-size'
if [ $? -eq 0 ]; then
check_dbt_event_buffer_size
if [ "$ret" -eq 0 ]; then
echo -e "\nDBT >=1.0.0 detected; using 10K event buffer size\n"
dbt_additional_args="--event-buffer-size=10000"
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
public class NormalizationRunnerFactory {

public static final String BASE_NORMALIZATION_IMAGE_NAME = "airbyte/normalization";
public static final String NORMALIZATION_VERSION = "0.2.0";
public static final String NORMALIZATION_VERSION = "0.2.1";

static final Map<String, ImmutablePair<String, DefaultNormalizationRunner.DestinationType>> NORMALIZATION_MAPPING =
ImmutableMap.<String, ImmutablePair<String, DefaultNormalizationRunner.DestinationType>>builder()
Expand Down
1 change: 1 addition & 0 deletions docs/understanding-airbyte/basic-normalization.md
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,7 @@ Therefore, in order to "upgrade" to the desired normalization version, you need

| Airbyte Version | Normalization Version | Date | Pull Request | Subject |
|:----------------| :--- | :--- | :--- | :--- |
| | 0.2.1 | 2022-05-17 | [\#12924](https://github.com/airbytehq/airbyte/pull/12924) | Fixed checking --event-buffer-size on old dbt crashed entrypoint.sh |
| | 0.2.0 | 2022-05-15 | [\#12745](https://github.com/airbytehq/airbyte/pull/12745) | Snowflake: add datetime without timezone |
| | 0.1.78 | 2022-05-06 | [\#12305](https://github.com/airbytehq/airbyte/pull/12305) | Mssql: use NVARCHAR and datetime2 by default |
| 0.36.2-alpha | 0.1.77 | 2022-04-19 | [\#12064](https://github.com/airbytehq/airbyte/pull/12064) | Add support redshift SUPER type |
Expand Down

0 comments on commit 61ca26c

Please sign in to comment.