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 authentication to autoreload, get rid of warning, add replica log… #1750

Merged
merged 2 commits into from
Apr 22, 2024

Conversation

lastmjs
Copy link
Member

@lastmjs lastmjs commented Apr 19, 2024

Closes #1749

When we first implemented autoreloading, we did not add any authentication to the canister method. So we made sure to not compile it into the canister unless the AZLE_AUTORELOAD environment variable was set to true, and then if deploying to non-local network we logged a warning to the user.

Now we can easily create authenticated agents using the developer's own dfx identity, and so I've added an authentication guard to the reload_js canister method. I've also changed the name of the guard to something I like better from doing the same thing in Kybra. I've also changed the wording of the error message slightly.

I've removed the warning in Azle when deploying to a non-local network. I've added a log to the replica when the JS is fully reloaded

Copy link
Member

@bdemann bdemann left a comment

Choose a reason for hiding this comment

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

Looks good! There is one failing tests that will be critical to fix with large files

@lastmjs lastmjs merged commit 98381d7 into main Apr 22, 2024
124 of 126 checks passed
@lastmjs lastmjs deleted the reloadjs_auth branch July 19, 2024 16:46
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.

get reloadjs to be authenticated now...maybe it should work in production?
2 participants