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

Keep separate record of nightly versions as soon as they get updated #1089

Merged
merged 30 commits into from
Oct 14, 2023

Conversation

partouf
Copy link
Member

@partouf partouf commented Sep 10, 2023

Basic table and code to keep a record of nightly-version as soon as it gets updated on the EFS, requires a CE frontend mechanism to retrieve the version that was saved here.

Usage:

    versions = NightlyVersions()
    versions.update_version("/usr/bin/gcc", "0", "10.2.0", "10.2.0\nhello world")

    version = versions.get_version("/usr/bin/gcc")
    print(version)

Todo:

  • Put version into table when check_exe is tested
  • Figure out best way to handle the modified timestamp stuff
  • Make optional somehow so that when users install nightly compilers on their own pc it won't try to call aws
  • Proof of concept lambda to retrieve the version that the frontend can call

@partouf partouf marked this pull request as ready for review September 11, 2023 21:54
@partouf partouf requested a review from mattgodbolt September 11, 2023 21:55
@partouf
Copy link
Member Author

partouf commented Sep 11, 2023

I have created a lambda for this, example: https://p6sqbrptgv4h32ru6aadaisw4q0ulazq.lambda-url.us-east-1.on.aws/?exe=%2Fusr%2Flocal%2Fbin%2Fgcc

https://us-east-1.console.aws.amazon.com/lambda/home?c=la&region=us-east-1&z=1#/functions/get_deployed_exe_version?tab=code

Can't actually put cloudfront in front of this though, needs to be an API Gateway thingy for that. Might be able to turn the lambda into api?

@partouf
Copy link
Member Author

partouf commented Sep 12, 2023

This only really could work because our frontend has the .exe for the compilers. Though it's no longer used by anything else in the frontend (for good reason). It's not great to have that dependency, but we just do not have the compiler id's on the infra side...

Unless I would add the properties reader like the library builder uses, we could do it. Then the question is, should the unique key then be the compiler id, or maybe add an extra attribute that has a list of id's somehow and can a dynamodb query select such a thing...

@partouf
Copy link
Member Author

partouf commented Oct 6, 2023

Now added, configured and tested with API Gateway and Cloudfront.

Todo

  • Configure lambda, code, rights, gateway, cloudfront, etc in Terraform

Copy link
Member

@mattgodbolt mattgodbolt left a comment

Choose a reason for hiding this comment

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

Some comments, worth cahtting in Discord as most of it is porbably my miunderstandings

bin/lib/installable/archives.py Show resolved Hide resolved
bin/lib/installable/archives.py Show resolved Hide resolved
bin/lib/installable/archives.py Show resolved Hide resolved
bin/lib/nightly_versions.py Outdated Show resolved Hide resolved
lambda/get_deployed_exe_version.py Outdated Show resolved Hide resolved
bin/lib/installable/archives.py Outdated Show resolved Hide resolved
bin/lib/installable/installable.py Show resolved Hide resolved
lambda/get_deployed_exe_version.py Outdated Show resolved Hide resolved
terraform/cloudfront_pub_lambdas.tf Outdated Show resolved Hide resolved
@partouf
Copy link
Member Author

partouf commented Oct 14, 2023

will merge this this weekend during the day and test it with check-installed and see anything bad happens

@partouf partouf merged commit a63b2d8 into main Oct 14, 2023
3 checks passed
@partouf partouf deleted the nightlyversions branch October 14, 2023 09: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.

2 participants