GithubHelp home page GithubHelp logo

green-software-foundation / carbon-ci Goto Github PK

View Code? Open in Web Editor NEW
49.0 49.0 9.0 181 KB

This project aims to build the capability to calculate the carbon emissions of an application via static analysis of the code and any infrastructure as code files in a repository.

License: MIT License

JavaScript 2.33% Dockerfile 1.84% Shell 17.96% Go 65.41% HCL 12.46%

carbon-ci's People

Contributors

dennisdelamida avatar dtejares23 avatar ferguskidd avatar holanita avatar iibuan avatar jerricotandelacruz avatar rainiermendiola avatar sealjay avatar seanmcilroy29 avatar sophietn avatar tcostantini avatar willmish avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

carbon-ci's Issues

Basic visible output for the GitHub action

As discussed during weekly syncs, I suggest adding a basic output for the GitHub action as a Github comment for a start.

Next, a dashboard with data of previous runs can be linked instead, described in detail in ISSUE

More detailed output on from the Github Action

As mentioned in #18 , a more detailed visualisation is necessary with data from previous runs stored and available for comparison. Required steps:

  • Storing data from previous runs:
    • JSON/CSV file saved in repo
    • Outside database service (e.g. cloud) centrally hosted for all users
  • Displaying past and current data on a graph, E.g. Python for plotting and generating image of the graph. Possible option for displaying:
    • As a GitHub comment with an embedded image (can be based off of this)
    • As a github pages with a static generated image
    • As a dynamic webapp with user interaction

[Feature]: Carbon Aware SDK project

The Carbon aware SDK project provides a standardised API + CLI for getting carbon intensity data for different electricity grids around the world, so can be integrated into this project, instead of replicating its efforts.

Suggested implementation approaches:

  1. (Preferred) - using CLI:
  • Add Carbon Aware SDK CLI as a step in the github action, use its output for estimating the carbon footprint of infrastructure
  1. Using web API - will need a separate application deployment to be used, so can only be displayed as a demo here
  • Utilise carbon Aware SDK's client for golang to implement SDK polling directly in the goLang script
  • Deploy a Web API accessible by the pipeline to be polled

Azure Pipeline support

I have been looking on carbon_measure.go for a while. I see there are "GitHub output" actions used. Inside of these functions there are printing on console. Does it mean it is supporting only GitHub pipelines (GitHub Actions) at the moment ?
We would like to run carbon task (execute carbon_measure.go) on Azure Pipelines. Are you going to support integration in Azure Pipelines also ?

[Bug]: Missing support for nested templates in ARM (multiple file projects)

Currently when the application is passed a path to an ARM template, it will only parse the main file referenced, even if other templates (files) are linked in the original file.

Possible solutions:

  1. adding a preprocessor of ARM files to expand all variables and linked templates, to dump into a single file

  2. Check how VsCode recognises linked templates: uses .parameters.json file as well to identify linked templates, so maybe that is something to look into

  3. Find an open source tool that does the pre-processing

Bug: Incorrect handling of missing carbon rate provider

Program crashes if incorrect WattTime credentials

Currently the program crashes with a runtime error invalid memory address or nil pointer dereference if the WattTime credentials are incorrect or missing.

Program continues without notifying the user when Electricitymap credentials missing/incorrect

If the credentials are missing, it will return a 0 as if that was the actual value.

Alternate handling for both cases

Gracefully handle the error (e.g. using defer, panic and recover mechanism) for WattTime credentials. Raise an error in GitHub Action (using core.setFailed()), to notify that the credentials are missing/incorrect.

Add identifying of missing credentials for Electricitymap, and handle them likewise.

contradiction in "Rights to your contributions"

These 2 points contradict each other.
1st states that you must have authored 100% and 2nd explain that it's not necessary to author 100%.
I suggest this case is raised as a good first-time issue for some friendly technical writer to fix.

Agree that you have authored 100% of the content
...
Agree that, if you did not author 100% of the content, the appropriate licenses and copyrights have been added along with any other necessary attribution.

File: https://github.com/Green-Software-Foundation/Carbon_CI_Pipeline_Tooling/blob/Dev/CONTRIBUTING.md

Screenshot: image

[Feature]: Output dashboard for the GitHub Action

The Pipeline needs a more detailed visible output, with estimated carbon emission values from previous runs. @lydia-rc was originally working on this here. (Waiting for a Draft PR to be opened, will be linked here when it does)

My suggestion (based on discussions from the project group) for the dashboard is:

  • Image embedded in a PR comment
  • Alternatively (/additionally): GitHub pages deployment of the dashboard?
  • Storing data from previous runs in the repository under .github/data folder, as a .csv/.json/.yaml file (discussion on the format tracked here)
  • Displaying the data as a barchart comparing previous infrastructures/runs of the pipeline against current
  • Display the current deployment as a piechart of different Resources (and/or resource groups?) and their contribution to the carbon footprint

ARM template with nested templates by using 'templateLink' parameter

I have been debugging carbon_measure.go script on my local machine and i detected there is iteration of resources across ARM template. Inside this iteration there is "template" parameter for resource required. We are using "templateLink" parameter (url of template) instead of direct definition by using "template" parameter. Are you going to support "templateLink" also ?

Add Watt Time integration

We are currently connected to Electricity Map. Not Watt Time yet.
We need to configure / integrate with Watt Time

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.