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

Cannot call global_aws_config() at module level #611

Open
mattBrzezinski opened this issue Mar 29, 2023 · 1 comment
Open

Cannot call global_aws_config() at module level #611

mattBrzezinski opened this issue Mar 29, 2023 · 1 comment

Comments

@mattBrzezinski
Copy link
Member

Precompiling project...
  ✗ {REDACTED}
  0 dependencies successfully precompiled in 6 seconds. 84 already precompiled.

ERROR: The following 1 direct dependency failed to precompile:

{REDACTED} [...]

Failed to precompile {REDACTED} [...] to /Users/mattbr/.julia/compiled/v1.8/{REDACTED}/jl_GmNEGS.
ERROR: LoadError: MethodError: no method matching getpass(::Base.PipeEndpoint, ::IOContext{IOStream}, ::String)
Closest candidates are:
  getpass(::Base.TTY, ::IO, ::AbstractString) at util.jl:282
Stacktrace:
  [1] getpass(prompt::String)
    @ Base ./util.jl:291
  [2] macro expansion
    @ ~/.julia/packages/Mocking/MRkF3/src/mock.jl:29 [inlined]
  [3] _aws_get_role(role::String, ini::IniFile.Inifile)
    @ AWS ~/.julia/packages/AWS/1AmZD/src/utilities/credentials.jl:90
  [4] dot_aws_config(profile::String)
    @ AWS ~/.julia/packages/AWS/1AmZD/src/AWSCredentials.jl:437
  [5] (::AWS.var"#9#13"{String})()
    @ AWS ~/.julia/packages/AWS/1AmZD/src/AWSCredentials.jl:119
  [6] AWS.AWSCredentials(; profile::String, throw_cred_error::Bool)
    @ AWS ~/.julia/packages/AWS/1AmZD/src/AWSCredentials.jl:128
  [7] #global_aws_config#74
    @ ~/.julia/packages/AWS/1AmZD/src/AWS.jl:79 [inlined]
  [8] top-level scope
    @ ~/Documents/GitHub/{REDACTED}.jl:19
  [9] include
    @ ./Base.jl:419 [inlined]
 [10] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::Nothing)
    @ Base ./loading.jl:1554
 [11] top-level scope
    @ stdin:1
in expression starting at /Users/mattbr/Documents/GitHub/{REDACTED}.jl:1
in expression starting at stdin:1
@ericphanson
Copy link
Member

This should be done in __init__. Even if it worked, it would bake credentials into the precompiled file, which doesn’t seem ideal (they would be either stale or a security issue).

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

No branches or pull requests

2 participants