Skip to content

Commit

Permalink
Remove photon and graviton selectors in `compute.SparkVersionRequ… (
Browse files Browse the repository at this point in the history
#622)

## Changes
Removed `photon` and `graviton` selectors in
`compute.SparkVersionRequest`

Solves #619 

## Tests
<!-- 
How is this tested? Please see the checklist below and also describe any
other relevant tests
-->

- [x] `make test` passing
- [x] `make fmt` applied
- [x] relevant integration tests applied
  • Loading branch information
840 authored Oct 12, 2023
1 parent 0c01033 commit 35237f3
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions service/compute/spark_version.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ type SparkVersionRequest struct {
GPU bool `json:"gpu,omitempty" tf:"optional,default:false"`
Scala string `json:"scala,omitempty" tf:"optional,default:2.12"`
SparkVersion string `json:"spark_version,omitempty" tf:"optional,default:"`
Photon bool `json:"photon,omitempty" tf:"optional,default:false"`
Graviton bool `json:"graviton,omitempty"`
}

type sparkVersionsType []string
Expand Down Expand Up @@ -57,8 +55,6 @@ func (sv GetSparkVersionsResponse) Select(req SparkVersionRequest) (string, erro
(strings.Contains(version.Key, "-ml-") == req.ML) &&
(strings.Contains(version.Key, "-hls-") == req.Genomics) &&
(strings.Contains(version.Key, "-gpu-") == req.GPU) &&
(strings.Contains(version.Key, "-photon-") == req.Photon) &&
(strings.Contains(version.Key, "-aarch64-") == req.Graviton) &&
(strings.Contains(version.Name, "Beta") == req.Beta))
if matches && req.LongTermSupport {
matches = (matches && (strings.Contains(version.Name, "LTS") || strings.Contains(version.Key, "-esr-")))
Expand Down

0 comments on commit 35237f3

Please sign in to comment.