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

feat: automate Crossplane generation process #26

Open
wants to merge 28 commits into
base: main
Choose a base branch
from

Conversation

yfodil
Copy link
Contributor

@yfodil yfodil commented Dec 5, 2023

No description provided.

@yfodil yfodil added the enhancement New feature or request label Dec 5, 2023
@yfodil yfodil self-assigned this Dec 5, 2023
@remyleone remyleone added the priority:high New features label Jan 11, 2024
.github/workflows/ci.yml Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Jun 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (main@1d90016). Learn more about missing BASE report.

Additional details and impacted files
@@          Coverage Diff           @@
##             main     #26   +/-   ##
======================================
  Coverage        ?   0.00%           
======================================
  Files           ?     347           
  Lines           ?   33787           
  Branches        ?       0           
======================================
  Hits            ?       0           
  Misses          ?   33787           
  Partials        ?       0           
Flag Coverage Δ
unittests 0.00% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@yfodil yfodil marked this pull request as ready for review August 7, 2024 07:57
.github/workflows/update-terraform-provider.yaml Outdated Show resolved Hide resolved
.github/workflows/update-terraform-provider.yaml Outdated Show resolved Hide resolved
}

config := tools.ResourceConfig{
PackageName: strings.ToLower(strings.ReplaceAll(resource.SubCategory, " ", "")), // Convert "Apple Silicon" to "applesilicon"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you extract it and include some tests for this function? I'm betting that it will be probably from this piece of code that we will have unexpected behavior in some code generation.

"text/template"

"github.com/pkg/errors"
"github.com/scaleway/provider-scaleway/config/tools"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is crossplane missing here? What is the go.mod you are targeting with this?

const ExternalNameGoFilePath = "config/external_name.go"

func parseTemplates() (*template.Template, error) {
templatePath := "config/config_templates.tmpl"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could it be a embedding static file? That way if we try to compile if the file is missing/moved the compilation step won't pass.

id: check_release
run: ./scripts/check_version.sh

- name: Read Current Terraform Provider Version from Makefile
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to have the full workflow inside a script so that it can be launched locally even if github action is down

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority:high New features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants