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

Data scratch - OS versions #1750

Closed
jan-goral opened this issue Mar 29, 2021 · 0 comments · Fixed by #1833
Closed

Data scratch - OS versions #1750

jan-goral opened this issue Mar 29, 2021 · 0 comments · Fixed by #1833

Comments

@jan-goral
Copy link
Contributor

Plan

According to the specification described in epic #1727
add abstraction and implementation for the following part of the data layer:

Abstraction

ftl/data/OsVersion.kt

package ftl.data

val fetchAndroidOsVersion: OsVersion.Android.Fetch get() = TODO()
val fetchIosOsVersion: OsVersion.Ios.Fetch get() = TODO()

object OsVersion {

    data class Android(
        val apiLevel: Int,
        val codeName: String,
        val distribution: Distribution,
        val id: String,
        val releaseDate: Date,
        val tags: List<String>,
        val versionString: String,
    ) {
        interface Fetch : (projectId: String) -> List<Android>
    }

    data class Ios(
        val id: String,
        val majorVersion: Int,
        val minorVersion: Int,
        val supportedXcodeVersionIds: List<String>,
        val tags: List<String>,
    ) {
        interface Fetch : (projectId: String) -> List<Ios>
    }
}

Target

  • AndroidVersionsListCommand -> AndroidCatalog/supportedVersionsAsTable -> AndroidCatalog/getVersionsList
  • IosVersionsListCommand -> IosCatalog/softwareVersionsAsTable -> IosCatalog/getVersionsList
  • AndroidArgs/validate -> AndroidArgs/assertDevicesSupported -> AndroidCatalog/androidVersionIds -> AndroidCatalog/deviceCatalog(projectId).versions

Adapter

  • ftl/adapter/GoogleOsVersionAndroidFetch.kt
  • ftl/adapter/GoogleOsVersionIosFetch.kt
@adamfilipow92 adamfilipow92 self-assigned this Apr 19, 2021
@mergify mergify bot closed this as completed in #1833 Apr 23, 2021
mergify bot pushed a commit that referenced this issue Apr 23, 2021
Fixes #1750 

## Test Plan
> How do we know the code works?

* Code is refactored according to the description in #1750 
* os version commands (list and describe) works as before

## Checklist

- [X] Unit tested
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants