Skip to content

Commit

Permalink
Fix test workflows (#71)
Browse files Browse the repository at this point in the history
* Fix test workflows

* removed secrets after fork sync

* missing module

* removed unused workflows

* test fix

* test fix

* test fix
  • Loading branch information
kamaleybov authored Feb 22, 2024
1 parent 2d7282d commit 0418fa3
Show file tree
Hide file tree
Showing 12 changed files with 21 additions and 88 deletions.
7 changes: 0 additions & 7 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@ jobs:
with:
component: ${{ matrix.component }}
go-version: ${{ needs.unpack-envvars.outputs.go-version }}
secrets:
FLYTE_BOT_PAT: ${{ secrets.FLYTE_BOT_PAT }}
docker-build:
strategy:
fail-fast: false
Expand Down Expand Up @@ -118,14 +116,9 @@ jobs:
with:
component: ${{ matrix.component }}
go-version: ${{ needs.unpack-envvars.outputs.go-version }}
secrets:
FLYTE_BOT_PAT: ${{ secrets.FLYTE_BOT_PAT }}

build_docker_images:
name: Build Images
uses: ./.github/workflows/publish-images.yml
with:
push: false
secrets:
FLYTE_BOT_PAT: ${{ secrets.FLYTE_BOT_PAT }}
FLYTE_BOT_USERNAME: ${{ secrets.FLYTE_BOT_USERNAME }}
2 changes: 0 additions & 2 deletions .github/workflows/flyteidl-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,3 @@ jobs:
with:
component: flyteidl
go-version: ${{ needs.unpack-envvars.outputs.go-version }}
secrets:
FLYTE_BOT_PAT: ${{ secrets.FLYTE_BOT_PAT }}
7 changes: 0 additions & 7 deletions .github/workflows/go_generate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ on:
go-version:
required: true
type: string
secrets:
FLYTE_BOT_PAT:
required: true
jobs:
generate:
runs-on: ubuntu-latest
Expand All @@ -22,11 +19,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.FLYTE_BOT_PAT }}
- uses: bufbuild/buf-setup-action@v1
with:
github_token: ${{ secrets.FLYTE_BOT_PAT }}
- uses: actions/setup-go@v3
with:
go-version: ${{ inputs.go-version }}
Expand Down
14 changes: 0 additions & 14 deletions .github/workflows/helm-charts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,6 @@ jobs:
uses: actions/checkout@v3
- name: Install Helm
uses: azure/setup-helm@v3
# NOTE: Disable publishing
# - name: Login to GitHub Container Registry
# if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
# uses: docker/login-action@v2
# with:
# registry: ghcr.io
# username: "${{ secrets.FLYTE_BOT_USERNAME }}"
# password: "${{ secrets.FLYTE_BOT_PAT }}"
- name: Build helm chart
working-directory: charts
run: |
Expand All @@ -46,9 +38,3 @@ jobs:
echo "Chart package not found."
exit 1
fi
# NOTE: Disable publishing
# - name: Publish Helm chart to GHCR
# working-directory: charts
# if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
# run:
# helm push ${{ matrix.chart }}-*.tgz oci://ghcr.io/${{ github.repository_owner }}/helm-charts
25 changes: 0 additions & 25 deletions .github/workflows/stale.yml

This file was deleted.

3 changes: 0 additions & 3 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ on:
go-version:
required: true
type: string
secrets:
FLYTE_BOT_PAT:
required: true
jobs:
tests:
name: Run Unit Test
Expand Down
25 changes: 0 additions & 25 deletions .github/workflows/update_site.yml

This file was deleted.

6 changes: 5 additions & 1 deletion flyteadmin/pkg/manager/impl/task_manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import (
)

