Skip to content

Conversation

YaSuenag
Copy link
Member

Pull Request

Summary

Add 2 environment variables (DataSources__EmissionsDataSource and DataSources__Configurations__Json__Type) to GHA workflows for generating WebAPI client libs.

We saw following error in GHA log for v1.8.0 release.

  /usr/bin/docker logs --details 5a00138dd0c4188bfe4d084772c7a9feeeacf8c3406dfc104a1aeee6e9cc7b20
   Unhandled exception. CarbonAware.Exceptions.ConfigurationException: No data sources are configured
      at CarbonAware.DataSources.Configuration.ServiceCollectionExtensions.AddDataSourceService(IServiceCollection services, IConfiguration configuration) in /app/CarbonAware.DataSources/CarbonAware.DataSources.Registration/Configuration/ServiceCollectionExtensions.cs:line 73
      at GSF.CarbonAware.Configuration.ServiceCollectionExtensions.AddEmissionsServices(IServiceCollection services, IConfiguration configuration) in /app/GSF.CarbonAware/src/Configuration/ServiceCollectionExtensions.cs:line 31
      at Program.<Main>$(String[] args) in /app/CarbonAware.WebApi/src/Program.cs:line 45
  Error: Failed to initialize container ghcr.io/green-software-foundation/carbon-aware-sdk:latest
Error: One or more containers failed to start.

It is caused by #450. We have to configure data source since this.

The error was occurred in detect-webapi-version.yaml, however I found same issue in both 4.a.1-generate-webapi-client-java.yaml and 4.a.1-generate-webapi-client-npm.yaml. So I also fix them in this PR.

Changes

Add 2 environment variables to GHA service container.

Checklist

  • Local Tests Passing?
  • CICD and Pipeline Tests Passing?
  • Added any new Tests?
  • Documentation Updates Made?
  • Are there any API Changes? If yes, please describe below.
  • This is not a breaking change. If it is, please describe it below.

Are there API Changes?

No

Is this a breaking change?

No

@YaSuenag YaSuenag requested a review from vaughanknight as a code owner May 20, 2025 08:46
@danuw danuw merged commit ad730f3 into Green-Software-Foundation:dev May 27, 2025
9 checks passed
@YaSuenag YaSuenag deleted the pr/add-env-to-workflows branch May 27, 2025 07:26
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 this pull request may close these issues.

2 participants