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

Chore: use generics in pagination #417

Merged
merged 1 commit into from
Jun 12, 2022

Conversation

TomerHeber
Copy link
Collaborator

@TomerHeber TomerHeber commented Jun 11, 2022

Issue & Steps to Reproduce / Feature Request

closes #415

Solution

Harness was running in go1.17 because the terraform docker image was using golang 1.17.
Switched to using a go1.18 docker image and installed terraform via apk.

Making this change allows me to use generics (A new feature in go1.18).

@TomerHeber TomerHeber force-pushed the chore-use-generics-in-pagination-#415 branch from e177ac2 to 2987cf3 Compare June 11, 2022 02:45
@TomerHeber TomerHeber changed the title WIP Chore: use generics in pagination Jun 11, 2022
timeout-minutes: 20
steps:
- name: Install Go
run: apk add go
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

no need to install go - 1.18 is already installed as part of the docker image.
Before it would install go1.17.

- name: Install Go
run: apk add go
- name: Install Terraform
run: apk add terraform
Copy link
Collaborator Author

@TomerHeber TomerHeber Jun 11, 2022

Choose a reason for hiding this comment

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

installing terraform instead...

- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

noticed some depreciation warnings. Went away when switching to v3.

.pre-commit-config.yaml Outdated Show resolved Hide resolved
type Paginated interface {
// FIXME: Environment
Environment
Copy link
Collaborator Author

@TomerHeber TomerHeber Jun 11, 2022

Choose a reason for hiding this comment

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

Adding back the generics in this file...
In case more paging is added in the future to other API calls. Generics will make it very simple to add support for.

@TomerHeber TomerHeber force-pushed the chore-use-generics-in-pagination-#415 branch from 2987cf3 to 19ff58a Compare June 11, 2022 03:08
@github-actions github-actions bot added ready to merge PR approved - can be merged once the PR owner is ready and removed pending final review labels Jun 12, 2022
@TomerHeber TomerHeber merged commit ec1993b into main Jun 12, 2022
@TomerHeber TomerHeber deleted the chore-use-generics-in-pagination-#415 branch June 12, 2022 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-client chore github-actions ready to merge PR approved - can be merged once the PR owner is ready
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Chore: use generics in pagination
2 participants