-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
🐙 Bootstrap octavia-cli project #9070
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM @alafanechere
The platform build runs flawlessly locally, and I don't get why the
It's not very clear to me how we install Python/pip on the EC2 running the CI. I understood we're using
|
…com/airbytehq/airbyte into augustin/octavia-cli/bootstrap-repo
|
||
|
||
@octavia.command(name="list", help="List existing resources on the Airbyte instance.") | ||
def _list(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
out of curiosity, why do you use _
for list and import?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
list
and import
are reserved Python keywords. I use the _
prefix is to disambiguate the function names.
settings.gradle
Outdated
@@ -25,32 +25,38 @@ if (!System.getenv().containsKey("SUB_BUILD")) { | |||
} else { | |||
def subBuild = System.getenv().get("SUB_BUILD") | |||
println("Building Airbyte Sub Build: " + subBuild) | |||
if (subBuild != "PLATFORM" && subBuild != "CONNECTORS_BASE") { | |||
if (subBuild != "PLATFORM" && subBuild != "CONNECTORS_BASE" && subBuild != "OCTAVIA_CLI") { | |||
throw new IllegalArgumentException(String.format("%s is invalid. Must be unset or PLATFORM or CONNECTORS_BASE", subBuild)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
update error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alafanechere take a look at this. I started reviewing and realised it was faster to clean it up than go through another rounds of comments.
.github/workflows/gradle.yml
Outdated
SLACK_TITLE: "Build Success" | ||
SLACK_FOOTER: "" | ||
octavia-cli-build: | ||
# In case of self-hosted EC2 errors, remove the next two lines and uncomment the currently commented out `runs-on` line. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can remove this comment
|
||
Copyright (c) 2021 Airbyte, Inc. | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how did you generate this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what license should this use? should it be the same at the platform (not MIT)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was not sure of this too, I was under the impression that what is external to the platform could be MIT, but I suggest we default to the repo license for the moment.
settings.gradle
Outdated
|
||
// shared by CONNECTORS_BASE and PLATFORM sub builds | ||
//if (!System.getenv().containsKey("SUB_BUILD") == "CONNECTORS_BASE" || System.getenv().get("SUB_BUILD") == "PLATFORM") { | ||
include ':airbyte-api' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I realised we can't remove the common modules as this will break Intellij imports due to the way we have it set up currently, which is intellij attempts to import all the platform modules by default.
What we can do it import all of them, but only build the octavia cli module in the build. This will incur some configuration penalty, as Gradle has to look over the configuration for the rest of the modules. Should be minimal so not worried.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alafanechere most of my changes are around this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright! I'm using vs-code for this project so I did not face this problem.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Requesting changes because I'm not sure if the license is right. Otherwise lgtm!
|
||
Copyright (c) 2021 Airbyte, Inc. | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what license should this use? should it be the same at the platform (not MIT)?
SLACK_USERNAME: Buildbot | ||
SLACK_TITLE: "Build Success" | ||
SLACK_FOOTER: "" | ||
octavia-cli-build: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@davinchia should these run on aws instances like the other builds?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
most of the work done is limited to the octavia module. only exception is format, but that isn't much faster on the big instances.
the current build is 5 mins, which I think is okay!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When we discussed this with @davinchia we thought the job was light enough to run on the default ubuntu instance and not depend on the EC2 instance availability. But it could also be interesting to have a build context parity and use an EC2 instance for this build too. My concern is that it will require adding new start and stop jobs for a new runner which will make the full workflow run longer.
with: | ||
python-version: "3.8" | ||
|
||
- name: Set up CI Gradle Properties |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we add a comment with a link to why we set these properties please?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be honest I'm not understanding the purpose of the --add-exports
options and copy-pasted this step from other builds for parity.
@@ -105,6 +105,10 @@ if (!System.getenv().containsKey("SUB_BUILD") || System.getenv().get("SUB_BUILD" | |||
include ':tools:code-generator' | |||
} | |||
|
|||
if (!System.getenv().containsKey("SUB_BUILD") || System.getenv().get("SUB_BUILD") == "OCTAVIA_CLI") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would it make sense to just have it be "CLI" instead of "OCTAVIA_CLI"? just easier to type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like having a shorter name. Would this be confused with our Go cli? (is that still a thing?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My opinion is that the OCTAVIA
prefix allows to disambiguate from the airbyte-cli
build already declared in this file.
Thank you very much @michel-tricot @davinchia and @cgardens for your reviews!
|
Agree on using ELv2 for now. We can change this later and it's easier to go from a less permissive to more permissive license. Let's run on the normal Github instance for now. I don't see a strong reason to switch so rather keep it simpler. How does ^ sound @cgardens ? I believe the CI properties are to work with Java 17. I don't think we need to annotate them (or if we did, maybe a follow up PR?). @jrhizor do know how long we'll need to keep these settings? Are they temporary? |
For the license we should use MIT. That's also what we advertised when we released the new license. https://docs.airbyte.com/project-overview/licenses/license-faq |
I re-added the MIT then. @michel-tricot I guess you mean it should be MIT because it's not in the "managed service" scope described in the license FAQ. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @alafanechere . my questions around license and where the build should run are answered.
What
The first step of the
octavia
execution plan is to bootstrap a friendly project directory to welcome future iterations.How
airbyte-cdk
octavia-cli
foldersetup.py
,unit_tests
etc.README
: Add information about the project, install and usage instructions, and contributions guidelines.Recommended reading order
./octavia-cli/README.md
./octavia-cli/setup.py
,./octavia-cli/octavia_cli/entrypoint.py
,./octavia-cli/octavia_cli/unit_tests/entrypoint.py
etc.../octavia-cli/Dockerfile
./octavia-cli/build.gradle
./settings.gradle
🚨 User Impact 🚨
The
octavia-cli
is under development; is it a problem to have a non-working project on the master branch?❔ Open questions ❔
I am not familiar with
Gradle
and our platform build process../gradlew format
command catches the project files; how do I ensure they are?The platform build is failing in the CI (but works locally), an error related to
pip
not being installed... 🤔