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

[FAI-14747] Support ingesting deployments data from bigquery #1892

Merged
merged 2 commits into from
Jan 23, 2025

Conversation

meldiner
Copy link
Contributor

@meldiner meldiner commented Jan 22, 2025

No description provided.

@meldiner meldiner merged commit fa8ca89 into main Jan 23, 2025
8 checks passed
@meldiner meldiner deleted the ron/FAI-14747-bigquery-deployment-ingestion branch January 23, 2025 19:20
@github-actions github-actions bot locked and limited conversation to collaborators Jan 23, 2025
Copy link
Contributor

@thomas-gerber thomas-gerber left a comment

Choose a reason for hiding this comment

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

some small comment / suggestions

build: {
uid: buildUid,
},
changeset: {
Copy link
Contributor

Choose a reason for hiding this comment

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

shouldn't those line be removed since we add the DeploymentChangeset object below?

if (uid) {
res.push({
model: 'cicd_Deployment',
record: {
Copy link
Contributor

Choose a reason for hiding this comment

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

typically, for the changeset feed to work, we need the application; i understand we may not have it in the example, but maybe we should have support for it?

const res: DestinationRecord[] = [];

//cicd_Deployment
const uid = record.record.data.uid;
Copy link
Contributor

Choose a reason for hiding this comment

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

are we documenting anywhere what is the structure of the expected record?

},
changeset: {
commit: {
sha: commit,
Copy link
Contributor

Choose a reason for hiding this comment

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

Typically, the commit sha of the deployment goes in a different object: vcs_Commit through a cicd_ArtifactCommitAssociation object through a dummy cicd_Artifact object through a dummy cicd_ArtifactDeployment object

See what the changeset feed queries to find it here: https://github.com/faros-ai/feeds/blob/master/feeds/cicd/changeset-feed/resources/graphql/deployments.gql#L28

});

res.push({
model: 'cicd_DeploymentChangeset',
Copy link
Contributor

Choose a reason for hiding this comment

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

assuming you write the commit sha through a vcs_Commit object as stated above, I would remove this and let the changeset feed set it

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

Successfully merging this pull request may close these issues.

3 participants