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

Add export functionality to Bailo #515

Merged
merged 15 commits into from
Jun 7, 2023
Merged

Add export functionality to Bailo #515

merged 15 commits into from
Jun 7, 2023

Conversation

a3957273
Copy link
Member

No description provided.

@@ -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'
Copy link
Member

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?

// 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')
Copy link
Member

Choose a reason for hiding this comment

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

remove unused comments?

blobSum: string
}

export interface ImageManifest {
Copy link
Member

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

@@ -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)
Copy link
Member Author

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.

@@ -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)
Copy link
Member Author

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: ""
// }
})

@a3957273 a3957273 merged commit 6d7e7c8 into main Jun 7, 2023
@a3957273 a3957273 deleted the BAI-443-Model-Export branch June 7, 2023 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants