-
Notifications
You must be signed in to change notification settings - Fork 74
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
Updates Vendor Dependencies #1762
Conversation
0347ee6
to
60051b8
Compare
60051b8
to
11fc3ac
Compare
@@ -5,6 +5,7 @@ jobs: | |||
working_directory: /go/src/github.com/astronomer/astro-cli | |||
docker: | |||
- image: quay.io/astronomer/ap-dind-golang:24.0.6 | |||
resource_class: large |
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.
Linting became a little heavier.
|
||
// The latest versions of compose libs handle adding these labels at an outer layer, | ||
// near the cobra entrypoint. Without these labels, compose will lose track of the containers its | ||
// starting for a given project and downstream library calls will fail. | ||
for name, s := range project.Services { | ||
s.CustomLabels = map[string]string{ | ||
api.ProjectLabel: project.Name, | ||
api.ServiceLabel: name, | ||
api.VersionLabel: api.ComposeVersion, | ||
api.WorkingDirLabel: project.WorkingDir, | ||
api.ConfigFilesLabel: strings.Join(project.ComposeFiles, ","), | ||
api.OneoffLabel: "False", | ||
} | ||
project.Services[name] = s | ||
} |
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.
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.
This looks good. Approving ahead of a couple of small comments.
Also, I have a couple of PRs that overlap with this:
- Upgrade golangci-lint to v1.62.2 #1756
- Use new Logrus logger #1757
But more of an fyi that one of us will have merge conflicts to deal with :)
airflow/docker_image_test.go
Outdated
@@ -11,12 +11,13 @@ import ( | |||
"os" | |||
"strings" | |||
|
|||
"github.com/docker/docker/api/types/image" |
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 lint rule that these imports need to be kept together?
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.
Went ahead and cleaned up the 4 files that had the imports shuffled around nested under airflow
directory. Will have to look at linters, not sure there.
k8s.io/klog/v2 v2.130.1 // indirect | ||
k8s.io/utils v0.0.0-20241210054802-24370beab758 // indirect | ||
sigs.k8s.io/structured-merge-diff/v4 v4.4.3 // indirect | ||
sigs.k8s.io/yaml v1.4.0 // indirect | ||
) | ||
|
||
replace github.com/jaguilar/vt100 => github.com/tonistiigi/vt100 v0.0.0-20190402012908-ad4c4a574305 |
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 are these replace
statements for?
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.
Looks like we can remove this distribution
one. It was needed as I was working through updates last week, but seems to build fine without this replace
now.
The ldez/tagliatelle
one unfortunately seems to still be required. It's pulled in through the golangci-lint
package and it feels like something off about the way they package things. Without this pin, I get the following error linting:
❯ make lint
go run github.com/golangci/golangci-lint/cmd/golangci-lint version
# github.com/golangci/golangci-lint/pkg/golinters/tagliatelle
../../go/pkg/mod/github.com/golangci/golangci-lint@v1.62.2/pkg/golinters/tagliatelle/tagliatelle.go:13:3: unknown field Rules in struct literal of type "github.com/ldez/tagliatelle".Config
make: *** [lint] Error 1
Update 1 minute later: I merged my linter upgrade PR. Sorry, hopefully it's not too hard to resolve. |
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.
Left a minor nit, and apart from merge conflicts the changes LGTM. Approving ahead of time.
Description
I'm currently working on cleaning up the output of our
astro dev
commands and plan to hide most of it behind our--verbosity
flag by default. Our standard output will be much cleaner and will aim to not confuse our users, especially new ones who don't need to see a ton of docker layer SHAs getting echod out every time.In order to sufficiently control output, we need a much newer version of the docker compose libraries. The currently used version directly attaches to
os.Stdout
and we can't override. New versions allow this to be specified and allow more control over the output.This PR is the result of running
go get -u
and updating all our packages. One off updates were not working well for me. This gets our packages up to date and fixes the subsequent fallout from those upgrades in our code. It's the bare minimum changes needed to simply update the packages.Follow up PRs will utilize this change and fine-tune the output to our needs.
I wish this was smaller, but I feel like we need to get up to date for many reasons. Changes mostly boil down to:
🎟 Issue(s)
Related to https://github.com/astronomer/astro/issues/26133
🧪 Functional Testing
This is a non-functional update, so I've only updated the tests to support the changes in types, etc. To test for regressions, I've run the following suites against this branch:
We've triggered the Astro
e2e-stage-cli-version-matrix
workflow on the Astro repo and pointed at this branch. The workflow can be viewed here. Note the switch to this branch in this step.We've also run the new (currently in development) pytest
astro dev
suite against this branch with the following output:📸 Screenshots
📋 Checklist
make test
before taking out of draftmake lint
before taking out of draft