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

package manager for vendor pull #768

Open
wants to merge 51 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 47 commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
bfa1e56
Add dependency to go.mod and update go.sum
haitham911 Nov 3, 2024
95265cb
add pkg installer
haitham911 Nov 3, 2024
8a1c415
Refactor package handling to support dry run functionality and introd…
haitham911 Nov 3, 2024
086312a
Refactor local file handling in downloadAndInstall function
haitham911 Nov 3, 2024
b6fe0d1
Refactor downloadAndInstall function to use a temporary directory for…
haitham911 Nov 3, 2024
dd6c509
Enhance model to track failed packages during installation process
haitham911 Nov 4, 2024
06f6d01
Add version field to pkg update success message
haitham911 Nov 4, 2024
2dc0c2a
Enhance file inclusion/exclusion logic to support patterns and improv…
haitham911 Nov 4, 2024
1ff92d3
improve log
haitham911 Nov 4, 2024
0cd82f6
remove repeated call of copyToTarget
haitham911 Nov 4, 2024
3bc0ed0
Add error handling for unknown package types in downloadAndInstall
haitham911 Nov 4, 2024
47188c5
Implement vendor model with package management and installation logic
haitham911 Nov 7, 2024
5248650
Refactor package handling to use pkgAtmosVendor struct and update rel…
haitham911 Nov 9, 2024
f04f9fc
Merge branch 'main' into DEV-270-n
osterman Nov 9, 2024
b7ae2f1
Add support for daemon mode in TUI by conditionally disabling renderer
haitham911 Nov 10, 2024
485c3f7
Merge remote-tracking branch 'origin/DEV-270-n' into DEV-270-n
haitham911 Nov 10, 2024
08609e0
Add detailed logging for package installation errors in vendor model
haitham911 Nov 10, 2024
d17d4b0
Fix index out of bounds errors in vendor model by adding checks befor…
haitham911 Nov 10, 2024
2355a77
Add nil checks for empty packages in vendor model initialization
haitham911 Nov 10, 2024
c77eba3
Add nil check for os.Stdin in daemon mode TUI rendering logic
haitham911 Nov 10, 2024
b21c24e
Refactor TUI rendering logic to use CheckTTYSupport for better termin…
haitham911 Nov 10, 2024
33c11f8
Add TTY support check to disable TUI rendering when not available
haitham911 Nov 10, 2024
9acf6fe
Refactor CheckTTYSupport to improve TTY detection on Linux and macOS
haitham911 Nov 10, 2024
9e7f6db
debug stdout support TTY
haitham911 Nov 10, 2024
068cff0
Refactor CheckTTYSupport to only check stdin TTY support and simplify…
haitham911 Nov 10, 2024
5adcfa2
Suppress log output when TTY support is not available in vendor execu…
haitham911 Nov 10, 2024
6d8512c
Remove log output suppression and add TTY support messages for non-in…
haitham911 Nov 10, 2024
256d08f
Add TTYSupport field to modelAtmosVendorInternal and update logic for…
haitham911 Nov 10, 2024
70a63a2
Refactor modelAtmosVendorInternal to remove TTYSupport field and rela…
haitham911 Nov 10, 2024
063bab0
Add progress bar to modelAtmosVendorInternal for package installation…
haitham911 Nov 10, 2024
8f51cab
package pull status when TTY support is unavailable
haitham911 Nov 10, 2024
7e28e17
Enhance TTY support check to include stdout terminal status
haitham911 Nov 10, 2024
772c681
Implement non-interactive mode with spinner feedback and remove TTY d…
haitham911 Nov 10, 2024
0214dc1
Update bubbletea and ansi dependencies to latest versions
haitham911 Nov 10, 2024
ba96f16
Remove vendor_tty.go and update non-interactive mode handling in vend…
haitham911 Nov 10, 2024
84455d3
Fix non-interactive mode handling by adding input option for TTY supp…
haitham911 Nov 10, 2024
68d6e61
Refactor TTY support check to only evaluate stdin and update comments…
haitham911 Nov 10, 2024
0ace698
Add '--everything' flag to vendor pull command and update handling logic
haitham911 Nov 11, 2024
3e973f3
Update atmos.yaml to include '--everything' flag in vendor pull command
haitham911 Nov 11, 2024
201af7c
Add '--everything' flag to vendor pull command in atmos.yaml
haitham911 Nov 11, 2024
2e75a5e
Merge branch 'main' into DEV-270-n
osterman Nov 11, 2024
82a1507
refactor: update vendor component handling and improve error logging
haitham911 Nov 12, 2024
e60ecda
feat: add '--everything' flag to 'atmos vendor pull' command in docum…
haitham911 Nov 12, 2024
6430189
refactor: improve TTY support checks and enhance logging messages; ad…
haitham911 Nov 13, 2024
aa16b2b
refactor: implement context timeout for package download process
haitham911 Nov 13, 2024
a67c55b
Merge branch 'main' into DEV-270-n
haitham911 Nov 13, 2024
7ac6601
chore: remove outdated dependencies from go.sum
haitham911 Nov 13, 2024
7757b44
refactor: improve error messages and flag validation in ExecuteVendor…
haitham911 Nov 13, 2024
e1f1fff
refactor: update modelVendor return value to indicate completion when…
haitham911 Nov 13, 2024
10e1c2f
Merge branch 'main' into DEV-270-n
haitham911 Nov 18, 2024
199ceb8
feat: enhance URI validation in `validateURI` function
haitham911 Nov 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/vendor_pull.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ func init() {
vendorPullCmd.PersistentFlags().StringP("type", "t", "terraform", "atmos vendor pull --component <component> --type=terraform|helmfile")
vendorPullCmd.PersistentFlags().Bool("dry-run", false, "atmos vendor pull --component <component> --dry-run")
vendorPullCmd.PersistentFlags().String("tags", "", "Only vendor the components that have the specified tags: atmos vendor pull --tags=dev,test")

vendorPullCmd.PersistentFlags().Bool("everything", false, "Vendor all components: atmos vendor pull --everything")
vendorCmd.AddCommand(vendorPullCmd)
}
2 changes: 1 addition & 1 deletion examples/demo-component-versions/atmos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ commands:
- name: "test"
description: "Run all tests"
steps:
- atmos vendor pull
- atmos vendor pull --everything
2 changes: 1 addition & 1 deletion examples/demo-vendoring/atmos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ commands:
- name: "test"
description: "Run all tests"
steps:
- atmos vendor pull
- atmos vendor pull --everything
3 changes: 2 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ require (
github.com/jwalton/go-supportscolor v1.2.0
github.com/kubescape/go-git-url v0.0.30
github.com/lrstanley/bubblezone v0.0.0-20240914071701-b48c55a5e78e
github.com/mattn/go-isatty v0.0.20
github.com/mitchellh/go-homedir v1.1.0
github.com/mitchellh/go-wordwrap v1.0.1
github.com/mitchellh/mapstructure v1.5.0
Expand Down Expand Up @@ -95,6 +96,7 @@ require (
github.com/cenkalti/backoff/v3 v3.2.2 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/chainguard-dev/git-urls v1.0.2 // indirect
github.com/charmbracelet/harmonica v0.2.0 // indirect
github.com/charmbracelet/x/ansi v0.4.5 // indirect
github.com/charmbracelet/x/term v0.2.0 // indirect
github.com/cloudflare/circl v1.3.7 // indirect
Expand Down Expand Up @@ -170,7 +172,6 @@ require (
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-localereader v0.0.1 // indirect
github.com/mattn/go-runewidth v0.0.16 // indirect
github.com/microcosm-cc/bluemonday v1.0.27 // indirect
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,8 @@ github.com/charmbracelet/bubbletea v1.2.1 h1:J041h57zculJKEKf/O2pS4edXGIz+V0Yvoj
github.com/charmbracelet/bubbletea v1.2.1/go.mod h1:viLoDL7hG4njLJSKU2gw7kB3LSEmWsrM80rO1dBJWBI=
github.com/charmbracelet/glamour v0.8.0 h1:tPrjL3aRcQbn++7t18wOpgLyl8wrOHUEDS7IZ68QtZs=
github.com/charmbracelet/glamour v0.8.0/go.mod h1:ViRgmKkf3u5S7uakt2czJ272WSg2ZenlYEZXT2x7Bjw=
github.com/charmbracelet/harmonica v0.2.0 h1:8NxJWRWg/bzKqqEaaeFNipOu77YR5t8aSwG4pgaUBiQ=
github.com/charmbracelet/harmonica v0.2.0/go.mod h1:KSri/1RMQOZLbw7AHqgcBycp8pgJnQMYYT8QZRqZ1Ao=
github.com/charmbracelet/lipgloss v1.0.0 h1:O7VkGDvqEdGi93X+DeqsQ7PKHDgtQfF8j8/O2qFMQNg=
github.com/charmbracelet/lipgloss v1.0.0/go.mod h1:U5fy9Z+C38obMs+T+tJqst9VGzlOYGj4ri9reL3qUlo=
github.com/charmbracelet/x/ansi v0.4.5 h1:LqK4vwBNaXw2AyGIICa5/29Sbdq58GbGdFngSexTdRM=
Expand Down
Loading