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

source-salesforce: use latest base image version #36546

Closed
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
3 changes: 2 additions & 1 deletion .github/actions/run-airbyte-ci/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ inputs:
airbyte_ci_binary_url:
description: "URL to airbyte-ci binary"
required: false
default: https://connectors.airbyte.com/airbyte-ci/releases/ubuntu/latest/airbyte-ci
#TODO: revert before merging
default: https://storage.googleapis.com/dev-airbyte-cloud-connector-metadata-service/airbyte-ci/releases/ubuntu/51c9dc8/airbyte-ci
python_registry_token:
description: "Python registry API token to publish python package"
required: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

from typing import Any

from base_images.bases import AirbyteConnectorBaseImage
from base_images.bases import AirbyteConnectorBaseImage # type: ignore
from dagger import Container, Platform
from pipelines.airbyte_ci.connectors.build_image.steps import build_customization
from pipelines.airbyte_ci.connectors.build_image.steps.common import BuildConnectorImagesBase
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
from typing import TYPE_CHECKING

from anyio import Path
from base_images.bases import AirbyteConnectorBaseImage
from dagger import Secret
from pipelines.helpers.utils import get_file_contents, get_secret_host_variable

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,14 @@ def with_integration_base(context: PipelineContext, build_platform: Platform) ->


def with_integration_base_java(context: PipelineContext, build_platform: Platform) -> Container:
user, user_id, group_id = "airbyte", 1000, 1000

integration_base = with_integration_base(context, build_platform)
yum_packages_to_install = [
"tar", # required to untar java connector binary distributions.
"openssl", # required because we need to ssh and scp sometimes.
"findutils", # required for xargs, which is shipped as part of findutils.
"/usr/sbin/adduser", # required to create a user.
]
return (
context.dagger_client.container(platform=build_platform)
Expand All @@ -47,9 +50,13 @@ def with_integration_base_java(context: PipelineContext, build_platform: Platfor
]
)
)
.with_exec(
["adduser", "--uid", str(user_id), "--gid", str(group_id), "--system", "--user-group", "--no-create-home", user],
skip_entrypoint=True,
)
# Add what files we need to the /airbyte directory.
# Copy base.sh from the airbyte/integration-base image.
.with_directory("/airbyte", integration_base.directory("/airbyte"))
.with_directory("/airbyte", integration_base.directory("/airbyte"), owner=user)
.with_workdir("/airbyte")
# Download a utility jar from the internet.
.with_file("dd-java-agent.jar", context.dagger_client.http("https://dtdg.co/latest-java-tracer"))
Expand Down Expand Up @@ -137,7 +144,7 @@ def with_integration_base_java_and_normalization(context: ConnectorContext, buil

async def with_airbyte_java_connector(context: ConnectorContext, connector_java_tar_file: File, build_platform: Platform) -> Container:
application = context.connector.technical_name

user = "airbyte"
build_stage = (
with_integration_base_java(context, build_platform)
.with_workdir("/airbyte")
Expand All @@ -146,6 +153,7 @@ async def with_airbyte_java_connector(context: ConnectorContext, connector_java_
.with_exec(
sh_dash_c(
[
"chown -R airbyte:airbyte .",
f"tar xf {application}.tar --strip-components=1",
f"rm -rf {application}.tar",
]
Expand All @@ -172,4 +180,10 @@ async def with_airbyte_java_connector(context: ConnectorContext, connector_java_
.with_label("io.airbyte.name", context.metadata["dockerRepository"])
.with_entrypoint(entrypoint)
)
return await finalize_build(context, connector_container)
connector_container = await finalize_build(context, connector_container)
connector_container = (
connector_container.with_exec(["chown", "-R", user, "/airbyte"], skip_entrypoint=True)
.with_exec(["chmod", "777", "/tmp"], skip_entrypoint=True)
.with_user(user)
)
return connector_container
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ data:
hosts:
- "*.salesforce.com"
connectorBuildOptions:
baseImage: docker.io/airbyte/python-connector-base:1.2.0@sha256:c22a9d97464b69d6ef01898edf3f8612dc11614f05a84984451dde195f337db9
baseImage: docker.io/airbyte/python-connector-base:1.2.0-rc.1@sha256:280cec373cd5b7192d29de2967e2208f16621186a49d0b5c34bee4e2b2bd0bd3
connectorSubtype: api
connectorType: source
definitionId: b117307c-14b6-41aa-9422-947e34922962
dockerImageTag: 2.4.0
dockerImageTag: 2.4.1
dockerRepository: airbyte/source-salesforce
documentationUrl: https://docs.airbyte.com/integrations/sources/salesforce
githubIssueLabel: source-salesforce
Expand All @@ -19,7 +19,7 @@ data:
name: Salesforce
remoteRegistries:
pypi:
enabled: true
enabled: false
packageName: airbyte-source-salesforce
registries:
cloud:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ requires = [ "poetry-core>=1.0.0",]
build-backend = "poetry.core.masonry.api"

[tool.poetry]
version = "2.4.0"
version = "2.4.1"
name = "source-salesforce"
description = "Source implementation for Salesforce."
authors = [ "Airbyte <contact@airbyte.io>",]
Expand Down
1 change: 1 addition & 0 deletions docs/integrations/sources/salesforce.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ Now that you have set up the Salesforce source connector, check out the followin

| Version | Date | Pull Request | Subject |
|:--------|:-----------|:---------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------|
| 2.4.1 | 2024-03-27 | [36546](https://github.com/airbytehq/airbyte/pull/36546) | Use latest base image version. |
| 2.4.0 | 2024-03-12 | [35978](https://github.com/airbytehq/airbyte/pull/35978) | Upgrade CDK to start emitting record counts with state and full refresh state |
| 2.3.3 | 2024-03-04 | [35791](https://github.com/airbytehq/airbyte/pull/35791) | Fix memory leak (OOM) |
| 2.3.2 | 2024-02-19 | [35421](https://github.com/airbytehq/airbyte/pull/35421) | Add Stream Slice Step option to specification |
Expand Down
Loading