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

Add compose export error #1505

Merged
merged 3 commits into from
Feb 5, 2024
Merged

Add compose export error #1505

merged 3 commits into from
Feb 5, 2024

Conversation

sunkickr
Copy link
Contributor

Description

Add an error for when --compose-file is used without --compose

🎟 Issue(s)

Related #XXX

🧪 Functional Testing

List the functional testing steps to confirm this feature or fix.

📸 Screenshots

Add screenshots to illustrate the validity of these changes.

📋 Checklist

  • Rebased from the main (or release if patching) branch (before testing)
  • Ran make test before taking out of draft
  • Ran make lint before taking out of draft
  • Added/updated applicable tests
  • Tested against Astro-API (if necessary).
  • Tested against Houston-API and Astronomer (if necessary).
  • Communicated to/tagged owners of respective clients potentially impacted by these changes.
  • Updated any related documentation

Copy link

codecov bot commented Jan 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (e914acc) 85.92% compared to head (a40f88e) 85.93%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1505   +/-   ##
=======================================
  Coverage   85.92%   85.93%           
=======================================
  Files         112      112           
  Lines       14911    14913    +2     
=======================================
+ Hits        12813    12815    +2     
  Misses       1264     1264           
  Partials      834      834           

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

@@ -932,6 +933,9 @@ func airflowSettingsExport(cmd *cobra.Command, args []string) error {
fmt.Println("Exporting compose file to " + exportComposeFile)
return containerHandler.ComposeExport(settingsFile, exportComposeFile)
}
if !compose && cmd.Flags().Changed("compose-file") {
Copy link
Contributor

Choose a reason for hiding this comment

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

can we add a simple unit test for this case

@sunkickr
Copy link
Contributor Author

sunkickr commented Feb 1, 2024

blocked by not being able to get a test working with cmd.Flags().Changed("compose-file")

@sunkickr sunkickr merged commit 92c52e0 into main Feb 5, 2024
5 checks passed
@sunkickr sunkickr deleted the compose-export branch February 5, 2024 20:31
kushalmalani pushed a commit that referenced this pull request Feb 7, 2024
* add compose export error

* add test
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.

None yet

3 participants