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

[Bug]: Documentation improvement possibilities: Configurations #325

Closed
1 task done
tmcclell opened this issue Mar 23, 2023 · 4 comments
Closed
1 task done

[Bug]: Documentation improvement possibilities: Configurations #325

tmcclell opened this issue Mar 23, 2023 · 4 comments
Labels
bug Something isn't working stale

Comments

@tmcclell
Copy link

Contact Details

tmcclell@microsoft.com

What happened?

A bug happened! Did a pull from a recently sync fork, build and run and hit this error. I didn't see any documentation on how to set up datasources, but WattTime is listed in Configurations.

client

WebAPI (Default)

Relevant log output

System.ArgumentException
  HResult=0x80070057
  Message=Emissions data source value 'WattTime' was not found in 'Configurations'
  Source=CarbonAware
  StackTrace:
   at CarbonAware.Configuration.DataSourcesConfiguration.AssertValid() in C:\Users\tmcclell\Documents\Source\carbon-aware-sdk-dev\carbon-aware-sdk-dev\src\src\CarbonAware\src\Configuration\DataSourcesConfiguration.cs:line 61
   at CarbonAware.Configuration.DataSourcesConfigurationExtensions.DataSources(IConfiguration configuration) in C:\Users\tmcclell\Documents\Source\carbon-aware-sdk-dev\carbon-aware-sdk-dev\src\src\CarbonAware\src\Configuration\DataSourcesConfigurationExtensions.cs:line 11
   at CarbonAware.DataSources.Configuration.ServiceCollectionExtensions.AddDataSourceService(IServiceCollection services, IConfiguration configuration) in C:\Users\tmcclell\Documents\Source\carbon-aware-sdk-dev\carbon-aware-sdk-dev\src\src\CarbonAware.DataSources\CarbonAware.DataSources.Registration\Configuration\ServiceCollectionExtensions.cs:line 16
   at GSF.CarbonAware.Configuration.ServiceCollectionExtensions.AddEmissionsServices(IServiceCollection services, IConfiguration configuration) in C:\Users\tmcclell\Documents\Source\carbon-aware-sdk-dev\carbon-aware-sdk-dev\src\src\GSF.CarbonAware\src\Configuration\ServiceCollectionExtensions.cs:line 24
   at Program.<Main>$(String[] args) in C:\Users\tmcclell\Documents\Source\carbon-aware-sdk-dev\carbon-aware-sdk-dev\src\src\CarbonAware.WebApi\src\Program.cs:line 57

Code of Conduct

  • I agree to follow this project's Code of Conduct
@tmcclell tmcclell added the bug Something isn't working label Mar 23, 2023
@Willmish
Copy link
Collaborator

Discussed in #328

The issue was WattTime missing in 'Configurations" section in the appsettings. See this for future reference, might be helpful to add an example with multiple EM configurations set up or WattTime, to show different names in
"EmissionsDataSource": "WattTime", not just the DataSource types, as the configuration can be any string, e.g.: "MyWattTimeDataSource".

Also might consider moving https://github.com/Green-Software-Foundation/carbon-aware-sdk/blob/dev/docs/overview.md#configuration-options higher up in overview.md.
https://github.com/Green-Software-Foundation/carbon-aware-sdk/blob/dev/docs/configuration.md#configuration-using-watttime-and-defined-location-source-files

@Willmish
Copy link
Collaborator

Maybe point more clearly to the sample template appsettings.Development.json: https://github.com/Green-Software-Foundation/carbon-aware-sdk/blob/dev/src/CarbonAware.WebApi/src/appsettings.Development.json.template

@Willmish Willmish changed the title [Bug]: Emissions data source value 'WattTime' was not found in 'Configurations" [Bug]: Documentation improvement possibilities: Configurations Mar 29, 2023
@github-actions
Copy link
Contributor

This issue has not had any activity in 120 days. Please review this issue and ensure it is still relevant. If no more activity is detected on this issue for the next 20 days, it will be closed automatically.

@github-actions github-actions bot added the stale label Jul 28, 2023
@github-actions
Copy link
Contributor

This issue has not had any activity for too long. If you believe this issue has been closed in error, please contact an administrator to re-open, or if absolutly relevant and necessary, create a new issue referencing this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale
Projects
None yet
Development

No branches or pull requests

2 participants