forked from mlflow/mlflow
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'mlflow:master' into master
- Loading branch information
Showing
657 changed files
with
25,449 additions
and
9,455 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
module.exports = async ({ context, github, workflow_id }) => { | ||
const { owner, repo } = context.repo; | ||
const { data: workflowRunsData } = await github.rest.actions.listWorkflowRuns({ | ||
owner, | ||
repo, | ||
workflow_id, | ||
event: "schedule", | ||
}); | ||
|
||
if (workflowRunsData.total_count === 0) { | ||
return; | ||
} | ||
|
||
const { id: run_id, conclusion } = workflowRunsData.workflow_runs[0]; | ||
if (conclusion === "success") { | ||
return; | ||
} | ||
|
||
const jobs = await github.paginate(github.rest.actions.listJobsForWorkflowRun, { | ||
owner, | ||
repo, | ||
run_id, | ||
}); | ||
const failedJobs = jobs.filter((job) => job.conclusion !== "success"); | ||
if (failedJobs.length === 0) { | ||
return; | ||
} | ||
|
||
await github.rest.actions.reRunWorkflowFailedJobs({ | ||
repo, | ||
owner, | ||
run_id, | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Cross version tests sometimes fail due to transient errors. This workflow reruns failed tests. | ||
name: rerun-cross-version-tests | ||
|
||
on: | ||
schedule: | ||
# Run this workflow daily at 17:00 UTC (4 hours after cross-version-tests.yml workflow) | ||
- cron: "0 17 * * *" | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
set-matrix: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
if: github.repository == 'mlflow-automation/mlflow' | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/github-script@v6 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
script: | | ||
const rerun = require(`${process.env.GITHUB_WORKSPACE}/.github/workflows/rerun.js`); | ||
await rerun({ context, github, workflow_id: "cross-version-tests.yml" }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
"""The jwt_auth.py example in this module directory is also used by | ||
tests/server/auth/test_auth.py.""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
"""Sample JWT authentication module for testing purposes. | ||
NOT SUITABLE FOR PRODUCTION USE. | ||
""" | ||
import logging | ||
from typing import Union | ||
|
||
import jwt | ||
from flask import Response, make_response, request | ||
from werkzeug.datastructures import Authorization | ||
|
||
BEARER_PREFIX = "bearer " | ||
|
||
_logger = logging.getLogger(__name__) | ||
|
||
|
||
def authenticate_request() -> Union[Authorization, Response]: | ||
_logger.debug("Getting token") | ||
error_response = make_response() | ||
error_response.status_code = 401 | ||
error_response.set_data( | ||
"You are not authenticated. Please provide a valid JWT Bearer token with the request." | ||
) | ||
error_response.headers["WWW-Authenticate"] = 'Bearer error="invalid_token"' | ||
|
||
token = request.headers.get("Authorization") | ||
if token is not None and token.lower().startswith(BEARER_PREFIX): | ||
token = token[len(BEARER_PREFIX) :] # Remove prefix | ||
try: | ||
# NOTE: | ||
# - This is a sample implementation for testing purposes only. | ||
# - Here we're using a hardcoded key, which is not secure. | ||
# - We also aren't validating that the user exists. | ||
token_info = jwt.decode(token, "secret", algorithms=["HS256"]) | ||
if not token_info: # pragma: no cover | ||
_logger.warning("No token_info returned") | ||
return error_response | ||
|
||
return Authorization(auth_type="jwt", data=token_info) | ||
except jwt.exceptions.InvalidTokenError: | ||
pass | ||
|
||
_logger.warning("Missing or invalid authorization token") | ||
return error_response |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.