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

Update version of golangci-lint to the latest version #1522

Merged
merged 1 commit into from
Feb 1, 2024
Merged

Conversation

ashb
Copy link
Contributor

@ashb ashb commented Feb 1, 2024

This is needed to support Go 1.21

  • Depguard changed to v2 so the default mod changed
  • Revive was just noisey, so has been removed
  • I removed some repeated (sub)strings into consts
  • I also moved a repeated code block (detected by contsnts) into a function

Comment on lines 515 to 542
func deploymentToTableRow(table *printutil.Table, d *astroplatformcore.Deployment, includeWorkspaceName bool) {
var clusterName, region string
runtimeVersionText := d.RuntimeVersion + " (based on Airflow " + d.AirflowVersion + ")"
cloudProvider := notApplicable
releaseName := d.Namespace
if IsDeploymentStandard(*d.Type) {
cloudProvider = *d.CloudProvider
region = *d.Region
} else {
clusterName = *d.ClusterName
}
cols := []string{
d.Name,
releaseName,
clusterName,
cloudProvider,
region,
d.Id,
runtimeVersionText,
strconv.FormatBool(d.IsDagDeployEnabled),
strconv.FormatBool(d.IsCicdEnforced),
string(*d.Type),
}
if includeWorkspaceName {
cols = slices.Insert(cols, 1, *d.WorkspaceName)
}
table.AddRow(cols, false)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'd like a second pair of eyes on this change specifically.

Copy link

codecov bot commented Feb 1, 2024

Codecov Report

Attention: 6 lines in your changes are missing coverage. Please review.

Comparison is base (c82086a) 85.90% compared to head (63a9903) 85.92%.

Files Patch % Lines
cloud/deploy/deploy.go 73.33% 4 Missing ⚠️
cmd/cloud/organization.go 94.44% 1 Missing ⚠️
cmd/cloud/workspace.go 95.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1522      +/-   ##
==========================================
+ Coverage   85.90%   85.92%   +0.01%     
==========================================
  Files         112      112              
  Lines       14847    14838       -9     
==========================================
- Hits        12755    12750       -5     
+ Misses       1254     1252       -2     
+ Partials      838      836       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@neel-astro neel-astro left a comment

Choose a reason for hiding this comment

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

LGTM, apart from a single comment 🙂

cloud/deployment/deployment.go Outdated Show resolved Hide resolved
This is needed to support Go 1.21

- Depguard changed to v2 so the default mod changed
- Revive was just noisey, so has been removed
- I removed some repeated (sub)strings into consts
- I also moved a repeated code block (detected by contsnts) into a
  function
@ashb ashb merged commit b1391c8 into main Feb 1, 2024
4 of 5 checks passed
@ashb ashb deleted the upgrade-golanglint branch February 1, 2024 15:58
rujhan-arora-astronomer pushed a commit that referenced this pull request Feb 2, 2024
This is needed to support Go 1.21

- Depguard changed to v2 so the default mod changed
- Revive was just noisey, so has been removed
- I removed some repeated (sub)strings into consts
- I also moved a repeated code block (detected by contsnts) into a
  function
kushalmalani pushed a commit that referenced this pull request Feb 2, 2024
…CLI (both for create and update) (#1516)

* Add the ability to change the deployment type to dag_deploy from the CLI

* Update version of golangci-lint to the latest version (#1522)

This is needed to support Go 1.21

- Depguard changed to v2 so the default mod changed
- Revive was just noisey, so has been removed
- I removed some repeated (sub)strings into consts
- I also moved a repeated code block (detected by contsnts) into a
  function

* Update to latest Go versions (#1521)

Also switch from using deprecated CircleCI images in favour of the new
ones

* Streamline getDeploymentTypeCmdMessage to show image, volume, git_sync, dag_only for all cases

* change function call to constant

---------

Co-authored-by: Ash Berlin-Taylor <ash_github@firemirror.com>
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.

2 participants