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

Improve Cloudflare Worker postComment metadata #34

Open
gentlementlegen opened this issue Oct 30, 2024 · 10 comments
Open

Improve Cloudflare Worker postComment metadata #34

gentlementlegen opened this issue Oct 30, 2024 · 10 comments

Comments

@gentlementlegen
Copy link
Member

gentlementlegen commented Oct 30, 2024

          @whilefoo A thing we could do for Workers is to put the url to the logs, that would look like

https://dash.cloudflare.com/${env.CLOUDFLARE_ACCOUNT_ID}/workers/services/view/${env.CLOUDFLARE_WORKER_NAME}/production/observability/logs?granularity=0&time=${timeParam}

However this would require worker deployments to upload these values as they are not accessible through a worker by default. What do you think?

If yes, it should be its own task I believe.

Originally posted by @gentlementlegen in ubiquity-os/ubiquity-os-kernel#169 (comment)

postComment can post the url for an Action worker, but doesn't not have context for a Worker run. What could be done is adding a url to the dashboard with the time of the run as a filter so that we instantly have the related logs displayed.

Code snippet:

const toTime = Date.now() + 60000;
    const fromTime = Date.now() - 60000;
    const timeParam = encodeURIComponent(`{"type":"absolute","to":${toTime},"from":${fromTime}}`);

    console.log(
      `https://dash.cloudflare.com/${env.CLOUDFLARE_ACCOUNT_ID}/workers/services/view/${env.CLOUDFLARE_WORKER_NAME}/production/observability/logs?granularity=0&time=${timeParam}`
    );

This would imply uploading CLOUDFLARE_ACCOUNT_ID and CLOUDFLARE_WORKER_NAME during worker deployment as these values are not available by default.

To achieve this, a new reusable GitHub action could be created to avoid having to modify each upload script from every worker plugin. This would greatly benefit all the projects and make deployment simpler.

@gentlementlegen gentlementlegen changed the title @whilefoo A thing we could do for Workers is to put the url to the logs, that would look like Improve Cloudflare Worker postComment metadata Oct 30, 2024
@gentlementlegen
Copy link
Member Author

/help

Copy link

ubiquity-os bot commented Oct 30, 2024

Available Commands

Command Description Example
/help List all available commands. /help

Copy link

Available Commands

Command Description Example
/help List all available commands. /help
/allow Allows the user to modify the given label. /allow @user1 label
/query Returns the user's wallet, access, and multiplier information. /query @UbiquityOS
/start Assign yourself to the issue. /start
/stop Unassign yourself from the issue. /stop
/wallet Register your wallet address for payments. /wallet ubq.eth

@gentlementlegen
Copy link
Member Author

/start @Keyrxng

Copy link

Deadline Wed, Nov 6, 8:20 AM UTC
Beneficiary 0x0fC1b909ba9265A846b82CF4CE352fc3e7EeB2ED

Tip

  • Use /wallet 0x0000...0000 if you want to update your registered payment wallet address.
  • Be sure to open a draft pull request as soon as possible to communicate updates on your progress.
  • Be sure to provide timely updates to us when requested, or you will be automatically unassigned from the task.

@gentlementlegen
Copy link
Member Author

@Keyrxng Tried to start it for you but something didn't go as expected, maybe because you're not part of this repository, please start when you can.

@gentlementlegen gentlementlegen removed their assignment Nov 6, 2024
@Keyrxng
Copy link
Member

Keyrxng commented Nov 6, 2024

/start

Copy link

Deadline Wed, Nov 6, 9:37 AM UTC
Beneficiary 0xAe5D1F192013db889b1e2115A370aB133f359765

Tip

  • Use /wallet 0x0000...0000 if you want to update your registered payment wallet address.
  • Be sure to open a draft pull request as soon as possible to communicate updates on your progress.
  • Be sure to provide timely updates to us when requested, or you will be automatically unassigned from the task.

Copy link

Passed the deadline and no activity is detected, removing assignees: @Keyrxng.

@Keyrxng
Copy link
Member

Keyrxng commented Nov 23, 2024

This should be transferred into https://github.com/ubiquity-os/plugin-sdk

Also when this is labelled I'm happy to re-sub the PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants