-
Notifications
You must be signed in to change notification settings - Fork 13
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
Add export functionality to Bailo #515
Conversation
@@ -2,7 +2,7 @@ import { getAccessToken } from '../routes/v1/registryAuth.js' | |||
import { consoleLog } from '../utils/logger.js' | |||
|
|||
async function main() { | |||
const model = 'nginx' | |||
const model = 'test_deployment/test_yolo' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure this should be this?
backend/src/routes/v1/export.ts
Outdated
// Set .zip extension to request header | ||
res.set('Content-disposition', `attachment; filename=${uuid}.zip`) | ||
res.set('Content-Type', 'application/zip') | ||
// res.set('Cache-Control', 'private, max-age=604800, immutable') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove unused comments?
backend/src/types/types.ts
Outdated
blobSum: string | ||
} | ||
|
||
export interface ImageManifest { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can probably get rid of this now as it won't be accurate or used
backend/src/routes.ts
Outdated
@@ -100,4 +101,6 @@ server.get('/api/v1/admin/logs', ...getApplicationLogs) | |||
server.get('/api/v1/admin/logs/build/:buildId', ...getItemLogs) | |||
server.get('/api/v1/admin/logs/approval/:approvalId', ...getItemLogs) | |||
|
|||
server.get('/api/v1/export/:uuid/:deploymentId/version/:version', ...exportModel) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can get the uuid from the deploymentId, so we don't actually need the uuid value here.
frontend/cypress/e2e/model.cy.ts
Outdated
@@ -147,6 +147,8 @@ describe('Model with code and binary files', () => { | |||
cy.fixture('minimal_metadata.json').then((modelMetadata) => { | |||
const imageName = `${registryUrl}/${deploymentUuid}/${modelUuid}:${modelMetadata.highLevelDetails.modelCardVersion}` | |||
cy.exec(`docker login ${registryUrl} -u ${'user'} -p ${dockerPassword}`) | |||
// eslint-disable-next-line cypress/no-unnecessary-waiting | |||
cy.wait(30000) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change this to checking every x seconds with:
cy.exec('npm run build', { failOnError: false }).then((result) => {
// yields the 'result' object
// {
// code: 0,
// stdout: "Files successfully built",
// stderr: ""
// }
})
No description provided.