Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Add default cluster pool assignments to config #600

Merged
merged 3 commits into from
Aug 10, 2023

Conversation

katrogan
Copy link
Contributor

@katrogan katrogan commented Aug 10, 2023

TL;DR

Add default cluster pool assignments as application config options

Type

  • Bug Fix
  • Feature
  • Plugin

Are all requirements met?

  • Code completed
  • Smoke tested
  • Unit tests added
  • Code documentation added
  • Any pending items have an associated Issue

Complete description

How did you fix the bug, make the feature etc. Link to any design docs etc

Tracking Issue

flyteorg/flyte#2248

Follow-up issue

NA

Signed-off-by: Katrina Rogan <katroganGH@gmail.com>
Signed-off-by: Katrina Rogan <katroganGH@gmail.com>
@codecov
Copy link

codecov bot commented Aug 10, 2023

Codecov Report

Merging #600 (c88f744) into master (478b64c) will increase coverage by 1.56%.
The diff coverage is 63.63%.

❗ Current head c88f744 differs from pull request most recent head 5441d8a. Consider uploading reports for the commit 5441d8a to get more accurate results

@@            Coverage Diff             @@
##           master     #600      +/-   ##
==========================================
+ Coverage   58.66%   60.22%   +1.56%     
==========================================
  Files         170      171       +1     
  Lines       16453    13443    -3010     
==========================================
- Hits         9652     8096    -1556     
+ Misses       5950     4496    -1454     
  Partials      851      851              
Flag Coverage Δ
unittests ?

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

Files Changed Coverage Δ
pkg/runtime/configuration_provider.go 56.25% <33.33%> (-3.75%) ⬇️
pkg/runtime/cluster_pool_assignment_provider.go 50.00% <50.00%> (ø)
pkg/manager/impl/execution_manager.go 73.11% <100.00%> (+2.62%) ⬆️

... and 155 files with indirect coverage changes

"github.com/flyteorg/flytestdlib/config"
)

const clusterPoolsKey = "cluster_pools"
Copy link
Contributor

Choose a reason for hiding this comment

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

Dont we use camel case every where for the keys. Would be good to keep this consistent with other configs

Copy link
Contributor Author

Choose a reason for hiding this comment

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

clusterPoolAssignment := m.config.ClusterPoolAssignmentConfiguration().GetClusterPoolAssignments()[request.GetDomain()]

return &admin.ClusterAssignment{
ClusterPoolName: clusterPoolAssignment.Pool,
Copy link
Contributor

Choose a reason for hiding this comment

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

What happens in case this comes as an empty pool name

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Existing behavior is preserved, we just don't assign a clusterpool which is fine.

Pool string `json:"pool"`
}

type ClusterPoolAssignments = map[DomainName]ClusterPoolAssignment
Copy link
Contributor

Choose a reason for hiding this comment

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

Are these strictly going to be defined only per domain, what if we needed it also at project-domain level or is that not something we are considering for this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Already implemented as a matchable attribute #376

Signed-off-by: Katrina Rogan <katroganGH@gmail.com>
@katrogan katrogan merged commit 86c00cc into master Aug 10, 2023
14 checks passed
@katrogan katrogan deleted the cluster-pool-assignment branch August 10, 2023 16:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants