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

Automatically push updated snapshots for PRs #23759

Open
PatMyron opened this issue Jan 19, 2023 · 10 comments
Open

Automatically push updated snapshots for PRs #23759

PatMyron opened this issue Jan 19, 2023 · 10 comments
Labels
bug This issue is a bug. effort/medium Medium work item – several days of effort p3

Comments

@PatMyron
Copy link
Contributor

PatMyron commented Jan 19, 2023

Describe the feature

Small CDK contributions would be much easier if a Github action could run cdk-integ --dry-run and push updated snapshots, especially for PRs that are only failing those

Use Case

I mostly send drive-by PRs and haven't been able to get CDK building in Gitpod lately:
#21914

Even when I had CDK building successfully in Gitpod, it took hours to spin up the environment on Gitpod, build everything, and figure out Github auth in Gitpod

@PatMyron PatMyron added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Jan 19, 2023
@skinny85
Copy link
Contributor

Hey Pat! Not saying this is a bad idea, but I want to specifically focus on the Gitpod parts:

Even when I had CDK building successfully in Gitpod, it took hours to spin up the environment on Gitpod, build everything, and figure out Github auth in Gitpod

This is interesting, because:

  1. CDK should be running pre-builds, meaning your Gitpod environment should be ready to go the moment you create it, no waiting required.
  2. Gitpod integrates with GitHub, so no auth setup should be needed - you should be allowed to push to your fork without any issues.

Is either (or both) of those things not working currently?

@PatMyron
Copy link
Contributor Author

PatMyron commented Jan 20, 2023

  1. Believe it's pre-built if you have a recently active Gitpod workspace for the project, which I never have:
    https://www.gitpod.io/docs/introduction/learn-gitpod/the-life-of-a-workspace
    or if you're part of a Gitpod team with a Gitpod project set up, which requires repo permissions:
    https://www.gitpod.io/docs/configure/projects/prebuilds
    so it takes hours to build for me:
    feat: add support for Gitpod workspaces #7987 (comment)

  2. To clarify, Gitpod Github auth isn't specific to CDK either. I had just only used Gitpod for small changes before and never bothered to properly authenticate, but the amount of snapshot changes are too much to copy-paste out of Gitpod instead of properly git pushing 🙈


All of the above is inconvenient but surmountable after a few hours; my main issue is that I often can't get the whole CDK to build after that time/effort. I think it'd be simpler to automate this for everyone making simple contributions

@gricey432
Copy link

gricey432 commented Jan 23, 2023

I want to echo what @PatMyron said, I've tried to use gitpod for the integration tests a few times and every time it takes most of an hour to do the setup. Usually I end up tabbing away and then when I come back it's been suspended due to inactivity. It's a frustrating experience, especially knowing it could be solved by automation.

@pahud
Copy link
Contributor

pahud commented Feb 16, 2023

Hi @PatMyron @gricey432

I think aws-cdk has enabled the pre-build since Nov 2022.
#23118

What made you think the pre-build is not enabled?

@pahud pahud assigned pahud and unassigned peterwoodworth Feb 16, 2023
@pahud pahud added response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. and removed needs-triage This issue or PR still needs to be triaged. labels Feb 16, 2023
@PatMyron
Copy link
Contributor Author

PatMyron commented Feb 16, 2023

Adam asked that last month, here's that part of my reply again:

  1. Believe it's pre-built if you have a recently active Gitpod workspace for the project, which I never have:
    https://www.gitpod.io/docs/introduction/learn-gitpod/the-life-of-a-workspace
    or if you're part of a Gitpod team with a Gitpod project set up, which requires repo permissions:
    https://www.gitpod.io/docs/configure/projects/prebuilds
    so it takes hours to build for me

tl;dr pre-builds for CDK team but not us

@github-actions github-actions bot removed the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Feb 16, 2023
@pahud
Copy link
Contributor

pahud commented May 2, 2023

Hi @PatMyron

aws-cdk has configured gitpod to prebuild all PR branches, which means if you submit a PR draft, this PR branch will be prebuilt and you don't have to have an active Gitpod workspace for aws-cdk or be part of a Gitpod team.

Can you just submit a PR draft and see if the prebuild works? I personally use gitpod literally everyday and we really care about the prebuild experience. Let me know if it works with you.

btw, we recently have some udpates on the contributing guide including gitpod improvement and it's potentially saving up to 21 minutes from the prebuild. Please check it out and let me know what's still missing.

#25245
#25299
#25321
#25361

@pahud pahud added response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. bug This issue is a bug. p2 effort/medium Medium work item – several days of effort investigating This issue is being investigated and/or work is in progress to resolve the issue. and removed feature-request A feature should be added or improved. labels May 2, 2023
@github-actions
Copy link

github-actions bot commented May 4, 2023

This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.

@github-actions github-actions bot added the closing-soon This issue will automatically close in 4 days unless further comments are made. label May 4, 2023
@PatMyron
Copy link
Contributor Author

PatMyron commented May 7, 2023

@pahud took time to figure out Gitpod's new billing dark pattern (Gitpod now creates personal "organizations" with no credits and prompts to buy credits; free personal usage only resumed after deleting that new personal "organization"). After sorting that out, prebuild failed the aws-cdk-lib:build target (potentially because of my changes?)

Instead of detouring to improving Gitpod experiences, I'd still prefer not dealing with Gitpod and having updated snapshots pushed automatically since I'm just trying to make tiny contributions without spending hours fixing snapshots

@github-actions github-actions bot removed closing-soon This issue will automatically close in 4 days unless further comments are made. response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. labels May 7, 2023
@PatMyron
Copy link
Contributor Author

@guyernest ran into similar frustrations with other boilerplate commands like linting/formatting: #27490


Automating boilerplate commands rather than expecting all contributors to set up environments to run all boilerplate commands seems quicker and simpler than explaining all the steps to every new contributor

@pahud
Copy link
Contributor

pahud commented Dec 13, 2023

Hi @PatMyron

I feel your pain points. One of our recommended IDE is Amazon CodeCatalyst DevEnv and I am thinking we should create a walkthrough episode on CDK Live to share how to setup everything with some boilerplate commands.

@pahud pahud removed their assignment Dec 13, 2023
@pahud pahud removed the investigating This issue is being investigated and/or work is in progress to resolve the issue. label Dec 13, 2023
@pahud pahud added p3 and removed p2 labels Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. effort/medium Medium work item – several days of effort p3
Projects
None yet
Development

No branches or pull requests

7 participants