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 primaryJob to deploy manifest and output URI.txt when running polywrap deploy #1592

Merged
merged 11 commits into from
Mar 2, 2023

Conversation

krisbitney
Copy link
Contributor

@krisbitney krisbitney commented Mar 1, 2023

This PR adds a new option to the deploy manifest, primaryJob. The option identifies the name of the job that is used for the primary deployment. The URI of the final step of the primary job is printed to polywrap.deployment.txt, which is output to the folder that contains the deploy manifest.

The primary deployment URI is also recorded in a historical log, with a timestamp, located at the .polywrap/deploy/deploy.log.

This PR enables the UX described in polywrap/uri-resolver-extensions#19

Copy link
Contributor

@pileks pileks left a comment

Choose a reason for hiding this comment

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

Overall looks good! I’d love to see the platform dropped from the docker compose file as it was causing issues for me.

One thing to note - Instead of having the deploy output text file be in the same folder as the deploy manifest, we should have a deployments folder inside the .polywrap folder, with each deployment output being recorded in a datetime-named file, similar to how we export logs using the -l, --log-file option.
Also, it would be prudent to let the user know that a file has been output by logging something in the lines of “The output of the primary job has been logged into “./polywrap/deploys/primary-job-20230301122234.txt” or however we name them.

We’d have historic logs inside a folder that can be safely deleted and is gitignored by default, which could prove useful in the future.

@krisbitney
Copy link
Contributor Author

Overall looks good! I’d love to see the platform dropped from the docker compose file as it was causing issues for me.

One thing to note - Instead of having the deploy output text file be in the same folder as the deploy manifest, we should have a deployments folder inside the .polywrap folder, with each deployment output being recorded in a datetime-named file, similar to how we export logs using the -l, --log-file option. Also, it would be prudent to let the user know that a file has been output by logging something in the lines of “The output of the primary job has been logged into “./polywrap/deploys/primary-job-20230301122234.txt” or however we name them.

We’d have historic logs inside a folder that can be safely deleted and is gitignored by default, which could prove useful in the future.

I like the idea of keeping a historic log.

The deployment file should ideally be in the root of the repo. The reason for adding is so that it can be retrieved by a URI resolver extension wrapper. That way users can import a wrapper from a URI like github.com/polywrap/toolchain. Ideally, users will soon be able to copy an past a repo URL from their browser into their schema and it will work without modification. That's what I'm working towards at the moment.

@krisbitney
Copy link
Contributor Author

To elaborate, we want people to commit the polywrap.deployment.txt file. If it's in the .polywrap folder, it will be ignored.

@krisbitney
Copy link
Contributor Author

krisbitney commented Mar 1, 2023

I added a historical deployment log stored at ./polywrap/deploy/deploy.log. Now "primary deployment" URIs are timestamped and recorded there.

pileks
pileks previously approved these changes Mar 1, 2023
…-uri

# Conflicts:
#	packages/js/client-config-builder/README.md
#	packages/js/client-config-builder/src/bundles/getDefaultConfig.ts
…r through getter method; renamed 'polywrap.deployment.txt' to 'URI.txt'
@dOrgJelli dOrgJelli changed the title Add primaryJob to deploy manifest and output polywrap.deployment.txt when running polywrap deploy Add primaryJob to deploy manifest and output URI.txt when running polywrap deploy Mar 2, 2023
@krisbitney krisbitney merged commit 4eb890e into origin-dev Mar 2, 2023
@dOrgJelli dOrgJelli deleted the kris/deployment-uri branch April 10, 2023 16:57
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