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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

airbyte-ci: upgrade to dagger 0.9.5 #33582

Merged
merged 4 commits into from
Jan 5, 2024

Conversation

alafanechere
Copy link
Contributor

@alafanechere alafanechere commented Dec 18, 2023

What

Closes #33429

How

  • Bump Dagger to 0.9.5 in: airbyte-ci, base-images, CAT
  • Update code where broken due to backward-incompatible APIs
  • Update GHA workflows to use the 0.9.5 engines on the infra

Manual testing

(manual testing should be done using the dev airbyte ci binary - this is why I used [skip ci] on all commits)

馃毃 User Impact 馃毃

None, if all manual tests succeed

Dependencies:

  1. This should not be merged until the magicache set up is complete on the infra side.
    Update: Distributed caching is currently enabled on our runners: waiting for Dagger team to confirm it's working correctly.

2 This should not be merged until CI can run on current branche's binary
Depends on #33519

Related infra PRs

Copy link

vercel bot commented Dec 18, 2023

The latest updates on your projects. Learn more about Vercel for Git 鈫楋笌

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
airbyte-docs 猬滐笍 Ignored (Inspect) Visit Preview Jan 5, 2024 11:03am

Copy link
Contributor Author

Current dependencies on/for this PR:

This stack of pull requests is managed by Graphite.

@alafanechere alafanechere force-pushed the augustin/12-14-dagger_upgrade_to_0.9.4 branch from 282778e to 40df54a Compare December 18, 2023 18:42
@alafanechere alafanechere changed the title airbyte-ci: upgrade to dagger 0.9.4 [do not merge] airbyte-ci: upgrade to dagger 0.9.4 Dec 18, 2023
@alafanechere alafanechere force-pushed the augustin/12-14-dagger_upgrade_to_0.9.4 branch 2 times, most recently from 2015dcb to bfdd6de Compare December 19, 2023 12:54
Copy link
Contributor

Warning

Soft code freeze is in effect until 2024-01-02. Please avoid merging to master. #freedom-and-responsibility

@alafanechere alafanechere force-pushed the augustin/12-14-dagger_upgrade_to_0.9.4 branch from 402811b to 4c8a6a4 Compare January 3, 2024 13:01
@alafanechere alafanechere changed the title [do not merge] airbyte-ci: upgrade to dagger 0.9.4 [do not merge] airbyte-ci: upgrade to dagger 0.9.5 Jan 3, 2024
@alafanechere alafanechere force-pushed the augustin/12-14-dagger_upgrade_to_0.9.4 branch 2 times, most recently from 08c193c to cc757ef Compare January 3, 2024 14:52
@alafanechere alafanechere changed the title [do not merge] airbyte-ci: upgrade to dagger 0.9.5 airbyte-ci: upgrade to dagger 0.9.5 Jan 3, 2024
@alafanechere alafanechere force-pushed the augustin/12-14-dagger_upgrade_to_0.9.4 branch from cc757ef to 8de621f Compare January 3, 2024 16:42
@alafanechere alafanechere force-pushed the augustin/12-14-dagger_upgrade_to_0.9.4 branch from 4e586dc to 83c228e Compare January 4, 2024 10:30
Copy link
Contributor

@postamar postamar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this mean we can follow this up with a PR which removes the dirty hack I put in that installs some secrets as regular env vars with --is-local is set so that the gradle integration test output wouldn't be all messed up?

@@ -10,7 +10,7 @@ authors = ["Airbyte <contact@airbyte.io>"]

[tool.poetry.dependencies]
python = "~3.10"
dagger-io = "^0.6.4"
dagger-io = "==0.9.5"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't you bump the major version counter of airbyte-ci as well?

if docker_hub_username_secret and docker_hub_password_secret:
# Docker login happens late because there's a cache buster in the docker login command.
dockerd_container = docker_login(dockerd_container, docker_hub_username_secret, docker_hub_password_secret)
return dockerd_container.with_exec(
["dockerd", "--log-level=error", f"--host=tcp://0.0.0.0:{DOCKER_HOST_PORT}", "--tls=false"], insecure_root_capabilities=True
)
).as_service()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

neat

Copy link
Contributor

@bnchrch bnchrch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few very small things but LGTM!

@@ -142,14 +145,14 @@ runs:
export _EXPERIMENTAL_DAGGER_RUNNER_HOST="unix:///var/run/buildkit/buildkitd.sock"
airbyte-ci --disable-dagger-run --is-ci --gha-workflow-run-id=${{ github.run_id }} ${{ inputs.subcommand }} ${{ inputs.options }}
env:
_EXPERIMENTAL_DAGGER_CLOUD_TOKEN: "p.eyJ1IjogIjFiZjEwMmRjLWYyZmQtNDVhNi1iNzM1LTgxNzI1NGFkZDU2ZiIsICJpZCI6ICJlNjk3YzZiYy0yMDhiLTRlMTktODBjZC0yNjIyNGI3ZDBjMDEifQ.hT6eMOYt3KZgNoVGNYI3_v4CC-s19z8uQsBkGrBhU3k"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

鉂わ笍 Nice to see this go to an input!

@@ -94,11 +94,6 @@ async def run_connectors_pipelines(
default_connectors_semaphore = anyio.Semaphore(concurrency)
dagger_logs_output = sys.stderr if not dagger_logs_path else create_and_open_file(dagger_logs_path)
async with dagger.Connection(Config(log_output=dagger_logs_output, execute_timeout=execute_timeout)) as dagger_client:

# HACK: This is to get a long running dockerd service to be shared across all the connectors pipelines
# Using the "normal" service binding leads to restart of dockerd during pipeline run that can cause corrupted docker state
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

馃槏

)
# When the connectors pipelines are done, we can stop the dockerd service
tg_main.cancel_scope.cancel()
await dockerd_service.start()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

馃拝 nit: Should/could we turn this to an async with

async with dockerd_service.start():

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It'd be nice but I don't think we can as it's not returning a context manager

from pipelines.airbyte_ci.connectors.context import ConnectorContext


def get_sdk_version() -> str:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not immediately clear what SDK its refering to when you call it.

Suggested change
def get_sdk_version() -> str:
def get_dagger_sdk_version() -> str:

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@alafanechere alafanechere force-pushed the augustin/12-14-dagger_upgrade_to_0.9.4 branch from c62d4fe to d0a4b5c Compare January 5, 2024 11:00
@alafanechere
Copy link
Contributor Author

Does this mean we can follow this up with a PR which removes the dirty hack I put in that installs some secrets as regular env vars with --is-local is set so that the gradle integration test output wouldn't be all messed up?

@postamar I think it's worth a try, if my not mistaken the issues you opened on Dagger repo are closed now .

@alafanechere alafanechere merged commit 617075d into master Jan 5, 2024
23 checks passed
@alafanechere alafanechere deleted the augustin/12-14-dagger_upgrade_to_0.9.4 branch January 5, 2024 11:41
jatinyadav-cc pushed a commit to ollionorg/datapipes-airbyte that referenced this pull request Feb 26, 2024
jatinyadav-cc pushed a commit to ollionorg/datapipes-airbyte that referenced this pull request Feb 26, 2024
jatinyadav-cc pushed a commit to ollionorg/datapipes-airbyte that referenced this pull request Feb 26, 2024
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.

airbyte-ci: upgrade to dagger 0.9.5
3 participants