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

[CI] no method matching AWSException(::String, ::String, ::String, ::HTTP.ExceptionRequest.StatusError) #40

Open
arnaudh opened this issue Oct 18, 2021 · 0 comments · Fixed by JuliaCloud/AWS.jl#495

Comments

@arnaudh
Copy link

arnaudh commented Oct 18, 2021

Consistent failure in CI

https://github.com/invenia/CloudWatchLogs.jl/runs/3921857668?check_suite_focus=true

Throttled: Error During Test at /home/runner/work/CloudWatchLogs.jl/CloudWatchLogs.jl/test/mocked_aws.jl:128
  Got exception outside of a @test
  MethodError: no method matching AWSException(::String, ::String, ::String, ::HTTP.ExceptionRequest.StatusError)
  Closest candidates are:
    AWSException(::String, ::String, ::Union{Nothing, String, XMLDict.XMLDictElement, Dict}, ::HTTP.ExceptionRequest.StatusError, !Matched::Union{Nothing, String}) at /home/runner/.julia/packages/AWS/xd5TK/src/AWSExceptions.jl:27
    AWSException(::Any, ::Any, ::Any, ::Any, !Matched::Any) at /home/runner/.julia/packages/AWS/xd5TK/src/AWSExceptions.jl:27
    AWSException(!Matched::HTTP.ExceptionRequest.StatusError, ::AbstractString) at /home/runner/.julia/packages/AWS/xd5TK/src/AWSExceptions.jl:66
  Stacktrace:
   [1] (::var"##_put_log_events_patch#425#25")(::CloudWatchLogStream, ::Array{LogEvent,1}) at /home/runner/work/CloudWatchLogs.jl/CloudWatchLogs.jl/test/mocked_aws.jl:36
   [2] macro expansion at /home/runner/.julia/packages/Mocking/MsKoy/src/mock.jl:24 [inlined]
   [3] (::CloudWatchLogs.var"#19#25"{CloudWatchLogStream,Array{LogEvent,1}})() at /home/runner/work/CloudWatchLogs.jl/CloudWatchLogs.jl/src/stream.jl:290
   [4] (::Base.var"#50#51#53"{ExponentialBackOff,CloudWatchLogs.var"#retry_cond#23"{CloudWatchLogStream},CloudWatchLogs.var"#19#25"{CloudWatchLogStream,Array{LogEvent,1}}})(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Base.var"#50#52"{Base.var"#50#51#53"{ExponentialBackOff,CloudWatchLogs.var"#retry_cond#23"{CloudWatchLogStream},CloudWatchLogs.var"#19#25"{CloudWatchLogStream,Array{LogEvent,1}}}}) at ./error.jl:253
   [5] #50 at ./error.jl:249 [inlined]
   [6] submit_logs(::CloudWatchLogStream, ::Array{LogEvent,1}) at /home/runner/work/CloudWatchLogs.jl/CloudWatchLogs.jl/src/stream.jl:296
   [7] submit_log at /home/runner/work/CloudWatchLogs.jl/CloudWatchLogs.jl/src/stream.jl:353 [inlined]
   [8] macro expansion at /home/runner/work/CloudWatchLogs.jl/CloudWatchLogs.jl/test/mocked_aws.jl:136 [inlined]
   [9] (::var"#18#39"{Memento.TestUtils.TestHandler{DefaultFormatter},CloudWatchLogStream,LogEvent})() at /home/runner/.julia/packages/Memento/IanT6/src/memento_test.jl:60
   [10] setpropagating!(::var"#18#39"{Memento.TestUtils.TestHandler{DefaultFormatter},CloudWatchLogStream,LogEvent}, ::Logger, ::Bool) at /home/runner/.julia/packages/Memento/IanT6/src/loggers.jl:113
   [11] macro expansion at /home/runner/.julia/packages/Memento/IanT6/src/memento_test.jl:59 [inlined]
   [12] (::var"#17#38"{CloudWatchLogStream,LogEvent})() at /home/runner/work/CloudWatchLogs.jl/CloudWatchLogs.jl/test/mocked_aws.jl:135
   [13] #setlevel!#45(::Bool, ::typeof(setlevel!), ::var"#17#38"{CloudWatchLogStream,LogEvent}, ::Logger, ::String) at /home/runner/.julia/packages/Memento/IanT6/src/loggers.jl:339
   [14] setlevel! at /home/runner/.julia/packages/Memento/IanT6/src/loggers.jl:320 [inlined]
   [15] #16 at /home/runner/work/CloudWatchLogs.jl/CloudWatchLogs.jl/test/mocked_aws.jl:134 [inlined]
   [16] apply(::var"#16#37"{AWSConfig,Int64}, ::Mocking.PatchEnv) at /home/runner/.julia/packages/Mocking/MsKoy/src/patch.jl:132
   [17] #apply#1(::Bool, ::typeof(apply), ::Function, ::Array{Patch,1}) at /home/runner/.julia/packages/Mocking/MsKoy/src/patch.jl:139
   [18] apply(::Function, ::Array{Patch,1}) at /home/runner/.julia/packages/Mocking/MsKoy/src/patch.jl:139
   [19] top-level scope at /home/runner/work/CloudWatchLogs.jl/CloudWatchLogs.jl/test/mocked_aws.jl:130
   [20] top-level scope at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Test/src/Test.jl:1107
   [21] top-level scope at /home/runner/work/CloudWatchLogs.jl/CloudWatchLogs.jl/test/mocked_aws.jl:129
   [22] top-level scope at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Test/src/Test.jl:1107
   [23] top-level scope at /home/runner/work/CloudWatchLogs.jl/CloudWatchLogs.jl/test/mocked_aws.jl:4
   [24] include at ./boot.jl:328 [inlined]
   [25] include_relative(::Module, ::String) at ./loading.jl:1105
   [26] include(::Module, ::String) at ./Base.jl:31
   [27] include(::String) at ./client.jl:424
   [28] top-level scope at /home/runner/work/CloudWatchLogs.jl/CloudWatchLogs.jl/test/runtests.jl:80
   [29] top-level scope at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.3/Test/src/Test.jl:1107
   [30] top-level scope at /home/runner/work/CloudWatchLogs.jl/CloudWatchLogs.jl/test/runtests.jl:79
   [31] include at ./boot.jl:328 [inlined]
   [32] include_relative(::Module, ::String) at ./loading.jl:1105
   [33] include(::Module, ::String) at ./Base.jl:31
   [34] include(::String) at ./client.jl:424
   [35] top-level scope at none:6
   [36] eval(::Module, ::Any) at ./boot.jl:330
   [37] exec_options(::Base.JLOptions) at ./client.jl:263
   [38] _start() at ./client.jl:460
bors bot added a commit to JuliaCloud/AWS.jl that referenced this issue Oct 20, 2021
495: Add AWSException fallback to replicate old constructor r=mattBrzezinski a=iamed2

Fixes invenia/CloudWatchLogs.jl#40

When AWSResponse changes went in, a new field was added. CloudWatchLogs.jl tests relied on the default constructor, so when a field was added, tests broke. This adds a fallback that replicates the old constructor. It's also a reasonable fallback I think, given that the final field is optional (could be `nothing`). 

Co-authored-by: Eric Davies <[email protected]>
bors bot added a commit to JuliaCloud/AWS.jl that referenced this issue Oct 21, 2021
495: Add AWSException fallback to replicate old constructor r=iamed2 a=iamed2

Fixes invenia/CloudWatchLogs.jl#40

When AWSResponse changes went in, a new field was added. CloudWatchLogs.jl tests relied on the default constructor, so when a field was added, tests broke. This adds a fallback that replicates the old constructor. It's also a reasonable fallback I think, given that the final field is optional (could be `nothing`). 

Co-authored-by: Eric Davies <[email protected]>
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 a pull request may close this issue.

1 participant