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

[TT-561] move chainlink-env as a package (commit-splitted) #747

Merged
merged 3 commits into from
Oct 27, 2023

Conversation

Tofel
Copy link
Contributor

@Tofel Tofel commented Oct 24, 2023

Changes:

  • chainlink-env code needs migrated and converted to a package ✅
  • all import paths updated ✅
  • fixed all issues reported by linterns ✅
    ** imports and examples excluded from analysia
  • the ci and tests migrated and passing ✅
  • Dockerfiles adjusted and working ✅
  • Infra permissions will need to be added to chainlink-testing-framework to push the expected docker images into ECR ❓ @tateexon
  • chainlink tests work using migrated code: PR

@Tofel Tofel temporarily deployed to integration October 24, 2023 14:46 — with GitHub Actions Inactive
@Tofel Tofel force-pushed the tt_651_migrate_chainlink_env_splitted branch from f39d61e to b31a011 Compare October 24, 2023 14:58
@Tofel Tofel temporarily deployed to integration October 24, 2023 14:58 — with GitHub Actions Inactive
@Tofel Tofel temporarily deployed to integration October 24, 2023 14:58 — with GitHub Actions Inactive
@codecov-commenter
Copy link

codecov-commenter commented Oct 24, 2023

Codecov Report

Attention: 6 lines in your changes are missing coverage. Please review.

Comparison is base (ccb8ba3) 21.43% compared to head (260ff81) 21.75%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #747      +/-   ##
==========================================
+ Coverage   21.43%   21.75%   +0.32%     
==========================================
  Files          31       32       +1     
  Lines        4167     4183      +16     
==========================================
+ Hits          893      910      +17     
+ Misses       3182     3181       -1     
  Partials       92       92              
Files Coverage Δ
client/mockserver.go 39.69% <ø> (ø)
client/postgres.go 0.00% <ø> (ø)
logging/log.go 56.52% <ø> (+13.04%) ⬆️
blockchain/ethereum.go 0.00% <0.00%> (ø)
k8s/config/overrides.go 68.75% <68.75%> (ø)

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

@Tofel Tofel temporarily deployed to integration October 24, 2023 15:05 — with GitHub Actions Inactive
@tateexon
Copy link
Contributor

It might make sense to put the chainlink-env package into a folder called k8s instead of env. My reasoning for this is that we have a folder called docker which hosts the docker specific stuff so it makes sense if you want to look for k8s specific stuff you would open the k8s folder instead of env.

@Tofel Tofel force-pushed the tt_651_migrate_chainlink_env_splitted branch from b31a011 to 65125d5 Compare October 24, 2023 16:02
@Tofel Tofel temporarily deployed to integration October 24, 2023 16:02 — with GitHub Actions Inactive
@Tofel Tofel force-pushed the tt_651_migrate_chainlink_env_splitted branch from 65125d5 to 4612bed Compare October 24, 2023 16:09
@Tofel Tofel temporarily deployed to integration October 24, 2023 16:09 — with GitHub Actions Inactive
@Tofel Tofel temporarily deployed to integration October 24, 2023 16:09 — with GitHub Actions Inactive
@Tofel Tofel temporarily deployed to integration October 24, 2023 16:15 — with GitHub Actions Inactive
@Tofel Tofel force-pushed the tt_651_migrate_chainlink_env_splitted branch from 55049e8 to 260ff81 Compare October 24, 2023 17:06
@Tofel Tofel temporarily deployed to integration October 24, 2023 17:06 — with GitHub Actions Inactive
@Tofel Tofel temporarily deployed to integration October 24, 2023 17:06 — with GitHub Actions Inactive
@Tofel Tofel temporarily deployed to integration October 24, 2023 17:13 — with GitHub Actions Inactive
Copy link
Contributor

@tateexon tateexon left a comment

Choose a reason for hiding this comment

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

The part I am unsure about is whether we should add this as a package or just migrate the code in so we only have the 1 go project. They both have their pros and cons. 1 go project is easier to work within but the separation of the two may make it easier for projects that only want to import 1 part or the other. I think most projects will use both anyways so it may make sense to have it just be 1 project instead of two. @AnieeG @skudasov @kalverra @gheorghestrimtu @lukaszcl Thoughts?

@Tofel
Copy link
Contributor Author

Tofel commented Oct 25, 2023

@tateexon also thought about that and checked how many projects use only chainlink-env and yes, there were a couple (e.g. Atlas from @gheorghestrimtu).

In the end I decided against having env as a separate module, because:

  • it would have to share the same tag as CTF unless we went with git subtree, which would increase complexity (e.g. we couldn't commit changes to CTF and k8s in the same commit)
  • CTF isn't that heavy of a module/repo to worry about having to download it and it's dependency, when you only need k8s code
    and a couple of others that I cannot recall now (had them written down, but didn't save/share).

Anyway let me know your thoughts guys.

Also, I was thinking that if we stick to packages qa-charts could be put in k8s/charts?

@lukaszcl
Copy link
Contributor

lukaszcl commented Oct 25, 2023

@tateexon @Tofel +1 for a single go project. I think it makes more sense here. Also, I think we should have one CTF tag.

Also, I was thinking that if we stick to packages qa-charts could be put in k8s/charts?
@Tofel yes, that looks good

tateexon
tateexon previously approved these changes Oct 25, 2023
@tateexon tateexon dismissed their stale review October 25, 2023 15:50

Removing my review for now in case we switch to 1 go project

@tateexon tateexon marked this pull request as ready for review October 25, 2023 17:21

```go
// We use the chainlink-env library to make and handle deployed resources
import "github.com/smartcontractkit/chainlink-env/environment"
// We use the env package to make and handle deployed resources
Copy link
Contributor

Choose a reason for hiding this comment

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

The package name in comment

@sebawo
Copy link
Collaborator

sebawo commented Oct 26, 2023

@tateexon @Tofel +1 for a single go project. I think it makes more sense here. Also, I think we should have one CTF tag.

I agree we should have one release cycle for CTF+chainlink-env+qa-charts. This is one of the motivations to merge repos and have separate releases for modules.

@tateexon tateexon temporarily deployed to integration October 27, 2023 16:39 — with GitHub Actions Inactive
@tateexon tateexon temporarily deployed to integration October 27, 2023 16:39 — with GitHub Actions Inactive
@cl-sonarqube-production
Copy link

SonarQube Quality Gate

Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots (100.0% 100.0% reviewed)
Code Smell A 908 Code Smells

No Coverage information No Coverage information
2.6% 2.6% Duplication

@tateexon tateexon temporarily deployed to integration October 27, 2023 16:45 — with GitHub Actions Inactive
@tateexon tateexon merged commit 9862cc5 into main Oct 27, 2023
10 checks passed
@tateexon tateexon deleted the tt_651_migrate_chainlink_env_splitted branch October 27, 2023 17:04
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.

6 participants