-
Notifications
You must be signed in to change notification settings - Fork 0
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
Create upload_bytes_to_bucket Cloud Function for LSST #250
Open
hernandezc1
wants to merge
21
commits into
develop
Choose a base branch
from
u/ch/lsst/pstogcs
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hernandezc1
commented
Feb 17, 2025
bucket_name = f"{PROJECT_ID}-{SURVEY}_alerts_{versiontag}" | ||
if TESTID != "False": | ||
bucket_name = f"{bucket_name}-{TESTID}" | ||
BUCKETS[versiontag] = client.get_bucket(client.bucket(bucket_name, user_project=PROJECT_ID)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pre-defining the buckets and making a .get_bucket
request for each instance rather than each alert is a temporary solution I discussed with @troyraen. For future schema implementations, this will need to be updated
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Enhancement
New feature or request
Pipeline: Storage
Components whose primary function is to store data
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR creates the necessary changes to store LSST alerts in Google Cloud Storage buckets using the
upload_bytes_to_bucket
Cloud Function.Here is an overview of the changes made in this PR:
setup_broker/rubin
directory tosetup_broker/lsst
consumer/rubin
directory toconsumer/lsst
PS_TOPIC_DEFAULT
for VM updated:"${survey}-alerts
->"${survey}-alerts_raw"
testid
is now appended to theconsumer.group.id
in the VM's configuration files to prevent new deployments from picking up existing offsetssetup_broker.sh
deploys all of the necessary GCP resourcescloud_functions/lsst/ps_to_gcs
directorymain.py
deduplicates the "incoming" alert stream, stores the alert (.avsc) in a GCS bucket, and publishes the original alert bytes (schema not included) to thelsst-alerts
Pub/Sub topic; the schema version of each alert is attached in the Pub/Sub message attributes. The BigQuery subscriptions in Use BigQuery subscriptions to store LSST alert data #243 can use the schema version as a filter to write the alert data to the appropriate BigQuery table