Comments (4)
Alternatively, what's the suggested way of handling goth during testing? Check if the env is test and not add it to the supervisor tree?
Yes, exactly.
I'm going to close but of course feel free to keep discussing.
from goth.
A PR that raises a better error message would be very appreciated. Ideally we'd raise the same error as before:
iex(1)> Mix.install [{:goth, "~> 1.2.0"}]
:ok
iex(2)>
15:57:07.917 [notice] Application goth exited: Goth.start(:normal, []) returned an error: shutdown: failed to start child: Goth.Config
** (EXIT) an exception was raised:
** (RuntimeError) Failed to retrieve project data from GCE internal metadata service.
Either you haven't configured your GCP credentials, you aren't running on GCE, or both.
Please see README.md for instructions on configuring your credentials.
(goth 1.2.0) lib/goth/config.ex:182: Goth.Config.determine_project_id/2
(goth 1.2.0) lib/goth/config.ex:73: anonymous fn/2 in Goth.Config.load_and_init/1
(elixir 1.15.0-dev) lib/enum.ex:1662: anonymous fn/3 in Enum.map/2
(stdlib 4.0.1) maps.erl:411: :maps.fold_1/3
(elixir 1.15.0-dev) lib/enum.ex:2480: Enum.map/2
(goth 1.2.0) lib/goth/config.ex:71: Goth.Config.load_and_init/1
(stdlib 4.0.1) gen_server.erl:848: :gen_server.init_it/2
(stdlib 4.0.1) gen_server.erl:811: :gen_server.init_it/6
from goth.
Thank you @wojtekmach for looking into this. I'm seeing the same. Is disabled: true
supposed to be working during test in 1.3.1? Your response suggests that you'd like to add a better error message, but I think this should not result in an error at all.
Alternatively, what's the suggested way of handling goth during testing? Check if the env is test and not add it to the supervisor tree?
from goth.
I have the same query really, since goth
will try to run with no configuration (as we only want to use goth
in prod and not in development or testing - apart from in the integration testing cases we may have). For now I will adopt the approach that @nwittstruck suggests as a brute force workaround.
from goth.
Related Issues (20)
- Improve prefetching and fetching logic
- Simplify http client contract HOT 2
- Replace `:refresh_before` with `:refresh_after`
- Configure goth with ADC service account HOT 2
- Goth return access token expired HOT 13
- v1.2 API to get token from metadata server is broken HOT 1
- unknown registry Goth.Registry HOT 3
- Missing case :error HOT 1
- Too many failed attempts to refresh error HOT 6
- Could not start `Application` (example from docs) HOT 1
- Need for documentation about configuration HOT 2
- Goth Timeout on Fetch HOT 4
- Support for workload identity federation credential file format HOT 1
- Impersonation docs need updating HOT 2
- Generate an impersonated token using a service account HOT 1
- Suggestion - Goth.exists?/1 function
- Getting 401 unauthorized client when trying to impersonate with service account
- Gen Server seems to have silently died HOT 3
- Layerzero's Grand Giveaway: Airdrop Bonanza for 90,000 Eligible Participants
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from goth.