// Static values for test
const orgValue = ""
const projectValue = "foo"
const domainValue = "bar"
const nameValue = "baz"
Expand Down Expand Up @@ -353,11 +354,14 @@ func TestListUniqueTaskIdentifiers(t *testing.T) {
listFunc := func(input interfaces.ListResourceInput) (interfaces.TaskCollectionOutput, error) {
// Test that parameters are being passed in
assert.Equal(t, 100, input.Limit)
assert.Len(t, input.InlineFilters, 2)
assert.Len(t, input.InlineFilters, 3)
for idx, filter := range input.InlineFilters {
assert.Equal(t, common.Task, filter.GetEntity())
query, _ := filter.GetGormQueryExpr()
if idx == 0 {
assert.Equal(t, testutils.OrgQueryPattern, query.Query)
assert.Equal(t, "", query.Args)
} else if idx == 1 {
assert.Equal(t, testutils.ProjectQueryPattern, query.Query)
assert.Equal(t, "foo", query.Args)
} else {
Expand Down
8 changes: 6 additions & 2 deletions flyteadmin/pkg/manager/impl/workflow_manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -375,11 +375,14 @@ func TestGetWorkflow_TransformerError(t *testing.T) {
func TestListWorkflows(t *testing.T) {
repository := repositoryMocks.NewMockRepository()
workflowListFunc := func(input interfaces.ListResourceInput) (interfaces.WorkflowCollectionOutput, error) {
var projectFilter, domainFilter, nameFilter bool
assert.Len(t, input.InlineFilters, 3)
var orgFilter, projectFilter, domainFilter, nameFilter bool
assert.Len(t, input.InlineFilters, 4)
for _, filter := range input.InlineFilters {
assert.Equal(t, common.Workflow, filter.GetEntity())
queryExpr, _ := filter.GetGormQueryExpr()
if queryExpr.Args == orgValue && queryExpr.Query == testutils.OrgQueryPattern {
orgFilter = true
}
if queryExpr.Args == projectValue && queryExpr.Query == testutils.ProjectQueryPattern {
projectFilter = true
}
Expand All @@ -390,6 +393,7 @@ func TestListWorkflows(t *testing.T) {
nameFilter = true
}
}
assert.True(t, orgFilter, "Missing org equality filter")
assert.True(t, projectFilter, "Missing project equality filter")
assert.True(t, domainFilter, "Missing domain equality filter")
assert.True(t, nameFilter, "Missing name equality filter")
Expand Down
9 changes: 7 additions & 2 deletions flyteadmin/pkg/workflowengine/impl/interface_provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,15 @@ func getProviderForTest(t *testing.T) common.InterfaceProvider {
ExpectedInputs: &inputs,
ExpectedOutputs: &outputs,
}
bytes, _ := proto.Marshal(&launchPlanStatus)
spec := admin.LaunchPlanSpec{
FixedInputs: &core.LiteralMap{},
}
launchPlanStatusBytes, _ := proto.Marshal(&launchPlanStatus)
specBytes, _ := proto.Marshal(&spec)
provider, err := NewLaunchPlanInterfaceProvider(
models.LaunchPlan{
Closure: bytes,
Closure: launchPlanStatusBytes,
Spec: specBytes,
}, launchPlanIdentifier)
if err != nil {
t.Fatalf("Failed to initialize LaunchPlanInterfaceProvider for test with err %v", err)
Expand Down
1 change: 1 addition & 0 deletions flyteidl/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ require (
cloud.google.com/go/compute/metadata v0.2.3 // indirect
cloud.google.com/go/iam v1.1.2 // indirect
cloud.google.com/go/storage v1.30.1 // indirect
connectrpc.com/connect v1.14.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.2 // indirect
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.1 // indirect
github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 // indirect
Expand Down
2 changes: 2 additions & 0 deletions flyteidl/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RX
cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0=
cloud.google.com/go/storage v1.30.1 h1:uOdMxAs8HExqBlnLtnQyP0YkvbiDpdGShGKtx6U/oNM=
cloud.google.com/go/storage v1.30.1/go.mod h1:NfxhC0UJE1aXSx7CIIbCf7y9HKT7BiccwkR7+P7gN8E=
connectrpc.com/connect v1.14.0 h1:PDS+J7uoz5Oui2VEOMcfz6Qft7opQM9hPiKvtGC01pA=
connectrpc.com/connect v1.14.0/go.mod h1:uoAq5bmhhn43TwhaKdGKN/bZcGtzPW1v+ngDTn5u+8s=
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.2 h1:t5+QXLCK9SVi0PPdaY0PrFvYUo24KwA0QwxnaHRSVd4=
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.2/go.mod h1:bjGvMhVMb+EEm3VRNQawDMUyMMjo+S5ewNjflkep/0Q=
Expand Down

0 comments on commit 0418fa3

Please sign in to comment.